WordPress.org

Make WordPress Core

Changeset 42539


Ignore:
Timestamp:
01/22/2018 06:31:39 AM (22 months ago)
Author:
westonruter
Message:

Customize: Use changeset-specific "locked" messages when branching is enabled.

Props dlh.
See #39896.
Fixes #42655 for 4.9 branch.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/class-wp-customize-manager.php

    r42537 r42539  
    39403940     */
    39413941    public function render_control_templates() {
     3942        if ( $this->branching() ) {
     3943            $l10n = array(
     3944                /* translators: %s: User who is customizing the changeset in customizer. */
     3945                'locked' => __( '%s is already customizing this changeset. Please wait until they are done to try customizing. Your latest changes have been autosaved.' ),
     3946                /* translators: %s: User who is customizing the changeset in customizer. */
     3947                'locked_allow_override' => __( '%s is already customizing this changeset. Do you want to take over?' ),
     3948            );
     3949        } else {
     3950            $l10n = array(
     3951                /* translators: %s: User who is customizing the changeset in customizer. */
     3952                'locked' => __( '%s is already customizing this site. Please wait until they are done to try customizing. Your latest changes have been autosaved.' ),
     3953                /* translators: %s: User who is customizing the changeset in customizer. */
     3954                'locked_allow_override' => __( '%s is already customizing this site. Do you want to take over?' ),
     3955            );
     3956        }
     3957
    39423958        foreach ( $this->registered_control_types as $control_type ) {
    39433959            $control = new $control_type( $this, 'temp', array(
     
    41024118                        <# } else if ( data.allowOverride ) { #>
    41034119                            <?php
    4104                             /* translators: %s: User who is customizing the changeset in customizer. */
    4105                             printf( __( '%s is already customizing this site. Do you want to take over?' ), '{{ data.lockUser.name }}' );
     4120                            echo esc_html( sprintf( $l10n['locked_allow_override'], '{{ data.lockUser.name }}' ) );
    41064121                            ?>
    41074122                        <# } else { #>
    41084123                            <?php
    4109                             /* translators: %s: User who is customizing the changeset in customizer. */
    4110                             printf( __( '%s is already customizing this site. Please wait until they are done to try customizing. Your latest changes have been autosaved.' ), '{{ data.lockUser.name }}' );
     4124                            echo esc_html( sprintf( $l10n['locked'], '{{ data.lockUser.name }}' ) );
    41114125                            ?>
    41124126                        <# } #>
Note: See TracChangeset for help on using the changeset viewer.