Editor: Make block type aware of variations
Currently block variations are only defined on the client. In some cases, creating block variations on the server can be very useful, especially when needed data is not exposed in the REST APIs. Related to https://github.com/WordPress/gutenberg/pull/29095. Props: gwwar, timothyblynjacobs. Fixes: #52688. Built from https://develop.svn.wordpress.org/trunk@50527 git-svn-id: http://core.svn.wordpress.org/trunk@50140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -576,6 +576,10 @@ function unregister_taxonomy( $taxonomy ) {
|
||||
* @type string $items_list Label for the table hidden heading.
|
||||
* @type string $most_used Title for the Most Used tab. Default 'Most Used'.
|
||||
* @type string $back_to_items Label displayed after a term has been updated.
|
||||
* @type string $item_link Used in the block editor. Title for a navigation link block variation.
|
||||
* Default 'Tag Link'/'Category Link'.
|
||||
* @type string $item_link_description Used in the block editor. Description for a navigation link block
|
||||
* variation. Default 'A link to a tag.'/'A link to a category'.
|
||||
* }
|
||||
*/
|
||||
function get_taxonomy_labels( $tax ) {
|
||||
@@ -613,6 +617,14 @@ function get_taxonomy_labels( $tax ) {
|
||||
/* translators: Tab heading when selecting from the most used terms. */
|
||||
'most_used' => array( _x( 'Most Used', 'tags' ), _x( 'Most Used', 'categories' ) ),
|
||||
'back_to_items' => array( __( '← Go to Tags' ), __( '← Go to Categories' ) ),
|
||||
'item_link' => array(
|
||||
_x( 'Tag Link', 'navigation link block title' ),
|
||||
_x( 'Category Link', 'navigation link block description' ),
|
||||
),
|
||||
'item_link_description' => array(
|
||||
_x( 'A link to a tag.', 'navigation link block description' ),
|
||||
_x( 'A link to a category.', 'navigation link block description' ),
|
||||
),
|
||||
);
|
||||
$nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user