wp/wp-admin/link-manager.php
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
equal deleted inserted replaced
4:346c88efed21 5:5e2f62d02dcd
    55     '<p>' . __('If you delete a link, it will be removed permanently, as Links do not have a Trash function yet.') . '</p>'
    55     '<p>' . __('If you delete a link, it will be removed permanently, as Links do not have a Trash function yet.') . '</p>'
    56 ) );
    56 ) );
    57 
    57 
    58 get_current_screen()->set_help_sidebar(
    58 get_current_screen()->set_help_sidebar(
    59 	'<p><strong>' . __('For more information:') . '</strong></p>' .
    59 	'<p><strong>' . __('For more information:') . '</strong></p>' .
    60 	'<p>' . __('<a href="http://codex.wordpress.org/Links_Screen" target="_blank">Documentation on Managing Links</a>') . '</p>' .
    60 	'<p>' . __('<a href="https://codex.wordpress.org/Links_Screen" target="_blank">Documentation on Managing Links</a>') . '</p>' .
    61 	'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    61 	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    62 );
    62 );
    63 
    63 
    64 include_once( ABSPATH . 'wp-admin/admin-header.php' );
    64 include_once( ABSPATH . 'wp-admin/admin-header.php' );
    65 
    65 
    66 if ( ! current_user_can('manage_links') )
    66 if ( ! current_user_can('manage_links') )
    67 	wp_die(__("You do not have sufficient permissions to edit the links for this site."));
    67 	wp_die(__("You do not have sufficient permissions to edit the links for this site."));
    68 
    68 
    69 ?>
    69 ?>
    70 
    70 
    71 <div class="wrap nosubsub">
    71 <div class="wrap nosubsub">
    72 <?php screen_icon(); ?>
       
    73 <h2><?php echo esc_html( $title ); ?> <a href="link-add.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a> <?php
    72 <h2><?php echo esc_html( $title ); ?> <a href="link-add.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a> <?php
    74 if ( !empty($_REQUEST['s']) )
    73 if ( !empty($_REQUEST['s']) )
    75 	printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( wp_unslash($_REQUEST['s']) ) ); ?>
    74 	printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( wp_unslash($_REQUEST['s']) ) ); ?>
    76 </h2>
    75 </h2>
    77 
    76 
    78 <?php
    77 <?php
    79 if ( isset($_REQUEST['deleted']) ) {
    78 if ( isset($_REQUEST['deleted']) ) {
    80 	echo '<div id="message" class="updated"><p>';
    79 	echo '<div id="message" class="updated notice is-dismissible"><p>';
    81 	$deleted = (int) $_REQUEST['deleted'];
    80 	$deleted = (int) $_REQUEST['deleted'];
    82 	printf(_n('%s link deleted.', '%s links deleted', $deleted), $deleted);
    81 	printf(_n('%s link deleted.', '%s links deleted', $deleted), $deleted);
    83 	echo '</p></div>';
    82 	echo '</p></div>';
    84 	$_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']);
    83 	$_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']);
    85 }
    84 }
    86 ?>
    85 ?>
    87 
    86 
    88 <form id="posts-filter" action="" method="get">
    87 <form id="posts-filter" method="get">
    89 
    88 
    90 <?php $wp_list_table->search_box( __( 'Search Links' ), 'link' ); ?>
    89 <?php $wp_list_table->search_box( __( 'Search Links' ), 'link' ); ?>
    91 
    90 
    92 <?php $wp_list_table->display(); ?>
    91 <?php $wp_list_table->display(); ?>
    93 
    92