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 Built from https://develop.svn.wordpress.org/trunk@41618 git-svn-id: http://core.svn.wordpress.org/trunk@41453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
50a7d2b121
commit
2429d4acea
|
@ -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'];
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-alpha-41617';
|
||||
$wp_version = '4.9-alpha-41618';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue