Quantcast
Viewing all articles
Browse latest Browse all 11471

jcracknell on "Polylang replaces custom/disabled metabox via meta_box_cb"

The add_meta_boxes function in admin-filters-post.php presently uses the following logic to determine whether or not to replace the meta box:

if ($taxonomy->show_ui && !is_taxonomy_hierarchical($tax_name))

If you consult the documentation for the meta_box_cb option to register_taxonomy (notably "No meta box is shown if set to false."), it is apparent that this should probably be:

$customMeta = isset($taxonomy->meta_box_cb) && is_callable($taxonomy->meta_box_cb);
if ($taxonomy->show_ui && !$customMeta && !is_taxonomy_hierarchical($tax_name))

Default behavior for a taxonomy with show_ui = true, meta_box_cb = false is a taxonomy with taxonomy management pages but no meta boxes.

https://wordpress.org/plugins/polylang/


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>