Skip to content
Browse files

Clean up BBP_Component class methods. Pass $wp_rewrite in sub aciton.

git-svn-id: http://bbpress.svn.wordpress.org/branches/plugin@3828 9866e705-20ec-0310-96e7-cbb4277adcfb
  • Loading branch information...
1 parent 829b3ba commit 0baf144d15ed68d50621a6f447b69d33625dd7cc johnjamesjacoby committed Mar 31, 2012
Showing with 6 additions and 13 deletions.
  1. +6 −13 bbp-includes/bbp-core-classes.php
View
19 bbp-includes/bbp-core-classes.php
@@ -115,17 +115,10 @@ function includes() {
* 'bbp_{@link BBP_Component::name}setup_actions'
*/
function setup_actions() {
- // Register post types
- add_action( 'bbp_register_post_types', array ( $this, 'register_post_types' ), 10, 2 );
-
- // Register taxonomies
- add_action( 'bbp_register_taxonomies', array ( $this, 'register_taxonomies' ), 10, 2 );
-
- // Add the rewrite tags
- add_action( 'bbp_add_rewrite_tags', array ( $this, 'add_rewrite_tags' ), 10, 2 );
-
- // Generate rewrite rules
- add_action( 'bbp_generate_rewrite_rules', array ( $this, 'generate_rewrite_rules' ), 10, 2 );
+ add_action( 'bbp_register_post_types', array( $this, 'register_post_types' ), 10, 2 ); // Register post types
+ add_action( 'bbp_register_taxonomies', array( $this, 'register_taxonomies' ), 10, 2 ); // Register taxonomies
+ add_action( 'bbp_add_rewrite_tags', array( $this, 'add_rewrite_tags' ), 10, 2 ); // Add the rewrite tags
+ add_action( 'bbp_generate_rewrite_rules', array( $this, 'generate_rewrite_rules' ), 10, 2 ); // Generate rewrite rules
// Additional actions can be attached here
do_action( 'bbp_' . $this->name . 'setup_actions' );
@@ -171,8 +164,8 @@ function add_rewrite_tags() {
*
* @uses do_action() Calls 'bbp_{@link BBP_Component::name}_generate_rewrite_rules'
*/
- function generate_rewrite_rules ( $wp_rewrite ) {
- do_action( 'bbp_' . $this->name . '_generate_rewrite_rules' );
+ function generate_rewrite_rules( $wp_rewrite ) {
+ do_action_ref_array( 'bbp_' . $this->name . '_generate_rewrite_rules', $wp_rewrite );
}
}
endif; // BBP_Component

0 comments on commit 0baf144

Please sign in to comment.
Something went wrong with that request. Please try again.