Make WordPress Core


Ignore:
Timestamp:
07/24/2017 11:10:06 PM (7 years ago)
Author:
westonruter
Message:

Widgets: Improve notice in Text widget's legacy mode.

Also fixes phpunit test which broke in [41132].

Props melchoyce, westonruter, gk.loveweb.
See #41394, #35243, #40951, #40907.
Fixes #41386.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-text.php

    r41132 r41134  
    361361            </p>
    362362            <div class="notice inline notice-info notice-alt">
    363                 <p><?php _e( 'This widget may contain code that may work better in the new &#8220;Custom HTML&#8221; widget. How about trying that widget instead?' ); ?></p>
     363                <?php if ( ! isset( $instance['visual'] ) ) : ?>
     364                    <p><?php _e( 'This widget may contain code that may work better in the &#8220;Custom HTML&#8221; widget. How about trying that widget instead?' ); ?></p>
     365                <?php else : ?>
     366                    <p><?php _e( 'This widget may have contained code that may work better in the &#8220;Custom HTML&#8221; widget. If you haven&#8217;t yet, how about trying that widget instead?' ); ?></p>
     367                <?php endif; ?>
    364368            </div>
    365369            <p>
Note: See TracChangeset for help on using the changeset viewer.