Customizer: Introduce customize_nav_menu_available_item_types and customize_nav_menu_available_items filters.

Allows for new available menu item types/objects to be registered in addition to filtering the available items that are returned for each menu item type/object.

Props valendesigns, imath, westonruter.
See #32832.
Fixes #32708.


git-svn-id: https://develop.svn.wordpress.org/trunk@33366 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter
2015-07-22 20:28:03 +00:00
parent 2d85378c52
commit 9e383a560a
7 changed files with 266 additions and 172 deletions

View File

@@ -1739,7 +1739,7 @@ class WP_Customize_Nav_Menu_Item_Control extends WP_Customize_Control {
</p>
<div class="menu-item-actions description-thin submitbox">
<# if ( 'custom' != data.item_type && '' != data.original_title ) { #>
<# if ( ( 'post_type' === data.item_type || 'taxonomy' === data.item_type ) && '' !== data.original_title ) { #>
<p class="link-to-original">
<?php printf( __( 'Original: %s' ), '<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>' ); ?>
</p>