wp/wp-admin/edit-link-form.php
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
child 9 177826044cd9
equal deleted inserted replaced
6:490d5cc509ed 7:cf61fcea0001
    55 	'id'      => 'overview',
    55 	'id'      => 'overview',
    56 	'title'   => __('Overview'),
    56 	'title'   => __('Overview'),
    57 	'content' =>
    57 	'content' =>
    58 	'<p>' . __( 'You can add or edit links on this screen by entering information in each of the boxes. Only the link&#8217;s web address and name (the text you want to display on your site as the link) are required fields.' ) . '</p>' .
    58 	'<p>' . __( 'You can add or edit links on this screen by entering information in each of the boxes. Only the link&#8217;s web address and name (the text you want to display on your site as the link) are required fields.' ) . '</p>' .
    59 	'<p>' . __( 'The boxes for link name, web address, and description have fixed positions, while the others may be repositioned using drag and drop. You can also hide boxes you don&#8217;t use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.' ) . '</p>' .
    59 	'<p>' . __( 'The boxes for link name, web address, and description have fixed positions, while the others may be repositioned using drag and drop. You can also hide boxes you don&#8217;t use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.' ) . '</p>' .
    60 	'<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/" target="_blank">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>'
    60 	'<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>'
    61 ) );
    61 ) );
    62 
    62 
    63 get_current_screen()->set_help_sidebar(
    63 get_current_screen()->set_help_sidebar(
    64 	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
    64 	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
    65 	'<p>' . __( '<a href="https://codex.wordpress.org/Links_Add_New_Screen" target="_blank">Documentation on Creating Links</a>' ) . '</p>' .
    65 	'<p>' . __( '<a href="https://codex.wordpress.org/Links_Add_New_Screen">Documentation on Creating Links</a>' ) . '</p>' .
    66 	'<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
    66 	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
    67 );
    67 );
    68 
    68 
    69 require_once( ABSPATH . 'wp-admin/admin-header.php' );
    69 require_once( ABSPATH . 'wp-admin/admin-header.php' );
    70 ?>
    70 ?>
    71 
    71 
    72 <div class="wrap">
    72 <div class="wrap">
    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></h2>
    73 <h1 class="wp-heading-inline"><?php
       
    74 echo esc_html( $title );
       
    75 ?></h1>
       
    76 
       
    77 <a href="link-add.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'link' ); ?></a>
       
    78 
       
    79 <hr class="wp-header-end">
    74 
    80 
    75 <?php if ( isset( $_GET['added'] ) ) : ?>
    81 <?php if ( isset( $_GET['added'] ) ) : ?>
    76 <div id="message" class="updated notice is-dismissible"><p><?php _e('Link added.'); ?></p></div>
    82 <div id="message" class="updated notice is-dismissible"><p><?php _e('Link added.'); ?></p></div>
    77 <?php endif; ?>
    83 <?php endif; ?>
    78 
    84 
    89 <div id="poststuff">
    95 <div id="poststuff">
    90 
    96 
    91 <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
    97 <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
    92 <div id="post-body-content">
    98 <div id="post-body-content">
    93 <div id="namediv" class="stuffbox">
    99 <div id="namediv" class="stuffbox">
    94 <h3><label for="link_name"><?php _ex('Name', 'link name') ?></label></h3>
   100 <h2><label for="link_name"><?php _ex( 'Name', 'link name' ) ?></label></h2>
    95 <div class="inside">
   101 <div class="inside">
    96 	<input type="text" name="link_name" size="30" maxlength="255" value="<?php echo esc_attr($link->link_name); ?>" id="link_name" />
   102 	<input type="text" name="link_name" size="30" maxlength="255" value="<?php echo esc_attr($link->link_name); ?>" id="link_name" />
    97 	<p><?php _e('Example: Nifty blogging software'); ?></p>
   103 	<p><?php _e('Example: Nifty blogging software'); ?></p>
    98 </div>
   104 </div>
    99 </div>
   105 </div>
   100 
   106 
   101 <div id="addressdiv" class="stuffbox">
   107 <div id="addressdiv" class="stuffbox">
   102 <h3><label for="link_url"><?php _e('Web Address') ?></label></h3>
   108 <h2><label for="link_url"><?php _e( 'Web Address' ) ?></label></h2>
   103 <div class="inside">
   109 <div class="inside">
   104 	<input type="text" name="link_url" size="30" maxlength="255" class="code" value="<?php echo esc_attr($link->link_url); ?>" id="link_url" />
   110 	<input type="text" name="link_url" size="30" maxlength="255" class="code" value="<?php echo esc_attr($link->link_url); ?>" id="link_url" />
   105 	<p><?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?></p>
   111 	<p><?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?></p>
   106 </div>
   112 </div>
   107 </div>
   113 </div>
   108 
   114 
   109 <div id="descriptiondiv" class="stuffbox">
   115 <div id="descriptiondiv" class="stuffbox">
   110 <h3><label for="link_description"><?php _e('Description') ?></label></h3>
   116 <h2><label for="link_description"><?php _e( 'Description' ) ?></label></h2>
   111 <div class="inside">
   117 <div class="inside">
   112 	<input type="text" name="link_description" size="30" maxlength="255" value="<?php echo isset($link->link_description) ? esc_attr($link->link_description) : ''; ?>" id="link_description" />
   118 	<input type="text" name="link_description" size="30" maxlength="255" value="<?php echo isset($link->link_description) ? esc_attr($link->link_description) : ''; ?>" id="link_description" />
   113 	<p><?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?></p>
   119 	<p><?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?></p>
   114 </div>
   120 </div>
   115 </div>
   121 </div>