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.

Built from https://develop.svn.wordpress.org/trunk@41134


git-svn-id: http://core.svn.wordpress.org/trunk@40974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-07-24 23:11:43 +00:00
parent ddca4ceff1
commit 4886abf23e
2 changed files with 6 additions and 2 deletions

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41132';
$wp_version = '4.9-alpha-41134';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -360,7 +360,11 @@ class WP_Widget_Text extends WP_Widget {
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>"/>
</p>
<div class="notice inline notice-info notice-alt">
<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>
<?php if ( ! isset( $instance['visual'] ) ) : ?>
<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>
<?php else : ?>
<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>
<?php endif; ?>
</div>
<p>
<label for="<?php echo $this->get_field_id( 'text' ); ?>"><?php _e( 'Content:' ); ?></label>