- Timestamp:
- 03/01/2023 08:17:11 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/classes/class-bp-activity-component.php
r13414 r13432 179 179 * Set up component global variables. 180 180 * 181 * The BP_ACTIVITY_SLUG constant is deprecated, and only used here for 182 * backwards compatibility. 181 * The BP_ACTIVITY_SLUG constant is deprecated. 183 182 * 184 183 * @since 1.5.0 … … 189 188 */ 190 189 public function setup_globals( $args = array() ) { 191 $bp = buddypress(); 192 193 // Define a slug, if necessary. 194 if ( ! defined( 'BP_ACTIVITY_SLUG' ) ) { 195 define( 'BP_ACTIVITY_SLUG', $this->id ); 190 $bp = buddypress(); 191 $default_slug = $this->id; 192 193 // @deprecated. 194 if ( defined( 'BP_ACTIVITY_SLUG' ) ) { 195 _doing_it_wrong( 'BP_ACTIVITY_SLUG', esc_html__( 'Slug constants are deprecated.', 'buddypress' ), 'BuddyPress 12.0.0' ); 196 $default_slug = BP_ACTIVITY_SLUG; 196 197 } 197 198 … … 214 215 // Note that global_tables is included in this array. 215 216 $args = array( 216 'slug' => BP_ACTIVITY_SLUG,217 'root_slug' => isset( $bp->pages->activity->slug ) ? $bp->pages->activity->slug : BP_ACTIVITY_SLUG,217 'slug' => $default_slug, 218 'root_slug' => isset( $bp->pages->activity->slug ) ? $bp->pages->activity->slug : $default_slug, 218 219 'has_directory' => true, 220 'rewrite_ids' => array( 221 'directory' => 'activities', 222 'single_item_action' => 'activity_action', 223 'single_item_action_variables' => 'activity_action_variables', 224 ), 219 225 'directory_title' => isset( $bp->pages->activity->title ) ? $bp->pages->activity->title : $default_directory_title, 220 226 'notification_callback' => 'bp_activity_format_notifications',
Note: See TracChangeset
for help on using the changeset viewer.