X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0f29eadd474473203a1182f52af1aa82721cecbd..2329f698283944696a7076258cf816545970bb47:/wp-admin/edit-link-form.php diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index 5111c0b8..610240a0 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -1,239 +1,150 @@ '; + $heading = sprintf( __( 'Links / Edit Link' ), 'link-manager.php' ); + $submit_text = __('Update Link'); + $form_name = 'editlink'; $nonce_action = 'update-bookmark_' . $link_id; } else { - $editing = false; - $heading = __('Add a link:'); - $submit_text = __('Add Link »'); - $form = '
'; + $heading = sprintf( __( 'Links / Add New Link' ), 'link-manager.php' ); + $submit_text = __('Add Link'); + $form_name = 'addlink'; $nonce_action = 'add-bookmark'; } -function xfn_check($class, $value = '', $type = 'check') { - global $link; +require_once( ABSPATH . 'wp-admin/includes/meta-boxes.php' ); - $link_rel = $link->link_rel; - $rels = preg_split('/\s+/', $link_rel); +add_meta_box('linksubmitdiv', __('Save'), 'link_submit_meta_box', null, 'side', 'core'); +add_meta_box('linkcategorydiv', __('Categories'), 'link_categories_meta_box', null, 'normal', 'core'); +add_meta_box('linktargetdiv', __('Target'), 'link_target_meta_box', null, 'normal', 'core'); +add_meta_box('linkxfndiv', __('Link Relationship (XFN)'), 'link_xfn_meta_box', null, 'normal', 'core'); +add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', null, 'normal', 'core'); - if ('' != $value && in_array($value, $rels) ) { - echo ' checked="checked"'; - } +/** This action is documented in wp-admin/edit-form-advanced.php */ +do_action( 'add_meta_boxes', 'link', $link ); - if ('' == $value) { - if ('family' == $class && !strstr($link_rel, 'child') && !strstr($link_rel, 'parent') && !strstr($link_rel, 'sibling') && !strstr($link_rel, 'spouse') && !strstr($link_rel, 'kin')) echo ' checked="checked"'; - if ('friendship' == $class && !strstr($link_rel, 'friend') && !strstr($link_rel, 'acquaintance') && !strstr($link_rel, 'contact') ) echo ' checked="checked"'; - if ('geographical' == $class && !strstr($link_rel, 'co-resident') && !strstr($link_rel, 'neighbor') ) echo ' checked="checked"'; - if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"'; - } -} +/** + * Fires when link-specific meta boxes are added. + * + * @since 3.0.0 + * + * @param object $link Link object. + */ +do_action( 'add_meta_boxes_link', $link ); + +/** This action is documented in wp-admin/edit-form-advanced.php */ +do_action( 'do_meta_boxes', 'link', 'normal', $link ); +/** This action is documented in wp-admin/edit-form-advanced.php */ +do_action( 'do_meta_boxes', 'link', 'advanced', $link ); +/** This action is documented in wp-admin/edit-form-advanced.php */ +do_action( 'do_meta_boxes', 'link', 'side', $link ); +add_screen_option('layout_columns', array('max' => 2, 'default' => 2) ); + +get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

' . __( 'You can add or edit links on this screen by entering information in each of the boxes. Only the link’s web address and name (the text you want to display on your site as the link) are required fields.' ) . '

' . + '

' . __( '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’t use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.' ) . '

' . + '

' . __( 'XFN stands for XHTML Friends Network, 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.' ) . '

' +) ); + +get_current_screen()->set_help_sidebar( + '

' . __( 'For more information:' ) . '

' . + '

' . __( 'Documentation on Creating Links' ) . '

' . + '

' . __( 'Support Forums' ) . '

' +); + +require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?> -
- - -

-
- - - - - - - - - - - - - - - - - - -
link_category); ?>
-
-

- -

-
- - - - - - - - - - -
XFN Creator:') ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- -
- - -
- - - -
- - - - - - -
- - - - -
-
-
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
+

+ + + +
+

+
+ +

http://wordpress.org/ — don’t forget the http://'); ?>

+
+
+ +
+

+
+ +

+
+
+ + +
+ +
+
+ - -  

-
-
-target attribute is illegal in XHTML 1.1 and 1.0 Strict.)') ?>

-
-

- - - - - +
+ + + + - + -
- \ No newline at end of file + + + + + +