Changeset 12451 for trunk/src/bp-core/classes/class-bp-component.php
- Timestamp:
- 08/28/2019 08:38:00 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-component.php
r12288 r12451 462 462 add_action( 'bp_generate_rewrite_rules', array( $this, 'generate_rewrite_rules' ), 10 ); 463 463 464 // Register BP REST Endpoints 465 if ( bp_rest_in_buddypress() && bp_rest_api_is_available() ) { 466 add_action( 'bp_rest_api_init', array( $this, 'rest_api_init' ), 10 ); 467 } 468 464 469 /** 465 470 * Fires at the end of the setup_actions method inside BP_Component. … … 858 863 do_action( 'bp_' . $this->id . '_generate_rewrite_rules' ); 859 864 } 865 866 /** 867 * Init the BP REST API. 868 * 869 * @since 5.0.0 870 */ 871 public function rest_api_init() { 872 873 /** 874 * Fires in the rest_api_init method inside BP_Component. 875 * 876 * This is a dynamic hook that is based on the component string ID. 877 * 878 * @since 5.0.0 879 */ 880 do_action( 'bp_' . $this->id . '_rest_api_init' ); 881 } 860 882 } 861 883 endif; // BP_Component.
Note: See TracChangeset
for help on using the changeset viewer.