Ticket #58234: 58234.diff
File 58234.diff, 761 bytes (added by , 2 years ago) |
---|
-
src/wp-includes/class-wp-query.php
2107 2107 2108 2108 if ( ! $ptype_obj->hierarchical ) { 2109 2109 // Non-hierarchical post types can directly use 'name'. 2110 $q['name'] = $q[ $ptype_obj->query_var ];2110 $q['name'] = is_string( $q[ $ptype_obj->query_var ] ) ? $q[ $ptype_obj->query_var ] : ''; 2111 2111 } else { 2112 2112 // Hierarchical post types will operate through 'pagename'. 2113 $q['pagename'] = $q[ $ptype_obj->query_var ];2113 $q['pagename'] = is_string( $q[ $ptype_obj->query_var ] ) ? $q[ $ptype_obj->query_var ] : ''; 2114 2114 $q['name'] = ''; 2115 2115 } 2116 2116