Changeset 47777 for trunk/src/wp-admin/includes/template.php
- Timestamp:
- 05/09/2020 12:24:31 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/template.php
r47775 r47777 1064 1064 } 1065 1065 1066 // If a core box was previously added or removed by a plugin, don't add. 1066 // If a core box was previously removed, don't add. 1067 if ( ( 'core' === $priority || 'sorted' === $priority ) 1068 && false === $wp_meta_boxes[ $page ][ $a_context ][ $a_priority ][ $id ] 1069 ) { 1070 return; 1071 } 1072 1073 // If a core box was previously added by a plugin, don't add. 1067 1074 if ( 'core' === $priority ) { 1068 // If core box previously deleted, don't add.1069 if ( false === $wp_meta_boxes[ $page ][ $a_context ][ $a_priority ][ $id ] ) {1070 return;1071 }1072 1073 1075 /* 1074 * If box was added with default priority, give it core priority to1075 * maintain sort order.1076 * If the box was added with default priority, give it core priority 1077 * to maintain sort order. 1076 1078 */ 1077 1079 if ( 'default' === $a_priority ) { … … 1081 1083 return; 1082 1084 } 1085 1083 1086 // If no priority given and ID already present, use existing priority. 1084 1087 if ( empty( $priority ) ) { 1085 1088 $priority = $a_priority; 1086 1089 /* 1087 * Else, if we're adding to the sorted priority, we don't know the title1088 * or callback. Grab them from the previously added context/priority.1089 */1090 * Else, if we're adding to the sorted priority, we don't know the title 1091 * or callback. Grab them from the previously added context/priority. 1092 */ 1090 1093 } elseif ( 'sorted' === $priority ) { 1091 1094 $title = $wp_meta_boxes[ $page ][ $a_context ][ $a_priority ][ $id ]['title'];
Note: See TracChangeset
for help on using the changeset viewer.