Changeset 6285 for trunk/bp-core/bp-core-filters.php
- Timestamp:
- 09/03/2012 12:33:13 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-filters.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-filters.php
r6034 r6285 1 1 <?php 2 3 /** 4 * BuddyPress Filters 5 * 6 * @package BuddyPress 7 * @subpackage Core 8 * 9 * This file contains the filters that are used through-out BuddyPress. They are 10 * consolidated here to make searching for them easier, and to help developers 11 * understand at a glance the order in which things occur. 12 * 13 * There are a few common places that additional filters can currently be found 14 * 15 * - BuddyPress: In {@link BuddyPress::setup_actions()} in buddypress.php 16 * - Component: In {@link BP_Component::setup_actions()} in 17 * bp-core/bp-core-component.php 18 * - Admin: More in {@link BP_Admin::setup_actions()} in 19 * bp-core/bp-core-admin.php 20 * 21 * @see bp-core-actions.php 22 */ 2 23 3 24 // Exit if accessed directly 4 25 if ( !defined( 'ABSPATH' ) ) exit; 26 27 /** 28 * Attach BuddyPress to WordPress 29 * 30 * BuddyPress uses its own internal actions to help aid in third-party plugin 31 * development, and to limit the amount of potential future code changes when 32 * updates to WordPress core occur. 33 * 34 * These actions exist to create the concept of 'plugin dependencies'. They 35 * provide a safe way for plugins to execute code *only* when BuddyPress is 36 * installed and activated, without needing to do complicated guesswork. 37 * 38 * For more information on how this works, see the 'Plugin Dependency' section 39 * near the bottom of this file. 40 * 41 * v--WordPress Actions v--BuddyPress Sub-actions 42 */ 43 add_filter( 'request', 'bp_request', 10 ); 44 add_filter( 'template_include', 'bp_template_include', 10 ); 45 add_filter( 'login_redirect', 'bp_login_redirect', 10, 3 ); 5 46 6 47 // Add some filters to feedback messages … … 10 51 add_filter( 'bp_core_render_message_content', 'wpautop' ); 11 52 add_filter( 'bp_core_render_message_content', 'shortcode_unautop' ); 53 54 /** 55 * Template Compatibility 56 * 57 * If you want to completely bypass this and manage your own custom BuddyPress 58 * template hierarchy, start here by removing this filter, then look at how 59 * bp_template_include() works and do something similar. :) 60 */ 61 add_filter( 'bp_template_include', 'bp_template_include_theme_supports', 2, 1 ); 62 add_filter( 'bp_template_include', 'bp_template_include_theme_compat', 4, 2 ); 63 64 // Run all template parts through additional template locations 65 add_filter( 'bp_get_template_part', 'bp_add_template_locations' ); 66 67 // Turn comments off for BuddyPress pages 68 add_filter( 'comments_open', 'bp_comments_open', 10, 2 ); 12 69 13 70 /** … … 157 214 return bp_get_root_domain(); 158 215 } 159 add_filter( ' login_redirect', 'bp_core_login_redirect', 10, 3 );216 add_filter( 'bp_login_redirect', 'bp_core_login_redirect', 10, 3 ); 160 217 161 218 /*** … … 358 415 add_filter( 'bp_modify_page_title', 'convert_chars' ); 359 416 add_filter( 'bp_modify_page_title', 'esc_html' ); 360 361 ?>
Note: See TracChangeset
for help on using the changeset viewer.