Make WordPress Core

Changeset 53016


Ignore:
Timestamp:
03/29/2022 01:36:48 PM (4 years ago)
Author:
SergeyBiryukov
Message:

I18N: Move code out of a translatable string in get_user_count() and related functions.

Follow-up to [53011].

See #38741.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r53011 r53016  
    84348434function get_user_count( $network_id = null ) {
    84358435        if ( ! is_multisite() && null !== $network_id ) {
    8436                 _doing_it_wrong( __FUNCTION__, __( 'Unable to pass $network_id if not using multisite.' ), '6.0.0' );
    8437         }
     8436                _doing_it_wrong(
     8437                        __FUNCTION__,
     8438                        sprintf(
     8439                                /* translators: %s: $network_id */
     8440                                __( 'Unable to pass %s if not using multisite.' ),
     8441                                '<code>$network_id</code>'
     8442                        ),
     8443                        '6.0.0'
     8444                );
     8445        }
     8446
    84388447        return (int) get_network_option( $network_id, 'user_count', -1 );
    84398448}
     
    84498458function wp_maybe_update_user_counts( $network_id = null ) {
    84508459        if ( ! is_multisite() && null !== $network_id ) {
    8451                 _doing_it_wrong( __FUNCTION__, __( 'Unable to pass $network_id if not using multisite.' ), '6.0.0' );
     8460                _doing_it_wrong(
     8461                        __FUNCTION__,
     8462                        sprintf(
     8463                                /* translators: %s: $network_id */
     8464                                __( 'Unable to pass %s if not using multisite.' ),
     8465                                '<code>$network_id</code>'
     8466                        ),
     8467                        '6.0.0'
     8468                );
    84528469        }
    84538470
     
    84748491
    84758492        if ( ! is_multisite() && null !== $network_id ) {
    8476                 _doing_it_wrong( __FUNCTION__, __( 'Unable to pass $network_id if not using multisite.' ), '6.0.0' );
     8493                _doing_it_wrong(
     8494                        __FUNCTION__,
     8495                        sprintf(
     8496                                /* translators: %s: $network_id */
     8497                                __( 'Unable to pass %s if not using multisite.' ),
     8498                                '<code>$network_id</code>'
     8499                        ),
     8500                        '6.0.0'
     8501                );
    84778502        }
    84788503
     
    85148539function wp_is_large_user_count( $network_id = null ) {
    85158540        if ( ! is_multisite() && null !== $network_id ) {
    8516                 _doing_it_wrong( __FUNCTION__, __( 'Unable to pass $network_id if not using multisite.' ), '6.0.0' );
    8517         }
     8541                _doing_it_wrong(
     8542                        __FUNCTION__,
     8543                        sprintf(
     8544                                /* translators: %s: $network_id */
     8545                                __( 'Unable to pass %s if not using multisite.' ),
     8546                                '<code>$network_id</code>'
     8547                        ),
     8548                        '6.0.0'
     8549                );
     8550        }
     8551
    85188552        $count = get_user_count( $network_id );
    85198553
Note: See TracChangeset for help on using the changeset viewer.