Changeset 4181
- Timestamp:
- 09/03/2012 09:01:51 PM (13 years ago)
- Location:
- branches/plugin/bbp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-core-actions.php
r4154 r4181 42 42 */ 43 43 add_action( 'plugins_loaded', 'bbp_loaded', 10 ); 44 add_action( 'init', 'bbp_init', 10 ); 44 add_action( 'init', 'bbp_init', 0 ); // Early for bbp_register 45 add_action( 'parse_query', 'bbp_parse_query', 2 ); // Early for overrides 45 46 add_action( 'widgets_init', 'bbp_widgets_init', 10 ); 46 add_action( 'parse_query', 'bbp_parse_query', 2 ); // Early for overrides47 47 add_action( 'generate_rewrite_rules', 'bbp_generate_rewrite_rules', 10 ); 48 48 add_action( 'wp_enqueue_scripts', 'bbp_enqueue_scripts', 10 ); … … 77 77 * Attach various initialization actions to the init action. 78 78 * The load order helps to execute code at the correct time. 79 * v---Load order 80 */ 81 add_action( 'bbp_init', 'bbp_register_post_types', 10 ); 82 add_action( 'bbp_init', 'bbp_register_post_statuses', 12 ); 83 add_action( 'bbp_init', 'bbp_register_taxonomies', 14 ); 84 add_action( 'bbp_init', 'bbp_register_views', 16 ); 85 add_action( 'bbp_init', 'bbp_register_shortcodes', 18 ); 86 add_action( 'bbp_init', 'bbp_add_rewrite_tags', 20 ); 87 add_action( 'bbp_init', 'bbp_ready', 999 ); 79 * v---Load order 80 */ 81 add_action( 'bbp_init', 'bbp_register', 0 ); 82 add_action( 'bbp_init', 'bbp_add_rewrite_tags', 20 ); 83 add_action( 'bbp_init', 'bbp_ready', 999 ); 84 85 /** 86 * bbp_register - Attached to 'init' above on 0 priority 87 * 88 * Attach various initialization actions early to the init action. 89 * The load order helps to execute code at the correct time. 90 * v---Load order 91 */ 92 add_action( 'bbp_register', 'bbp_register_post_types', 2 ); 93 add_action( 'bbp_register', 'bbp_register_post_statuses', 4 ); 94 add_action( 'bbp_register', 'bbp_register_taxonomies', 6 ); 95 add_action( 'bbp_register', 'bbp_register_views', 8 ); 96 add_action( 'bbp_register', 'bbp_register_shortcodes', 10 ); 88 97 89 98 // Autoembeds -
branches/plugin/bbp-includes/bbp-core-dependency.php
r4154 r4181 104 104 105 105 /** 106 * Register any objects before anything is initialized 107 * 108 * @since bbPress (r4180) 109 * @uses do_action() Calls 'bbp_register' 110 */ 111 function bbp_register() { 112 do_action( 'bbp_register' ); 113 } 114 115 /** 106 116 * Initialize any code after everything has been loaded 107 117 * … … 110 120 */ 111 121 function bbp_init() { 112 do_action 122 do_action( 'bbp_init' ); 113 123 } 114 124 … … 120 130 */ 121 131 function bbp_widgets_init() { 122 do_action 132 do_action( 'bbp_widgets_init' ); 123 133 } 124 134 … … 130 140 */ 131 141 function bbp_setup_current_user() { 132 do_action 142 do_action( 'bbp_setup_current_user' ); 133 143 } 134 144 … … 162 172 */ 163 173 function bbp_register_post_types() { 164 do_action 174 do_action( 'bbp_register_post_types' ); 165 175 } 166 176 … … 172 182 */ 173 183 function bbp_register_post_statuses() { 174 do_action 184 do_action( 'bbp_register_post_statuses' ); 175 185 } 176 186 … … 182 192 */ 183 193 function bbp_register_taxonomies() { 184 do_action 194 do_action( 'bbp_register_taxonomies' ); 185 195 } 186 196 … … 192 202 */ 193 203 function bbp_register_views() { 194 do_action 204 do_action( 'bbp_register_views' ); 195 205 } 196 206 … … 202 212 */ 203 213 function bbp_enqueue_scripts() { 204 do_action 214 do_action( 'bbp_enqueue_scripts' ); 205 215 } 206 216 … … 212 222 */ 213 223 function bbp_add_rewrite_tags() { 214 do_action 224 do_action( 'bbp_add_rewrite_tags' ); 215 225 } 216 226 … … 222 232 */ 223 233 function bbp_login_form_login() { 224 do_action 234 do_action( 'bbp_login_form_login' ); 225 235 } 226 236
Note: See TracChangeset
for help on using the changeset viewer.