- Timestamp:
- 03/01/2023 08:17:11 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-friends/classes/class-bp-friends-component.php
r13414 r13432 101 101 * Set up bp-friends global settings. 102 102 * 103 * The BP_FRIENDS_SLUG constant is deprecated, and only used here for 104 * backwards compatibility. 103 * The BP_FRIENDS_SLUG constant is deprecated. 105 104 * 106 105 * @since 1.5.0 … … 111 110 */ 112 111 public function setup_globals( $args = array() ) { 113 $bp = buddypress(); 114 115 // Deprecated. Do not use. 116 // Defined conditionally to support unit tests. 117 if ( ! defined( 'BP_FRIENDS_DB_VERSION' ) ) { 118 define( 'BP_FRIENDS_DB_VERSION', '1800' ); 119 } 120 121 // Define a slug, if necessary. 122 if ( ! defined( 'BP_FRIENDS_SLUG' ) ) { 123 define( 'BP_FRIENDS_SLUG', $this->id ); 112 $bp = buddypress(); 113 $default_slug = $this->id; 114 115 // @deprecated. 116 if ( defined( 'BP_FRIENDS_DB_VERSION' ) ) { 117 _doing_it_wrong( 'BP_FRIENDS_DB_VERSION', esc_html__( 'This constants is not used anymore.', 'buddypress' ), 'BuddyPress 12.0.0' ); 118 } 119 120 // @deprecated. 121 if ( defined( 'BP_FRIENDS_SLUG' ) ) { 122 _doing_it_wrong( 'BP_FRIENDS_SLUG', esc_html__( 'Slug constants are deprecated.', 'buddypress' ), 'BuddyPress 12.0.0' ); 123 $default_slug = BP_FRIENDS_SLUG; 124 124 } 125 125 … … 133 133 // Note that global_tables is included in this array. 134 134 $args = array( 135 'slug' => BP_FRIENDS_SLUG,135 'slug' => $default_slug, 136 136 'has_directory' => false, 137 137 'search_string' => __( 'Search Friends...', 'buddypress' ),
Note: See TracChangeset
for help on using the changeset viewer.