Changeset 49624
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php
r49108 r49624 606 606 } 607 607 608 // 'classes' should be an array, as in wp_setup_nav_menu_item(). 609 if ( isset( $item->classes ) && is_scalar( $item->classes ) ) { 610 $item->classes = explode( ' ', $item->classes ); 611 } 612 608 613 $item->ID = $this->post_id; 609 614 $item->db_id = $this->post_id; -
trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php
r49055 r49624 907 907 'attr_title' => '">att \o/ o\'o empted <b>baddie</b>', 908 908 'description' => 'Attempted \o/ o\'o <b>markup</b>', 909 'classes' => ' ',909 'classes' => 'class-1 class-2', 910 910 'xfn' => '', 911 911 'status' => 'publish', … … 941 941 $this->assertSame( $expected, $nav_menu_item->attr_title ); 942 942 $this->assertSame( 'Attempted \o/ o’o markup', $nav_menu_item->description ); 943 $this->assertSame( array( 'class-1', 'class-2' ), $nav_menu_item->classes ); 943 944 } 944 945
Note: See TracChangeset
for help on using the changeset viewer.