From b835332cd039f09892665c7baa220d43b7902096 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Thu, 6 Jan 2005 09:46:52 +0000 Subject: [PATCH] Fixes to XFN creator git-svn-id: http://svn.automattic.com/wordpress/trunk@2051 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/link-add.php | 215 +++++++++++++++++++++----------------- wp-admin/link-manager.php | 80 +++++++------- 2 files changed, 157 insertions(+), 138 deletions(-) diff --git a/wp-admin/link-add.php b/wp-admin/link-add.php index 5a3615e78..729ca5db8 100644 --- a/wp-admin/link-add.php +++ b/wp-admin/link-add.php @@ -22,6 +22,22 @@ function category_dropdown($fieldname, $selected = 0) { echo "\n\n"; } +function xfn_check($class, $value = '', $type = 'check') { + global $link_rel; + $rels = preg_split('/\s+/', $link_rel); + + if ('' != $value && in_array($value, $rels) ) { + echo ' checked="checked"'; + } + + 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"'; + } +} + $wpvarstoreset = array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', @@ -82,106 +98,109 @@ require('admin-header.php'); - - + + - - + +
XFN Creator:') ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
-
- -
- - -
- - - - - - -
- - - -
-
XFN Creator:') ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ +
+ + +
+ + + +
family + + + + + + +
+ + + + +
+
diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index b99c8db4b..0ace6c72a 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -346,86 +346,86 @@ switch ($action) { - - - - + + + + -