Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/25/2024 12:38:29 AM (2 years 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.

See #9247 (trunk)
Closes ​https://github.com/buddypress/buddypress/pull/391

File:
1 edited

Legend:

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

    r14026 r14059  
    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, e.g. __( 'Groups', 'buddypress' ).
     255         * @param string $name Unique raw name for the component (do not use translatable strings).
    250256         * @param string $path The file path for the component's files. Used by {@link BP_Component::includes()}.
    251257         * @param array  $params {
Note: See TracChangeset for help on using the changeset viewer.