Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/03/2013 07:04:48 AM (11 years ago)
Author:
johnjamesjacoby
Message:

Add rewrite rules and permalink structure methods to BP_Component class. See #4954.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-component.php

    r7355 r7368  
    275275        add_action( 'bp_add_rewrite_tags',       array( $this, 'add_rewrite_tags'       ), 10 );
    276276
     277        // Add the rewrite rules
     278        add_action( 'bp_add_rewrite_rules',      array( $this, 'add_rewrite_rules'      ), 10 );
     279
     280        // Add the permalink structure
     281        add_action( 'bp_add_permastructs',       array( $this, 'add_permastructs'       ), 10 );
     282
    277283        // Generate rewrite rules
    278284        add_action( 'bp_generate_rewrite_rules', array( $this, 'generate_rewrite_rules' ), 10 );
     
    386392
    387393    /**
     394     * Add any additional rewrite rules
     395     *
     396     * @since BuddyPress (1.9)
     397     *
     398     * @uses do_action() Calls 'bp_{@link bp_Component::name}_add_rewrite_rules'
     399     */
     400    public function add_rewrite_rules() {
     401        do_action( 'bp_' . $this->id . '_add_rewrite_rules' );
     402    }
     403
     404    /**
     405     * Add any permalink structures
     406     *
     407     * @since BuddyPress (1.9)
     408     *
     409     * @uses do_action() Calls 'bp_{@link bp_Component::name}_add_permastruct'
     410     */
     411    public function add_permastructs() {
     412        do_action( 'bp_' . $this->id . '_add_permastructs' );
     413    }
     414
     415    /**
    388416     * Generate any additional rewrite rules
    389417     *
Note: See TracChangeset for help on using the changeset viewer.