Changeset 4920 for trunk/bp-core/bp-core-component.php
- Timestamp:
- 08/03/2011 09:03:41 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-component.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-component.php
r4912 r4920 34 34 */ 35 35 var $slug; 36 37 /** 38 * @var bool Does this component need a top-level directory? 39 */ 40 var $has_directory; 36 41 37 42 /** … … 108 113 'slug' => '', 109 114 'root_slug' => '', 115 'has_directory' => false, 110 116 'notification_callback' => '', 111 117 'search_string' => '', … … 114 120 $r = wp_parse_args( $args, $defaults ); 115 121 116 // Slug used for permalink s122 // Slug used for permalink URI chunk after root 117 123 $this->slug = apply_filters( 'bp_' . $this->id . '_slug', $r['slug'] ); 118 124 119 125 // Slug used for root directory 120 126 $this->root_slug = apply_filters( 'bp_' . $this->id . '_root_slug', $r['root_slug'] ); 127 128 // Does this component have a top-level directory? 129 $this->has_directory = apply_filters( 'bp_' . $this->id . '_has_directory', $r['has_directory'] ); 121 130 122 131 // Search string … … 133 142 /** BuddyPress ********************************************************/ 134 143 135 // Register this component in the activecomponents array144 // Register this component in the loaded components array 136 145 $bp->loaded_components[$this->slug] = $this->id; 137 146 … … 183 192 */ 184 193 function setup_actions() { 185 // Register post types 186 add_action( 'bp_setup_globals', array ( $this, 'setup_globals' ), 10 ); 187 188 // Include required files. Called early to ensure that BP core components are 189 // loaded before plugins that hook their loader functions to bp_include with 190 // the default priority of 10. This is for backwards compatibility; henceforth, 191 // plugins should register themselves by extending this base class. 192 add_action( 'bp_include', array ( $this, 'includes' ), 8 ); 193 194 // Register post types 195 add_action( 'bp_setup_nav', array ( $this, 'setup_nav' ), 10 ); 196 197 // Register post types 198 add_action( 'bp_setup_admin_bar', array ( $this, 'setup_admin_bar' ), 10 ); 199 200 // Register post types 201 add_action( 'bp_setup_title', array ( $this, 'setup_title' ), 10 ); 202 203 // Register post types 204 add_action( 'bp_register_post_types', array ( $this, 'register_post_types' ), 10 ); 194 195 // Register post types 196 add_action( 'bp_setup_globals', array ( $this, 'setup_globals' ), 10 ); 197 198 // Include required files. Called early to ensure that BP core 199 // components are loaded before plugins that hook their loader functions 200 // to bp_include with the default priority of 10. This is for backwards 201 // compatibility; henceforth, plugins should register themselves by 202 // extending this base class. 203 add_action( 'bp_include', array ( $this, 'includes' ), 8 ); 204 205 // Register post types 206 add_action( 'bp_setup_nav', array ( $this, 'setup_nav' ), 10 ); 207 208 // Register post types 209 add_action( 'bp_setup_admin_bar', array ( $this, 'setup_admin_bar' ), 10 ); 210 211 // Register post types 212 add_action( 'bp_setup_title', array ( $this, 'setup_title' ), 10 ); 213 214 // Register post types 215 add_action( 'bp_register_post_types', array ( $this, 'register_post_types' ), 10 ); 205 216 206 217 // Register taxonomies 207 add_action( 'bp_register_taxonomies', array ( $this, 'register_taxonomies'), 10 );218 add_action( 'bp_register_taxonomies', array ( $this, 'register_taxonomies' ), 10 ); 208 219 209 220 // Add the rewrite tags 210 add_action( 'bp_add_rewrite_tags', array ( $this, 'add_rewrite_tags'), 10 );221 add_action( 'bp_add_rewrite_tags', array ( $this, 'add_rewrite_tags' ), 10 ); 211 222 212 223 // Generate rewrite rules 213 add_action( 'bp_generate_rewrite_rules', array ( $this, 'generate_rewrite_rules'), 10 );224 add_action( 'bp_generate_rewrite_rules', array ( $this, 'generate_rewrite_rules' ), 10 ); 214 225 215 226 // Additional actions can be attached here
Note: See TracChangeset
for help on using the changeset viewer.