mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Taxonomy: Introduce a back_to_items taxonomy label.
This is used after updating a taxonomy term in the link to return to the term listing screen. Props benoitchantre Fixes #41898 git-svn-id: https://develop.svn.wordpress.org/trunk@41618 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
301ecdabe4
commit
e5e17a4eff
@ -75,8 +75,7 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
|
||||
<p><strong><?php echo $message; ?></strong></p>
|
||||
<?php if ( $wp_http_referer ) { ?>
|
||||
<p><a href="<?php echo esc_url( wp_validate_redirect( esc_url_raw( $wp_http_referer ), admin_url( 'term.php?taxonomy=' . $taxonomy ) ) ); ?>"><?php
|
||||
/* translators: %s: taxonomy name */
|
||||
printf( _x( '← Back to %s', 'admin screen' ), $tax->labels->name );
|
||||
echo esc_html( $tax->labels->back_to_items );
|
||||
?></a></p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
@ -120,6 +120,7 @@ function create_initial_taxonomies() {
|
||||
'separate_items_with_commas' => null,
|
||||
'add_or_remove_items' => null,
|
||||
'choose_from_most_used' => null,
|
||||
'back_to_items' => __( '← Back to Link Categories' ),
|
||||
),
|
||||
'capabilities' => array(
|
||||
'manage_terms' => 'manage_links',
|
||||
@ -452,7 +453,7 @@ function unregister_taxonomy( $taxonomy ) {
|
||||
* @since 3.0.0
|
||||
* @since 4.3.0 Added the `no_terms` label.
|
||||
* @since 4.4.0 Added the `items_list_navigation` and `items_list` labels.
|
||||
* @since 4.9.0 Added the `most_used` label.
|
||||
* @since 4.9.0 Added the `most_used` and `back_to_items` labels.
|
||||
*
|
||||
* @param WP_Taxonomy $tax Taxonomy object.
|
||||
* @return object {
|
||||
@ -489,6 +490,7 @@ function unregister_taxonomy( $taxonomy ) {
|
||||
* @type string $items_list Label for the table hidden heading.
|
||||
* @type string $most_used Title used for the Most Used panel. Not used for non-hierarchical
|
||||
* taxonomies. Default 'Most Used'.
|
||||
* @type string $back_to_items Label displayed after a term has been updated.
|
||||
* }
|
||||
*/
|
||||
function get_taxonomy_labels( $tax ) {
|
||||
@ -521,6 +523,7 @@ function get_taxonomy_labels( $tax ) {
|
||||
'items_list_navigation' => array( __( 'Tags list navigation' ), __( 'Categories list navigation' ) ),
|
||||
'items_list' => array( __( 'Tags list' ), __( 'Categories list' ) ),
|
||||
'most_used' => array( null, __( 'Most Used' ) ),
|
||||
'back_to_items' => array( __( '← Back to Tags' ), __( '← Back to Categories' ) ),
|
||||
);
|
||||
$nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user