- Timestamp:
- 07/24/2017 11:10:06 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets/class-wp-widget-text.php
r41132 r41134 361 361 </p> 362 362 <div class="notice inline notice-info notice-alt"> 363 <p><?php _e( 'This widget may contain code that may work better in the new “Custom HTML” 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 “Custom HTML” 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 “Custom HTML” widget. If you haven’t yet, how about trying that widget instead?' ); ?></p> 367 <?php endif; ?> 364 368 </div> 365 369 <p> -
trunk/tests/phpunit/tests/widgets/text-widget.php
r41132 r41134 458 458 $form = ob_get_clean(); 459 459 $this->assertContains( 'class="visual" type="hidden" value=""', $form ); 460 $this->assertNotContains( 'class="visual" type="hidden" value=" 1"', $form );460 $this->assertNotContains( 'class="visual" type="hidden" value="on"', $form ); 461 461 462 462 $instance = array( … … 469 469 $widget->form( $instance ); 470 470 $form = ob_get_clean(); 471 $this->assertContains( 'class="visual" type="hidden" value=" 1"', $form );471 $this->assertContains( 'class="visual" type="hidden" value="on"', $form ); 472 472 $this->assertNotContains( 'class="visual" type="hidden" value=""', $form ); 473 473 … … 481 481 $widget->form( $instance ); 482 482 $form = ob_get_clean(); 483 $this->assertContains( 'class="visual" type="hidden" value=" 1"', $form );483 $this->assertContains( 'class="visual" type="hidden" value="on"', $form ); 484 484 $this->assertNotContains( 'class="visual" type="hidden" value=""', $form ); 485 485 … … 494 494 $widget->form( $instance ); 495 495 $form = ob_get_clean(); 496 $this->assertContains( 'class="visual" type="hidden" value=" 1"', $form );496 $this->assertContains( 'class="visual" type="hidden" value="on"', $form ); 497 497 $this->assertNotContains( 'class="visual" type="hidden" value=""', $form ); 498 498 }
Note: See TracChangeset
for help on using the changeset viewer.