Make WordPress Core

Ticket #40830: 40830.diff

File 40830.diff, 1.2 KB (added by celloexpressions, 7 years ago)
  • src/wp-admin/widgets.php

     
    352352
    353353<?php
    354354if ( current_user_can( 'customize' ) ) {
     355        $customize_link = esc_url( add_query_arg(
     356                array(
     357                        array( 'autofocus' => array( 'panel' => 'widgets' ) ),
     358                        'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) )
     359                ),
     360                admin_url( 'customize.php' )
     361        ) );
    355362        printf(
    356363                ' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
    357                 esc_url( add_query_arg(
    358                         array(
    359                                 array( 'autofocus' => array( 'panel' => 'widgets' ) ),
    360                                 'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) )
    361                         ),
    362                         admin_url( 'customize.php' )
    363                 ) ),
     364                $customize_link,
    364365                __( 'Manage with Live Preview' )
    365366        );
     367        printf(
     368                /** translators: %s is a link to manage with live preview */
     369                '<div class="notice notice-warning"><p>' . __( '<strong>Warning:</strong> every change you make here is published instantly. We recommend managing widgets <a href="%s">with live preview</a>.' ) . '</p></div>',
     370                $customize_link
     371        );
    366372}
    367373?>
    368374