Changeset 39236
- Timestamp:
- 11/15/2016 03:36:13 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme.php
r39168 r39236 1039 1039 1040 1040 foreach ( $types as $type ) { 1041 $type = trim( $type );1041 $type = sanitize_key( $type ); 1042 1042 if ( ! isset( $post_templates[ $type ] ) ) { 1043 1043 $post_templates[ $type ] = array(); -
trunk/tests/phpunit/tests/admin/includesTheme.php
r39168 r39236 88 88 89 89 /** 90 * @ticket 38766 91 */ 92 function test_page_templates_for_post_types_with_trailing_periods() { 93 $theme = wp_get_theme( 'page-templates' ); 94 $this->assertNotEmpty( $theme ); 95 96 switch_theme( $theme['Template'], $theme['Stylesheet'] ); 97 98 $this->assertEqualSetsWithIndex( array( 99 'No Trailing Period' => '38766/no-trailing-period-post-types.php', 100 'Trailing Period.' => '38766/trailing-period-post-types.php', 101 'Trailing Comma,' => '38766/trailing-comma-post-types.php', 102 'Trailing Period, White Space.' => '38766/trailing-period-whitespace-post-types.php', 103 'Trailing White Space, Period.' => '38766/trailing-whitespace-period-post-types.php', 104 'Tilde in Post Type.' => '38766/tilde-post-types.php', 105 ), get_page_templates( null, 'period' ) ); 106 $this->assertEqualSetsWithIndex( array( 107 'No Trailing Period' => '38766/no-trailing-period-post-types.php', 108 'Trailing Period.' => '38766/trailing-period-post-types.php', 109 'Trailing Comma,' => '38766/trailing-comma-post-types.php', 110 'Trailing Period, White Space.' => '38766/trailing-period-whitespace-post-types.php', 111 'Trailing White Space, Period.' => '38766/trailing-whitespace-period-post-types.php', 112 ), get_page_templates( null, 'full-stop' ) ); 113 } 114 115 /** 90 116 * @ticket 38696 91 117 */
Note: See TracChangeset
for help on using the changeset viewer.