X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/9c40b4d36daed9e28e48a5fe9205c32557195a4b..85ad385665744d9cc3bcd939906309be7268edb3:/wp-admin/edit-link-form.php diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index 32b06a87..d4a38cab 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -6,6 +6,10 @@ * @subpackage Administration */ +// don't load directly +if ( !defined('ABSPATH') ) + die('-1'); + if ( ! empty($link_id) ) { $heading = sprintf( __( 'Links / Edit Link' ), 'link-manager.php' ); $submit_text = __('Update Link'); @@ -18,334 +22,58 @@ if ( ! empty($link_id) ) { $nonce_action = 'add-bookmark'; } -/** - * Display checked checkboxes attribute for xfn microformat options. - * - * @since 1.0.1 - * - * @param string $class - * @param string $value - * @param mixed $deprecated Not used. - */ -function xfn_check($class, $value = '', $deprecated = '') { - global $link; +require_once( ABSPATH . 'wp-admin/includes/meta-boxes.php' ); - $link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $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"'; - } - - if ('' == $value) { - if ('family' == $class && strpos($link_rel, 'child') === false && strpos($link_rel, 'parent') === false && strpos($link_rel, 'sibling') === false && strpos($link_rel, 'spouse') === false && strpos($link_rel, 'kin') === false) echo ' checked="checked"'; - if ('friendship' == $class && strpos($link_rel, 'friend') === false && strpos($link_rel, 'acquaintance') === false && strpos($link_rel, 'contact') === false) echo ' checked="checked"'; - if ('geographical' == $class && strpos($link_rel, 'co-resident') === false && strpos($link_rel, 'neighbor') === false) echo ' checked="checked"'; - if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"'; - } -} +/** This action is documented in wp-admin/edit-form-advanced.php */ +do_action( 'add_meta_boxes', 'link', $link ); /** - * Display link create form fields. + * Fires when link-specific meta boxes are added. * - * @since 2.7.0 + * @since 3.0.0 * - * @param object $link + * @param object $link Link object. */ -function link_submit_meta_box($link) { +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' ); ?> - - - - -
- -
- - -
-

- -
- -
-

-

-

-
-

- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- -
- - -
- - - -
- - - - - - -
- - - - -
-
-

XFN.'); ?>

- - - - - - - - - - - - - - - - - - -
  -
-
- -

+

-

+

-
+
-
- -
- -
+
-

+

- -

+ +

- -

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

+ +

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

- -

+ +

+
+
+
+
+ +
+ - -