Changeset 6438 for trunk/src/includes/common/template.php
- Timestamp:
- 05/27/2017 05:04:31 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/template.php
r6433 r6438 112 112 $public = get_blog_option( $site_id, 'blog_public', 1 ); 113 113 114 // Filter & return 114 115 return (bool) apply_filters( 'bbp_is_site_public', $public, $site_id ); 115 116 } … … 134 135 } 135 136 137 // Filter & return 136 138 return (bool) apply_filters( 'bbp_is_forum', $retval, $post_id ); 137 139 } … … 158 160 } 159 161 162 // Filter & return 160 163 return (bool) apply_filters( 'bbp_is_forum_archive', $retval ); 161 164 } … … 188 191 } 189 192 193 // Filter & return 190 194 return (bool) apply_filters( 'bbp_is_single_forum', $retval ); 191 195 } … … 214 218 } 215 219 220 // Filter & return 216 221 return (bool) apply_filters( 'bbp_is_forum_edit', $retval ); 217 222 } … … 237 242 } 238 243 244 // Filter & return 239 245 return (bool) apply_filters( 'bbp_is_topic', $retval, $post_id ); 240 246 } … … 267 273 } 268 274 275 // Filter & return 269 276 return (bool) apply_filters( 'bbp_is_single_topic', $retval ); 270 277 } … … 290 297 } 291 298 299 // Filter & return 292 300 return (bool) apply_filters( 'bbp_is_topic_archive', $retval ); 293 301 } … … 316 324 } 317 325 326 // Filter & return 318 327 return (bool) apply_filters( 'bbp_is_topic_edit', $retval ); 319 328 } … … 337 346 } 338 347 348 // Filter & return 339 349 return (bool) apply_filters( 'bbp_is_topic_merge', $retval ); 340 350 } … … 358 368 } 359 369 370 // Filter & return 360 371 return (bool) apply_filters( 'bbp_is_topic_split', $retval ); 361 372 } … … 388 399 } 389 400 401 // Filter & return 390 402 return (bool) apply_filters( 'bbp_is_topic_tag', $retval ); 391 403 } … … 419 431 } 420 432 433 // Filter & return 421 434 return (bool) apply_filters( 'bbp_is_topic_tag_edit', $retval ); 422 435 } … … 449 462 } 450 463 464 // Filter & return 451 465 return (bool) apply_filters( 'bbp_is_custom_post_type', $retval, $the_post ); 452 466 } … … 472 486 } 473 487 488 // Filter & return 474 489 return (bool) apply_filters( 'bbp_is_reply', $retval, $post_id ); 475 490 } … … 498 513 } 499 514 515 // Filter & return 500 516 return (bool) apply_filters( 'bbp_is_reply_edit', $retval ); 501 517 } … … 517 533 } 518 534 535 // Filter & return 519 536 return (bool) apply_filters( 'bbp_is_reply_move', $retval ); 520 537 } … … 547 564 } 548 565 566 // Filter & return 549 567 return (bool) apply_filters( 'bbp_is_single_reply', $retval ); 550 568 } … … 568 586 } 569 587 588 // Filter & return 570 589 return (bool) apply_filters( 'bbp_is_favorites', $retval ); 571 590 } … … 589 608 } 590 609 610 // Filter & return 591 611 return (bool) apply_filters( 'bbp_is_subscriptions', $retval ); 592 612 } … … 611 631 } 612 632 633 // Filter & return 613 634 return (bool) apply_filters( 'bbp_is_topics_created', $retval ); 614 635 } … … 633 654 } 634 655 656 // Filter & return 635 657 return (bool) apply_filters( 'bbp_is_replies_created', $retval ); 636 658 } … … 658 680 } 659 681 682 // Filter & return 660 683 return (bool) apply_filters( 'bbp_is_user_home', $retval ); 661 684 } … … 681 704 } 682 705 706 // Filter & return 683 707 return (bool) apply_filters( 'bbp_is_user_home_edit', $retval ); 684 708 } … … 703 727 } 704 728 729 // Filter & return 705 730 return (bool) apply_filters( 'bbp_is_single_user', $retval ); 706 731 } … … 725 750 } 726 751 752 // Filter & return 727 753 return (bool) apply_filters( 'bbp_is_single_user_edit', $retval ); 728 754 } … … 747 773 } 748 774 775 // Filter & return 749 776 return (bool) apply_filters( 'bbp_is_single_user_profile', $retval ); 750 777 } … … 769 796 } 770 797 798 // Filter & return 771 799 return (bool) apply_filters( 'bbp_is_single_user_topics', $retval ); 772 800 } … … 791 819 } 792 820 821 // Filter & return 793 822 return (bool) apply_filters( 'bbp_is_single_user_replies', $retval ); 794 823 } … … 813 842 } 814 843 844 // Filter & return 815 845 return (bool) apply_filters( 'bbp_is_single_user_engagements', $retval ); 816 846 } … … 841 871 } 842 872 873 // Filter & return 843 874 return (bool) apply_filters( 'bbp_is_single_view', $retval ); 844 875 } … … 879 910 } 880 911 912 // Filter & return 881 913 return (bool) apply_filters( 'bbp_is_search', $retval ); 882 914 } … … 917 949 } 918 950 951 // Filter & return 919 952 return (bool) apply_filters( 'bbp_is_search_results', $retval ); 920 953 } … … 939 972 } 940 973 974 // Filter & return 941 975 return (bool) apply_filters( 'bbp_is_edit', $retval ); 942 976 } … … 1092 1126 $classes = apply_filters( 'bbp_get_the_body_class', $classes, $bbp_classes, $wp_classes, $custom_classes ); 1093 1127 1094 return apply_filters( 'bbp_body_class', $classes, $bbp_classes, $wp_classes, $custom_classes ); 1128 // Filter & return 1129 return (array) apply_filters( 'bbp_body_class', $classes, $bbp_classes, $wp_classes, $custom_classes ); 1095 1130 } 1096 1131 … … 1248 1283 1249 1284 // Add action as query arg 1250 if ( ! empty( $r['action'] ) ) { 1251 $login_url = add_query_arg( array( 'action' => $r['action'] ), $r['url'] ); 1252 1253 // No query arg 1254 } else { 1255 $login_url = $r['url']; 1256 } 1285 $login_url = ! empty( $r['action'] ) 1286 ? add_query_arg( array( 'action' => $r['action'] ), $r['url'] ) 1287 : $r['url']; 1257 1288 1258 1289 $login_url = site_url( $login_url, $r['context'] ); 1259 1290 1291 // Filter & return 1260 1292 return apply_filters( 'bbp_get_wp_login_action', $login_url, $r, $args ); 1261 1293 } … … 1290 1322 $redirect_field = '<input type="hidden" id="bbp_redirect_to" name="redirect_to" value="' . esc_url( $redirect_to ) . '" />'; 1291 1323 1324 // Filter & return 1292 1325 echo apply_filters( 'bbp_redirect_to_field', $redirect_field, $redirect_to ); 1293 1326 } … … 1351 1384 } 1352 1385 1386 // Filter & return 1353 1387 return apply_filters( 'bbp_get_sanitize_val', $retval, $request, $input_type ); 1354 1388 } … … 1397 1431 } 1398 1432 1433 // Filter & return 1399 1434 return apply_filters( 'bbp_get_tab_index', (int) $bbp->tab_index ); 1400 1435 } … … 1625 1660 } 1626 1661 1662 // Filter & return 1627 1663 return apply_filters( 'bbp_get_dropdown', $retval, $r ); 1628 1664 } … … 1939 1975 $output = ob_get_clean(); 1940 1976 1977 // Filter & return 1941 1978 return apply_filters( 'bbp_get_the_content', $output, $args, $post_content ); 1942 1979 } … … 1964 2001 $plugins[] = 'tabfocus'; 1965 2002 2003 // Filter & return 1966 2004 return apply_filters( 'bbp_get_tiny_mce_plugins', $plugins ); 1967 2005 } … … 1989 2027 array_push( $buttons, 'image' ); 1990 2028 2029 // Filter & return 1991 2030 return apply_filters( 'bbp_get_teeny_mce_buttons', $buttons ); 1992 2031 } … … 2016 2055 $settings['buttons'] = implode( ',', $buttons ); 2017 2056 2057 // Filter & return 2018 2058 return apply_filters( 'bbp_get_quicktags_settings', $settings ); 2019 2059 } … … 2143 2183 } 2144 2184 2185 // Filter & return 2145 2186 return apply_filters( 'bbp_get_view_link', $url, $view ); 2146 2187 } … … 2504 2545 $trail = ! empty( $crumbs ) ? ( $r['before'] . $r['crumb_before'] . implode( $sep . $r['crumb_after'] . $r['crumb_before'] , $crumbs ) . $r['crumb_after'] . $r['after'] ) : ''; 2505 2546 2547 // Filter & return 2506 2548 return apply_filters( 'bbp_get_breadcrumb', $trail, $crumbs, $r ); 2507 2549 } … … 2548 2590 } 2549 2591 2592 // Filter & return 2550 2593 return apply_filters( 'bbp_get_allowed_tags', htmlentities( $allowed ) ); 2551 2594 } … … 2641 2684 */ 2642 2685 function bbp_get_logout_link( $redirect_to = '' ) { 2643 return apply_filters( 'bbp_get_logout_link', '<a href="' . wp_logout_url( $redirect_to ) . '" class="button logout-link">' . esc_html__( 'Log Out', 'bbpress' ) . '</a>', $redirect_to ); 2686 2687 // Build the link 2688 $link = '<a href="' . wp_logout_url( $redirect_to ) . '" class="button logout-link">' . esc_html__( 'Log Out', 'bbpress' ) . '</a>'; 2689 2690 // Filter & return 2691 return apply_filters( 'bbp_get_logout_link', $link, $redirect_to ); 2644 2692 } 2645 2693 … … 2858 2906 } 2859 2907 2860 // Filter andreturn2908 // Filter & return 2861 2909 return apply_filters( 'bbp_title', $new_title, $sep, $seplocation ); 2862 2910 }
Note: See TracChangeset
for help on using the changeset viewer.