Make WordPress Core


Ignore:
Timestamp:
01/22/2018 06:27:41 AM (6 years ago)
Author:
westonruter
Message:

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

Props dlh.
See #39896.
Fixes #42655.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r42536 r42538  
    39873987     */
    39883988    public function render_control_templates() {
     3989        if ( $this->branching() ) {
     3990            $l10n = array(
     3991                /* translators: %s: User who is customizing the changeset in customizer. */
     3992                'locked' => __( '%s is already customizing this changeset. Please wait until they are done to try customizing. Your latest changes have been autosaved.' ),
     3993                /* translators: %s: User who is customizing the changeset in customizer. */
     3994                'locked_allow_override' => __( '%s is already customizing this changeset. Do you want to take over?' ),
     3995            );
     3996        } else {
     3997            $l10n = array(
     3998                /* translators: %s: User who is customizing the changeset in customizer. */
     3999                'locked' => __( '%s is already customizing this site. Please wait until they are done to try customizing. Your latest changes have been autosaved.' ),
     4000                /* translators: %s: User who is customizing the changeset in customizer. */
     4001                'locked_allow_override' => __( '%s is already customizing this site. Do you want to take over?' ),
     4002            );
     4003        }
     4004
    39894005        foreach ( $this->registered_control_types as $control_type ) {
    39904006            $control = new $control_type(
     
    41514167                        <# } else if ( data.allowOverride ) { #>
    41524168                            <?php
    4153                             /* translators: %s: User who is customizing the changeset in customizer. */
    4154                             printf( __( '%s is already customizing this site. Do you want to take over?' ), '{{ data.lockUser.name }}' );
     4169                            echo esc_html( sprintf( $l10n['locked_allow_override'], '{{ data.lockUser.name }}' ) );
    41554170                            ?>
    41564171                        <# } else { #>
    41574172                            <?php
    4158                             /* translators: %s: User who is customizing the changeset in customizer. */
    4159                             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 }}' );
     4173                            echo esc_html( sprintf( $l10n['locked'], '{{ data.lockUser.name }}' ) );
    41604174                            ?>
    41614175                        <# } #>
Note: See TracChangeset for help on using the changeset viewer.