Skip to content

Removed non-functional custom taxonomies meta boxes.#5221

Merged
jorgefilipecosta merged 1 commit intomasterfrom
fix/removed-non-functional-custom-taxonomies-metaboxes
Feb 28, 2018
Merged

Removed non-functional custom taxonomies meta boxes.#5221
jorgefilipecosta merged 1 commit intomasterfrom
fix/removed-non-functional-custom-taxonomies-metaboxes

Conversation

@jorgefilipecosta
Copy link
Copy Markdown
Member

@jorgefilipecosta jorgefilipecosta commented Feb 23, 2018

These meta boxes don't work at all, and the new editor already shows panels to allow the use of custom taxonomies. So showing this meta boxes is a bug.

How Has This Been Tested?

Add a custom taxonomy with a custom slug, verify a meta box with just the taxonomy title appear under Extended settings on the master branch, and does not appear on this branch.

@jorgefilipecosta jorgefilipecosta added [Type] Bug An existing feature does not function as intended [Feature] Meta Boxes A draggable box shown on the post editing screen labels Feb 23, 2018
@jorgefilipecosta jorgefilipecosta added this to the 2.3 milestone Feb 23, 2018
@jorgefilipecosta jorgefilipecosta self-assigned this Feb 23, 2018
@jorgefilipecosta jorgefilipecosta requested a review from a team February 27, 2018 13:58
Copy link
Copy Markdown
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks to be a good improvement, but I'm still seeing a meta box for my custom taxonomy:

Genre

Entirety of the plugin:

<?php

/**
 * Plugin Name: Demo CPT
 */

add_action( 'init', function() {
	register_post_type( 'book', [
		'label' => 'Book',
		'show_in_rest' => true,
		'public' => true,
		'show_ui' => true,
		'supports' => [ 'title', 'editor' ],
	] );

	register_taxonomy( 'genre', 'book', [
		'label' => __( 'Genre' ),
		'rewrite' => array( 'slug' => 'genre' ),
		'hierarchical' => false,
		'show_ui' => true, 
		'show_in_rest' => true,
	] );
} );

@jorgefilipecosta jorgefilipecosta force-pushed the fix/removed-non-functional-custom-taxonomies-metaboxes branch from 98e824b to ae93975 Compare February 27, 2018 22:12
@jorgefilipecosta
Copy link
Copy Markdown
Member Author

jorgefilipecosta commented Feb 27, 2018

Hi @aduth, it looks like the way to build the meta boxes ids is different for non-hierarchical taxonomies I updated the code to handle this case. I also removed the 'categorydiv' and 'tagsdiv-post_tag' from the hardcoded list as this cases are handled by the new code. Thank you for catching this case 👍

Copy link
Copy Markdown
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great 👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth a mentioned to where this is generated in the base core code:

https://github.com/WordPress/wordpress-develop/blob/c896326/src/wp-admin/edit-form-advanced.php#L288-L292

These meta boxes don't work at all, and the new editor already shows panel to allow the use of custom meta boxes. So showing this meta boxes is a bug.
@jorgefilipecosta jorgefilipecosta force-pushed the fix/removed-non-functional-custom-taxonomies-metaboxes branch from ae93975 to 0165546 Compare February 28, 2018 10:28
@jorgefilipecosta jorgefilipecosta merged commit 5139d0c into master Feb 28, 2018
@jorgefilipecosta jorgefilipecosta deleted the fix/removed-non-functional-custom-taxonomies-metaboxes branch February 28, 2018 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Meta Boxes A draggable box shown on the post editing screen [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants