Changeset 6438 for trunk/src/includes/common/functions.php
- Timestamp:
- 05/27/2017 05:04:31 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/functions.php
r6437 r6438 24 24 */ 25 25 function bbp_get_redirect_to() { 26 $retval = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : ''; 27 26 27 // Check 'redirect_to' request parameter 28 $retval = ! empty( $_REQUEST['redirect_to'] ) 29 ? $_REQUEST['redirect_to'] 30 : ''; 31 32 // Filter & return 28 33 return apply_filters( 'bbp_get_redirect_to', $retval ); 29 34 } … … 44 49 45 50 // Are we appending the view=all vars? 46 if ( bbp_get_view_all() || ! empty( $force ) ) { 47 $link = add_query_arg( array( 'view' => 'all' ), $original_link ); 48 } else { 49 $link = $original_link; 50 } 51 51 $link = ( bbp_get_view_all() || ! empty( $force ) ) 52 ? add_query_arg( array( 'view' => 'all' ), $original_link ) 53 : $original_link; 54 55 // Filter & return 52 56 return apply_filters( 'bbp_add_view_all', $link, $original_link ); 53 57 } … … 65 69 */ 66 70 function bbp_remove_view_all( $original_link = '' ) { 67 return apply_filters( 'bbp_remove_view_all', remove_query_arg( 'view', $original_link ), $original_link ); 71 72 // Remove `view' argument 73 $link = remove_query_arg( 'view', $original_link ); 74 75 // Filter & return 76 return apply_filters( 'bbp_remove_view_all', $link, $original_link ); 68 77 } 69 78 … … 79 88 function bbp_get_view_all( $cap = 'moderate' ) { 80 89 $retval = ( ( ! empty( $_GET['view'] ) && ( 'all' === $_GET['view'] ) && current_user_can( $cap ) ) ); 90 91 // Filter & return 81 92 return apply_filters( 'bbp_get_view_all', (bool) $retval ); 82 93 } … … 192 203 } 193 204 205 // Filter & return 194 206 return apply_filters( 'bbp_past_edit_lock', (bool) $retval, $cur_time, $lock_time, $post_date_gmt ); 195 207 } … … 424 436 $statistics['hidden_reply_title'] = isset( $hidden_reply_title ) ? $hidden_reply_title : ''; 425 437 438 // Filter & return 426 439 return apply_filters( 'bbp_get_statistics', $statistics, $r ); 427 440 } … … 480 493 $r['bbp_anonymous_website'] = apply_filters( 'bbp_pre_anonymous_post_author_website', $r['bbp_anonymous_website'] ); 481 494 482 // Fi nally, return filtered anonymous post data495 // Filter & return 483 496 return (array) apply_filters( 'bbp_filter_anonymous_post_data', $r, $args ); 484 497 } … … 519 532 } 520 533 521 // Filter andreturn534 // Filter & return 522 535 return (array) apply_filters( 'bbp_sanitize_anonymous_post_author', $r, $anonymous_data ); 523 536 } … … 972 985 $sitename = substr( $sitename, 4 ); 973 986 } 987 988 // Filter & return 974 989 return apply_filters( 'bbp_get_do_not_reply_address', 'noreply@' . $sitename ); 975 990 } … … 1365 1380 } 1366 1381 1367 // Filter andreturn1382 // Filter & return 1368 1383 return apply_filters( 'bbp_logout_url', $url, $redirect_to ); 1369 1384 } … … 1515 1530 unset( $query ); 1516 1531 1517 // Filter andreturn1532 // Filter & return 1518 1533 return (int) apply_filters( 'bbp_get_public_child_last_id', $child_id, $parent_id, $post_type ); 1519 1534 } … … 1566 1581 unset( $query ); 1567 1582 1568 // Filter andreturn1583 // Filter & return 1569 1584 return (int) apply_filters( 'bbp_get_public_child_count', $child_count, $parent_id, $post_type ); 1570 1585 } … … 1617 1632 unset( $query ); 1618 1633 1619 // Filter andreturn1634 // Filter & return 1620 1635 return (array) apply_filters( 'bbp_get_public_child_ids', $child_ids, $parent_id, $post_type ); 1621 1636 } … … 1701 1716 $child_ids = wp_parse_id_list( $child_ids ); 1702 1717 1703 // Filter andreturn1718 // Filter & return 1704 1719 return (array) apply_filters( 'bbp_get_all_child_ids', $child_ids, $parent_id, $post_type ); 1705 1720 } … … 1726 1741 : ''; 1727 1742 1743 // Filter & return 1728 1744 return apply_filters( 'bbp_get_global_post_field', $retval, $post, $field, $context ); 1729 1745 } … … 2059 2075 } 2060 2076 2077 // Filter & return 2061 2078 return apply_filters( 'bbp_get_page_by_path', $retval, $path ); 2062 2079 }
Note: See TracChangeset
for help on using the changeset viewer.