- Timestamp:
- 09/30/2025 05:05:42 PM (4 months ago)
- Location:
- branches/5.0
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/class-wp-customize-nav-menus.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0
- Property svn:mergeinfo changed
/trunk merged: 60814-60816
- Property svn:mergeinfo changed
-
branches/5.0/src/wp-includes/class-wp-customize-nav-menus.php
r43481 r60836 159 159 } elseif ( 'post' !== $object && 0 === $page && $post_type->has_archive ) { 160 160 // Add a post type archive link. 161 $title = $post_type->labels->archives; 161 162 $items[] = array( 162 'id' => $object . '-archive', 163 'title' => $post_type->labels->archives, 164 'type' => 'post_type_archive', 165 'type_label' => __( 'Post Type Archive' ), 166 'object' => $object, 167 'url' => get_post_type_archive_link( $object ), 163 'id' => $object_name . '-archive', 164 'title' => $title, 165 'original_title' => $title, 166 'type' => 'post_type_archive', 167 'type_label' => __( 'Post Type Archive' ), 168 'object' => $object_name, 169 'url' => get_post_type_archive_link( $object_name ), 168 170 ); 169 171 } … … 194 196 $post_title = sprintf( __( '#%d (no title)' ), $post->ID ); 195 197 } 198 199 $title = html_entity_decode( $post_title, ENT_QUOTES, get_bloginfo( 'charset' ) ); 196 200 $items[] = array( 197 'id' => "post-{$post->ID}", 198 'title' => html_entity_decode( $post_title, ENT_QUOTES, get_bloginfo( 'charset' ) ), 199 'type' => 'post_type', 200 'type_label' => get_post_type_object( $post->post_type )->labels->singular_name, 201 'object' => $post->post_type, 202 'object_id' => intval( $post->ID ), 203 'url' => get_permalink( intval( $post->ID ) ), 201 'id' => "post-{$post->ID}", 202 'title' => $title, 203 'original_title' => $title, 204 'type' => 'post_type', 205 'type_label' => get_post_type_object( $post->post_type )->labels->singular_name, 206 'object' => $post->post_type, 207 'object_id' => (int) $post->ID, 208 'url' => get_permalink( (int) $post->ID ), 204 209 ); 205 210 } … … 222 227 223 228 foreach ( $terms as $term ) { 229 $title = html_entity_decode( $term->name, ENT_QUOTES, get_bloginfo( 'charset' ) ); 224 230 $items[] = array( 225 'id' => "term-{$term->term_id}", 226 'title' => html_entity_decode( $term->name, ENT_QUOTES, get_bloginfo( 'charset' ) ), 227 'type' => 'taxonomy', 228 'type_label' => get_taxonomy( $term->taxonomy )->labels->singular_name, 229 'object' => $term->taxonomy, 230 'object_id' => intval( $term->term_id ), 231 'url' => get_term_link( intval( $term->term_id ), $term->taxonomy ), 231 'id' => "term-{$term->term_id}", 232 'title' => $title, 233 'original_title' => $title, 234 'type' => 'taxonomy', 235 'type_label' => get_taxonomy( $term->taxonomy )->labels->singular_name, 236 'object' => $term->taxonomy, 237 'object_id' => (int) $term->term_id, 238 'url' => get_term_link( (int) $term->term_id, $term->taxonomy ), 232 239 ); 233 240 }
Note: See TracChangeset
for help on using the changeset viewer.