wp/wp-admin/term.php
changeset 9 177826044cd9
parent 7 cf61fcea0001
child 16 a86126ab1dd4
equal deleted inserted replaced
8:c7c34916027a 9:177826044cd9
    29 $tax      = get_taxonomy( $tag->taxonomy );
    29 $tax      = get_taxonomy( $tag->taxonomy );
    30 $taxonomy = $tax->name;
    30 $taxonomy = $tax->name;
    31 $title    = $tax->labels->edit_item;
    31 $title    = $tax->labels->edit_item;
    32 
    32 
    33 if ( ! in_array( $taxonomy, get_taxonomies( array( 'show_ui' => true ) ) ) ||
    33 if ( ! in_array( $taxonomy, get_taxonomies( array( 'show_ui' => true ) ) ) ||
    34      ! current_user_can( 'edit_term', $tag->term_id )
    34 	! current_user_can( 'edit_term', $tag->term_id ) ) {
    35 ) {
    35 
    36 	wp_die(
    36 	wp_die(
    37 		'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    37 		'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
    38 		'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
    38 		'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
    39 		403
    39 		403
    40 	);
    40 	);
    56 } else {
    56 } else {
    57 	$parent_file  = 'edit.php';
    57 	$parent_file  = 'edit.php';
    58 	$submenu_file = "edit-tags.php?taxonomy=$taxonomy";
    58 	$submenu_file = "edit-tags.php?taxonomy=$taxonomy";
    59 }
    59 }
    60 
    60 
    61 get_current_screen()->set_screen_reader_content( array(
    61 get_current_screen()->set_screen_reader_content(
    62 	'heading_pagination' => $tax->labels->items_list_navigation,
    62 	array(
    63 	'heading_list'       => $tax->labels->items_list,
    63 		'heading_pagination' => $tax->labels->items_list_navigation,
    64 ) );
    64 		'heading_list'       => $tax->labels->items_list,
       
    65 	)
       
    66 );
    65 wp_enqueue_script( 'admin-tags' );
    67 wp_enqueue_script( 'admin-tags' );
    66 require_once( ABSPATH . 'wp-admin/admin-header.php' );
    68 require_once( ABSPATH . 'wp-admin/admin-header.php' );
    67 include( ABSPATH . 'wp-admin/edit-tag-form.php' );
    69 include( ABSPATH . 'wp-admin/edit-tag-form.php' );
    68 include( ABSPATH . 'wp-admin/admin-footer.php' );
    70 include( ABSPATH . 'wp-admin/admin-footer.php' );