Changeset 6136
- Timestamp:
- 12/08/2016 03:34:29 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/replies/functions.php
r6134 r6136 1639 1639 } 1640 1640 1641 // Subaction? 1642 $sub_action = in_array( $_GET['sub_action'], array( 'trash', 'untrash', 'delete' ), true ) 1643 ? sanitize_key( $_GET['sub_action'] ) 1644 : false; 1645 1641 1646 // Do the reply toggling 1642 1647 $retval = bbp_toggle_reply( array( 1643 'id' => $reply_id, 1644 'action' => $action, 1645 'data' => $post_data 1648 'id' => $reply_id, 1649 'action' => $action, 1650 'sub_action' => $sub_action, 1651 'data' => $post_data 1646 1652 ) ); 1647 1653 … … 1676 1682 // Parse the arguments 1677 1683 $r = bbp_parse_args( $args, array( 1678 'id' => 0, 1679 'action' => '', 1680 'data' => array() 1684 'id' => 0, 1685 'action' => '', 1686 'sub_action' => '', 1687 'data' => array() 1681 1688 ) ); 1682 1689 … … 1720 1727 case 'bbp_toggle_reply_trash' : 1721 1728 1722 // Subaction?1723 $sub_action = in_array( $_GET['sub_action'], array( 'trash', 'untrash', 'delete' ), true )1724 ? $_GET['sub_action']1725 : false;1726 1727 1729 // Bail if no subaction 1728 if ( empty( $ sub_action) ) {1730 if ( empty( $r['sub_action'] ) ) { 1729 1731 break; 1730 1732 } 1731 1733 1732 1734 // Which subaction? 1733 switch ( $ sub_action) {1735 switch ( $r['sub_action'] ) { 1734 1736 case 'trash': 1735 1737 check_ajax_referer( "trash-{$nonce_suffix}" ); … … 1767 1769 1768 1770 // Filter & return 1769 return apply_filters( 'bbp_ do_toggle_reply_handler', $retval, $r, $args );1771 return apply_filters( 'bbp_toggle_reply', $retval, $r, $args ); 1770 1772 } 1771 1773 … … 1791 1793 1792 1794 /** 1793 * Return array of available reply handler actions 1794 * 1795 * @since 2.6.0 bbPress (rxxxx) 1795 * Return array of available reply toggle actions 1796 * 1797 * @since 2.6.0 bbPress (r6133) 1798 * 1799 * @return array 1796 1800 */ 1797 1801 function bbp_get_reply_toggles() {
Note: See TracChangeset
for help on using the changeset viewer.