Changeset 5813
- Timestamp:
- 02/21/2012 12:12:13 AM (13 years ago)
- Location:
- trunk/bp-core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r5811 r5813 430 430 } 431 431 } 432 add_action( ' wp', 'bp_core_catch_no_access');432 add_action( 'bp_template_redirect', 'bp_core_catch_no_access', 1 ); 433 433 434 434 /** -
trunk/bp-core/bp-core-hooks.php
r5797 r5813 25 25 * updates to WordPress occur. 26 26 */ 27 add_action( 'plugins_loaded', 'bp_loaded', 10 ); 28 add_action( 'init', 'bp_init', 10 ); 29 add_action( 'wp', 'bp_ready', 10 ); 27 add_action( 'plugins_loaded', 'bp_loaded', 10 ); 28 add_action( 'init', 'bp_init', 10 ); 29 add_action( 'wp', 'bp_ready', 10 ); 30 add_action( 'template_redirect', 'bp_template_redirect', 10 ); 31 add_action( 'wp_enqueue_scripts', 'bp_enqueue_scripts', 10 ); 32 add_action( 'admin_bar_menu', 'bp_setup_admin_bar', 10 ); 33 add_action( 'template_redirect', 'bp_template_redirect', 10 ); 34 add_filter( 'template_include', 'bp_template_include', 10 ); 35 add_filter( 'after_theme_setup', 'bp_after_theme_setup', 10 ); 36 add_filter( 'map_meta_cap', 'bp_map_meta_caps', 10, 4 ); 37 38 // Piggy back WordPress theme actions 39 add_action( 'wp_head', 'bp_head', 10 ); 40 add_action( 'wp_footer', 'bp_footer', 10 ); 41 30 42 //add_action( 'generate_rewrite_rules', 'bp_generate_rewrite_rules', 10 ); 31 //add_action( 'wp_enqueue_scripts', 'bp_enqueue_scripts', 10 );32 //add_filter( 'template_include', 'bp_template_include', 10 );33 43 34 44 /** … … 57 67 58 68 /** 59 * bp_ ready - Attached to 'wp' above60 * 61 * Attach various initialization actions to the bp_init action.69 * bp_template_redirect - Attached to 'template_redirect' above 70 * 71 * Attach various template actions to the bp_template_redirect action. 62 72 * The load order helps to execute code at the correct time. 63 * v---Load order 64 */ 65 add_action( 'bp_ready', 'bp_actions', 2 ); 66 add_action( 'bp_ready', 'bp_screens', 4 ); 67 68 /** Theme *********************************************************************/ 69 70 // Piggy back WordPress theme actions 71 add_action( 'wp_head', 'bp_head' ); 72 add_action( 'wp_footer', 'bp_footer' ); 73 74 /** Admin Bar *****************************************************************/ 75 76 // Setup the navigation menu 77 add_action( 'admin_bar_menu', 'bp_setup_admin_bar', 11 ); 78 79 /** Roles and Capabilities ****************************************************/ 80 81 // Map our custom capabilities onto WP's 82 add_filter( 'map_meta_cap', 'bp_map_meta_caps', 10, 4 ); 73 * 74 * Note that we currently use template_redirect versus template include because 75 * BuddyPress is a bully and overrides the existing themes output in many 76 * places. This won't always be this way, we promise. 77 * v---Load order 78 */ 79 add_action( 'bp_template_redirect', 'bp_actions', 2 ); 80 add_action( 'bp_template_redirect', 'bp_screens', 4 ); 83 81 84 82 /** The hooks *****************************************************************/ … … 215 213 } 216 214 215 /** 216 * Enqueue BuddyPress specific CSS and JS 217 * 218 * @since bbPress (r5812) 219 * 220 * @uses do_action() Calls 'bp_enqueue_scripts' 221 */ 222 function bp_enqueue_scripts() { 223 do_action ( 'bp_enqueue_scripts' ); 224 } 225 226 /** 227 * Piggy back action for BuddyPress sepecific theme actions once the theme has 228 * been setup and the theme's functions.php has loaded. 229 * 230 * @since bbPress (r5812) 231 * 232 * @uses do_action() Calls 'bp_after_theme_setup' 233 */ 234 function bp_after_theme_setup() { 235 do_action ( 'bp_after_theme_setup' ); 236 } 237 238 /** Theme Compatibility Filter ************************************************/ 239 240 /** 241 * The main filter used for theme compatibility and displaying custom BuddyPress 242 * theme files. 243 * 244 * @since BuddyPress (r5812) 245 * 246 * @uses apply_filters() 247 * 248 * @param string $template 249 * @return string Template file to use 250 */ 251 function bp_template_include( $template = '' ) { 252 return apply_filters( 'bp_template_include', $template ); 253 } 254 255 /** Theme Permissions *********************************************************/ 256 257 /** 258 * The main action used for redirecting BuddyPress theme actions that are not 259 * permitted by the current_user 260 * 261 * @since BuddyPress (r5812) 262 * 263 * @uses do_action() 264 */ 265 function bp_template_redirect() { 266 do_action( 'bp_template_redirect' ); 267 } 268 217 269 ?>
Note: See TracChangeset
for help on using the changeset viewer.