Changeset 33366 for trunk/src/wp-includes/class-wp-customize-setting.php
- Timestamp:
- 07/22/2015 08:28:03 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-setting.php
r33256 r33366 969 969 'post_type', 970 970 'to_ping', 971 'type_label',972 971 ); 973 972 foreach ( $irrelevant_properties as $property ) { … … 1144 1143 1145 1144 if ( ! isset( $post->type_label ) ) { 1146 $post->type_label = null; 1147 } 1145 if ( 'post_type' === $post->type ) { 1146 $object = get_post_type_object( $post->object ); 1147 if ( $object ) { 1148 $post->type_label = $object->labels->singular_name; 1149 } else { 1150 $post->type_label = $post->object; 1151 } 1152 } elseif ( 'taxonomy' == $post->type ) { 1153 $object = get_taxonomy( $post->object ); 1154 if ( $object ) { 1155 $post->type_label = $object->labels->singular_name; 1156 } else { 1157 $post->type_label = $post->object; 1158 } 1159 } else { 1160 $post->type_label = __( 'Custom Link' ); 1161 } 1162 } 1163 1148 1164 return $post; 1149 1165 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)