Skip to:
Content

BuddyPress.org

Changeset 14060


Ignore:
Timestamp:
10/25/2024 12:57:50 AM (5 months ago)
Author:
imath
Message:

Avoid WP 6.7 notice about using translatable strings too early

Use a "raw" name instead of a "translatable" name for the BP_Component's & BP_Theme_Compat's name properties.

Props boonebgorges.

Fixes #9247 (branch 14.0)

Location:
branches/14.0/src
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • branches/14.0/src/bp-activity/classes/class-bp-activity-component.php

    r13689 r14060  
    2929        parent::start(
    3030            'activity',
    31             __( 'Activity Streams', 'buddypress' ),
     31            'Activity Streams',
    3232            buddypress()->plugin_dir,
    3333            array(
  • branches/14.0/src/bp-blogs/classes/class-bp-blogs-component.php

    r13522 r14060  
    3131        parent::start(
    3232            'blogs',
    33             __( 'Site Directory', 'buddypress' ),
     33            'Site Directory',
    3434            buddypress()->plugin_dir,
    3535            array(
  • branches/14.0/src/bp-core/classes/class-bp-component.php

    r13943 r14060  
    3030
    3131    /**
    32      * Translatable name for the component.
     32     * Raw name for the component.
     33     *
     34     * Do not use translatable strings here as this part is set before WP's `init` hook.
     35     *
     36     * @since 1.5.0
     37     * @since 14.3.0 Changed the variable inline documentation summary and added a description.
    3338     *
    3439     * @internal
     
    245250     * @since 2.3.0 Added $params['features'] as a configurable value.
    246251     * @since 2.4.0 Added $params['search_query_arg'] as a configurable value.
     252     * @since 14.3.0 Changed the `$name` parameter's description.
    247253     *
    248254     * @param string $id   Unique ID. Letters, numbers, and underscores only.
    249      * @param string $name Unique name. This should be a translatable name, eg.
    250      *                     __( 'Groups', 'buddypress' ).
     255     * @param string $name Unique raw name for the component (do not use translatable strings).
    251256     * @param string $path The file path for the component's files. Used by {@link BP_Component::includes()}.
    252257     * @param array  $params {
  • branches/14.0/src/bp-core/classes/class-bp-core.php

    r13893 r14060  
    2929        parent::start(
    3030            'core',
    31             __( 'BuddyPress Core', 'buddypress' ),
     31            'BuddyPress Core',
    3232            buddypress()->plugin_dir
    3333        );
  • branches/14.0/src/bp-core/classes/class-bp-theme-compat.php

    r13893 r14060  
    1919 *
    2020 * @since 1.7.0
     21 * @since 14.3.0 Changed the `$name` property's description.
    2122 *
    2223 * @todo We should probably do something similar to BP_Component::start().
     
    2627 *     An array of properties describing the theme compat package.
    2728 *     @type string $id      ID of the package. Must be unique.
    28  *     @type string $name    Name of the theme. This should match the name given
     29 *     @type string $name    Raw name for the theme. This should match the name given
    2930 *                           in style.css.
    3031 *     @type string $version Theme version. Used for busting script and style
  • branches/14.0/src/bp-friends/classes/class-bp-friends-component.php

    r13503 r14060  
    2929        parent::start(
    3030            'friends',
    31             _x( 'Friend Connections', 'Friends screen page <title>', 'buddypress' ),
     31            'Friend Connections',
    3232            buddypress()->plugin_dir,
    3333            array(
  • branches/14.0/src/bp-groups/classes/class-bp-groups-component.php

    r13689 r14060  
    118118        parent::start(
    119119            'groups',
    120             _x( 'User Groups', 'Group screen page <title>', 'buddypress' ),
     120            'User Groups',
    121121            buddypress()->plugin_dir,
    122122            array(
  • branches/14.0/src/bp-members/classes/class-bp-members-component.php

    r13707 r14060  
    7676        parent::start(
    7777            'members',
    78             __( 'Members', 'buddypress' ),
     78            'Members',
    7979            buddypress()->plugin_dir,
    8080            array(
  • branches/14.0/src/bp-members/classes/class-bp-members-invitations-component.php

    r13877 r14060  
    1515        parent::start(
    1616            'members_invitations',
    17             __( 'Members Invitations', 'buddypress' ),
     17            'Members Invitations',
    1818            '',
    1919            array()
  • branches/14.0/src/bp-messages/classes/class-bp-messages-component.php

    r13551 r14060  
    3838        parent::start(
    3939            'messages',
    40             __( 'Private Messages', 'buddypress' ),
     40            'Private Messages',
    4141            buddypress()->plugin_dir,
    4242            array(
  • branches/14.0/src/bp-notifications/classes/class-bp-notifications-component.php

    r13503 r14060  
    2929        parent::start(
    3030            'notifications',
    31             _x( 'Notifications', 'Page <title>', 'buddypress' ),
     31            'Notifications',
    3232            buddypress()->plugin_dir,
    3333            array(
  • branches/14.0/src/bp-settings/classes/class-bp-settings-component.php

    r13503 r14060  
    2727        parent::start(
    2828            'settings',
    29             __( 'Settings', 'buddypress' ),
     29            'Settings',
    3030            buddypress()->plugin_dir,
    3131            array(
  • branches/14.0/src/bp-templates/bp-legacy/buddypress-functions.php

    r14044 r14060  
    77 * @package BuddyPress
    88 * @subpackage BP_Theme_Compat
    9  * @version 14.0.0
     9 * @version 14.3.0
    1010 */
    1111
     
    5959        $bp            = buddypress();
    6060        $this->id      = 'legacy';
    61         $this->name    = __( 'BuddyPress Legacy', 'buddypress' );
     61        $this->name    = 'BP Legacy';
    6262        $this->version = bp_get_version();
    6363        $this->dir     = trailingslashit( $bp->themes_dir . '/bp-legacy' );
  • branches/14.0/src/bp-xprofile/classes/class-bp-xprofile-component.php

    r14050 r14060  
    4848        parent::start(
    4949            'xprofile',
    50             _x( 'Extended Profiles', 'Component page <title>', 'buddypress' ),
     50            'Extended Profiles',
    5151            buddypress()->plugin_dir,
    5252            array(
  • branches/14.0/src/class-buddypress.php

    r14051 r14060  
    927927            array(
    928928                'id'      => 'legacy',
    929                 'name'    => __( 'BuddyPress Legacy', 'buddypress' ),
     929                'name'    => 'BP Legacy',
    930930                'version' => bp_get_version(),
    931931                'dir'     => trailingslashit( $this->themes_dir . '/bp-legacy' ),
     
    937937            array(
    938938                'id'      => 'nouveau',
    939                 'name'    => __( 'BuddyPress Nouveau', 'buddypress' ),
     939                'name'    => 'BP Nouveau',
    940940                'version' => bp_get_version(),
    941941                'dir'     => trailingslashit( $this->themes_dir . '/bp-nouveau' ),
Note: See TracChangeset for help on using the changeset viewer.