Making WordPress.org

Changeset 14571


Ignore:
Timestamp:
10/27/2025 12:56:44 AM (8 months ago)
Author:
dd32
Message:

Make: Don't execute translation functions at theme inclusion.

This avoids a _doing_it_wrong() alert.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/functions.php

    r14517 r14571  
    633633/**
    634634 * Register translations for plugins without their own GlotPress project.
    635  */
    636 // wp-content/plugins/wporg-o2-posting-access/wporg-o2-posting-access.php
    637 /* translators: %s: Post title */
    638 __( 'Pending Review: %s', 'wporg' );
    639 __( 'Submit for review', 'wporg' );
    640 _n_noop( '%s post awaiting review', '%s posts awaiting review', 'wporg' );
     635 * This is in a function to avoid calling translation functions too early (at theme inclusion time).
     636 */
     637function __translations_in_private_functions() {
     638    // wp-content/plugins/wporg-o2-posting-access/wporg-o2-posting-access.php
     639    /* translators: %s: Post title */
     640    __( 'Pending Review: %s', 'wporg' );
     641    __( 'Submit for review', 'wporg' );
     642    _n_noop( '%s post awaiting review', '%s posts awaiting review', 'wporg' );
     643}
    641644
    642645/**
Note: See TracChangeset for help on using the changeset viewer.