Ticket #28956: 28956.1.patch
File 28956.1.patch, 3.6 KB (added by , 8 years ago) |
---|
-
src/wp-admin/edit-form-advanced.php
246 246 // all taxonomies 247 247 foreach ( get_object_taxonomies( $post ) as $tax_name ) { 248 248 $taxonomy = get_taxonomy( $tax_name ); 249 if ( ! $taxonomy->show_ui || false === $taxonomy->meta_box_cb ) 249 if ( ! $taxonomy->show_ui || false === $taxonomy->meta_box_cb ) { 250 250 continue; 251 } 251 252 252 253 $label = $taxonomy->labels->name; 253 254 254 if ( ! is_taxonomy_hierarchical( $tax_name ) ) 255 if ( ! is_taxonomy_hierarchical( $tax_name ) ) { 255 256 $tax_meta_box_id = 'tagsdiv-' . $tax_name; 256 else257 } else { 257 258 $tax_meta_box_id = $tax_name . 'div'; 259 } 258 260 259 add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, 'side', 'core', array( 'taxonomy' => $tax_name ) );261 add_meta_box( $tax_meta_box_id, $label, $taxonomy->meta_box_cb, null, $taxonomy->meta_box_context , $taxonomy->meta_box_priority, array( 'taxonomy' => $tax_name ) ); 260 262 } 261 263 262 264 if ( post_type_supports( $post_type, 'page-attributes' ) || count( get_page_templates( $post ) ) > 0 ) { -
src/wp-includes/class-wp-taxonomy.php
142 142 public $meta_box_cb = null; 143 143 144 144 /** 145 * The context for the meta box display. 146 * 147 * @since 4.8.0 148 * @access public 149 * @var string 150 */ 151 public $meta_box_context = 'side'; 152 153 /** 154 * The priority for the meta box display. 155 * 156 * @since 4.8.0 157 * @access public 158 * @var string 159 */ 160 public $meta_box_priority = 'core'; 161 162 /** 145 163 * An array of object types this taxonomy is registered for. 146 164 * 147 165 * @since 4.7.0 … … 250 268 'show_in_quick_edit' => null, 251 269 'show_admin_column' => false, 252 270 'meta_box_cb' => null, 271 'meta_box_context' => 'side', 272 'meta_box_priority' => 'core', 253 273 'capabilities' => array(), 254 274 'rewrite' => true, 255 275 'query_var' => $this->name, -
src/wp-includes/taxonomy.php
294 294 * @since 4.4.0 The `show_ui` argument is now enforced on the term editing screen. 295 295 * @since 4.4.0 The `public` argument now controls whether the taxonomy can be queried on the front end. 296 296 * @since 4.5.0 Introduced `publicly_queryable` argument. 297 * @since 4.8.0 Introduced `meta_box_context` and `meta_box_priority` argument. 297 298 * 298 299 * @global array $wp_taxonomies Registered taxonomies. 299 300 * … … 333 334 * post_categories_meta_box() is used for hierarchical taxonomies, and 334 335 * post_tags_meta_box() is used for non-hierarchical. If false, no meta 335 336 * box is shown. 337 * @type string $meta_box_context The context within the screen where the meta box is displayed. 338 * Accepts 'side', 'normal' and 'advanced'. Default value: 'side'. 339 * @type string $meta_box_priority The priority within the context where the meta box is displayed. 340 * Accepts 'high', 'core', 'default' and 'low'. Default value: 'core'. 336 341 * @type array $capabilities { 337 342 * Array of capabilities for this taxonomy. 338 343 *