Changeset 2051
- Timestamp:
- 01/06/2005 09:46:52 AM (20 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/link-add.php
r1940 r2051 21 21 } 22 22 echo "\n</select>\n"; 23 } 24 25 function xfn_check($class, $value = '', $type = 'check') { 26 global $link_rel; 27 $rels = preg_split('/\s+/', $link_rel); 28 29 if ('' != $value && in_array($value, $rels) ) { 30 echo ' checked="checked"'; 31 } 32 33 if ('' == $value) { 34 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"'; 35 if ('friendship' == $class && !strstr($link_rel, 'friend') && !strstr($link_rel, 'acquaintance') && !strstr($link_rel, 'contact') ) echo ' checked="checked"'; 36 if ('geographical' == $class && !strstr($link_rel, 'co-resident') && !strstr($link_rel, 'neighbor') ) echo ' checked="checked"'; 37 if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"'; 38 } 23 39 } 24 40 … … 83 99 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 84 100 <tr> 85 86 <td width="67%"><input type="text" name="rel" id="rel" size="50" value=" " /></td>101 <th width="33%" scope="row"><?php _e('rel:') ?></th> 102 <td width="67%"><input type="text" name="rel" id="rel" size="50" value="<?php echo $link_rel; ?>" /></td> 87 103 </tr> 88 104 <tr> 89 <th scope="row"><?php _e('<a href="http://gmpg.org/xfn/">XFN</a> Creator:') ?></th> 90 <td><table cellpadding="3" cellspacing="5"> 91 <tr> 92 <th scope="row"> <?php _e('friendship') ?> </th> 93 <td> 94 <label for="label1"> 95 <input class="valinp" type="radio" name="friendship" value="acquaintance" id="label1" /> 96 <?php _e('acquaintance') ?></label> 97 <label for="label2"> 98 <input class="valinp" type="radio" name="friendship" value="contact" id="label2" /> 99 <?php _e('contact') ?></label> 100 <label for="label3"> 101 <input class="valinp" type="radio" name="friendship" value="friend" id="label3" /> 102 <?php _e('friend') ?></label> 103 <label for="label4"> 104 <input class="valinp" type="radio" name="friendship" value="" id="label4" /> 105 <?php _e('none') ?></label> 106 </td> 107 </tr> 108 <tr> 109 <th scope="row"> <?php _e('physical') ?> </th> 110 <td><label for="label10"> 111 <input class="valinp" type="checkbox" name="physical" value="met" id="label10" /> 112 <?php _e('met') ?></label> 113 </td> 114 </tr> 115 <tr> 116 <th scope="row"> <?php _e('professional') ?> </th> 117 <td><label for="label20"> 118 <input class="valinp" type="checkbox" name="professional" value="co-worker" id="label20" /> 119 <?php _e('co-worker') ?></label> 120 <label for="label21"> 121 <input class="valinp" type="checkbox" name="professional" value="colleague" id="label21" /> 122 <?php _e('colleague') ?></label> 123 </td> 124 </tr> 125 <tr> 126 <th scope="row"> <?php _e('geographical') ?> </th> 127 <td><label for="label30"> 128 <input class="valinp" type="radio" name="geographical" value="co-resident" id="label30" /> 129 <?php _e('co-resident') ?></label> 130 <label for="label31"> 131 <input class="valinp" type="radio" name="geographical" value="neighbor" id="label31" /> 132 <?php _e('neighbor') ?></label> 133 <label for="label32"> 134 <input class="valinp" type="radio" name="geographical" value="" id="label32" /> 135 <?php _e('none') ?></label> 136 </td> 137 </tr> 138 <tr> 139 <th scope="row"> <?php _e('family') ?> </th> 140 <td> 141 <label for="label40"> 142 <input class="valinp" type="radio" name="family" value="child" id="label40" /> 143 <?php _e('child') ?></label> 144 <label for="label41"> 145 <input class="valinp" type="radio" name="family" value="kin" id="label41" /> 146 <?php _e('kin') ?></label> 147 <label for="label42"> 148 <input class="valinp" type="radio" name="family" value="parent" id="label42" /> 149 <?php _e('parent') ?></label> 150 <label for="label43"> 151 <input class="valinp" type="radio" name="family" value="sibling" id="label43" /> 152 <?php _e('sibling') ?></label> 153 <label for="label44"> 154 <input class="valinp" type="radio" name="family" value="spouse" id="label44" /> 155 <?php _e('spouse') ?></label> 156 <label for="label45"> 157 <input class="valinp" type="radio" name="family" value="" id="label45" /> 158 <?php _e('none') ?></label> 159 </td> 160 </tr> 161 <tr> 162 <th scope="row"> <?php _e('romantic') ?> </th> 163 <td><label for="label50"> 164 <input class="valinp" type="checkbox" name="romantic" value="muse" id="label50" /> 165 <?php _e('muse') ?></label> 166 <label for="label51"> 167 <input class="valinp" type="checkbox" name="romantic" value="crush" id="label51" /> 168 <?php _e('crush') ?></label> 169 <label for="label52"> 170 <input class="valinp" type="checkbox" name="romantic" value="date" id="label42" /> 171 <?php _e('date') ?></label> 172 <label for="label53"> 173 <input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="label53" /> 174 <?php _e('sweetheart') ?></label> 175 </td> 176 </tr> 177 <tr> 178 <th scope="row"> <?php _e('identity') ?> </th> 179 <td><label for="label60"> 180 <input class="valinp" type="checkbox" name="identity" value="me" id="label60" /> 181 <?php _e('me') ?></label> 182 </td> 183 </tr> 184 </table></td> 105 <th scope="row"><?php _e('<a href="http://gmpg.org/xfn/">XFN</a> Creator:') ?></th> 106 <td> 107 <table cellpadding="3" cellspacing="5"> 108 <tr> 109 <th scope="row"> <?php _e('identity') ?> </th> 110 <td> 111 <label for="me"> 112 <input type="checkbox" name="identity" value="me" id="me" <?php xfn_check('identity', 'me'); ?> /> 113 <?php _e('another web address of mine') ?></label> 114 </td> 115 </tr> 116 <tr> 117 <th scope="row"> <?php _e('friendship') ?> </th> 118 <td> 119 <label for="acquaintance"> 120 <input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance', 'radio'); ?> /> <?php _e('acquaintance') ?></label> 121 <label for="contact"> 122 <input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact', 'radio'); ?> /> <?php _e('contact') ?></label> 123 <label id="friend"> 124 <input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend', 'radio'); ?> /> <?php _e('friend') ?></label> 125 <label for="friendship"> 126 <input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship', '', 'radio'); ?> /> <?php _e('none') ?></label> 127 </td> 128 </tr> 129 <tr> 130 <th scope="row"> <?php _e('physical') ?> </th> 131 <td> 132 <label for="met"> 133 <input class="valinp" type="checkbox" name="physical" value="met" id="met" <?php xfn_check('physical', 'met'); ?> /> 134 <?php _e('met') ?></label> 135 </td> 136 </tr> 137 <tr> 138 <th scope="row"> <?php _e('professional') ?> </th> 139 <td> 140 <label for="co-worker"> 141 <input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" <?php xfn_check('professional', 'co-worker'); ?> /> 142 <?php _e('co-worker') ?></label> 143 <label for="colleague"> 144 <input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" <?php xfn_check('professional', 'colleague'); ?> /> 145 <?php _e('colleague') ?></label> 146 </td> 147 </tr> 148 <tr> 149 <th scope="row"> <?php _e('geographical') ?> </th> 150 <td> 151 <label for="co-resident"> 152 <input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident', 'radio'); ?> /> 153 <?php _e('co-resident') ?></label> 154 <label for="neighbor"> 155 <input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor', 'radio'); ?> /> 156 <?php _e('neighbor') ?></label> 157 <label for="geographical"> 158 <input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical', '', 'radio'); ?> /> 159 <?php _e('none') ?></label> 160 </td> 161 </tr> 162 <tr> 163 <th scope="row"> family </th> 164 <td> 165 <label for="child"> 166 <input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child', 'radio'); ?> /> 167 <?php _e('child') ?></label> 168 <label for="kin"> 169 <input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin', 'radio'); ?> /> 170 <?php _e('kin') ?></label> 171 <label for="parent"> 172 <input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent', 'radio'); ?> /> 173 <?php _e('parent') ?></label> 174 <label for="sibling"> 175 <input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling', 'radio'); ?> /> 176 <?php _e('sibling') ?></label> 177 <label for="spouse"> 178 <input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse', 'radio'); ?> /> 179 <?php _e('spouse') ?></label> 180 <label for="family"> 181 <input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family', '', 'radio'); ?> /> 182 <?php _e('none') ?></label> 183 </td> 184 </tr> 185 <tr> 186 <th scope="row"> <?php _e('romantic') ?> </th> 187 <td> 188 <label for="muse"> 189 <input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" <?php xfn_check('romantic', 'muse'); ?> /> 190 <?php _e('muse') ?></label> 191 <label for="crush"> 192 <input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" <?php xfn_check('romantic', 'crush'); ?> /> 193 <?php _e('crush') ?></label> 194 <label for="date"> 195 <input class="valinp" type="checkbox" name="romantic" value="date" id="date" <?php xfn_check('romantic', 'date'); ?> /> 196 <?php _e('date') ?></label> 197 <label for="romantic"> 198 <input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="romantic" <?php xfn_check('romantic', 'sweetheart'); ?> /> 199 <?php _e('sweetheart') ?></label> 200 </td> 201 </tr> 202 </table> 203 </td> 185 204 </tr> 186 205 </table> -
trunk/wp-admin/link-manager.php
r1961 r2051 347 347 <th scope="row"> <?php _e('friendship') ?> </th> 348 348 <td> 349 <label for=" label">350 <input class="valinp" type="radio" name="friendship" value="acquaintance" id=" label" <?php xfn_check('friendship', 'acquaintance', 'radio'); ?> /> <?php _e('acquaintance') ?></label>351 <label for=" label2">352 <input class="valinp" type="radio" name="friendship" value="contact" id=" label2" <?php xfn_check('friendship', 'contact', 'radio'); ?> /> <?php _e('contact') ?></label>353 <label for="label3">354 <input class="valinp" type="radio" name="friendship" value="friend" id=" label3" <?php xfn_check('friendship', 'friend', 'radio'); ?> /> <?php _e('friend') ?></label>355 <label for=" label4">356 <input name="friendship" type="radio" class="valinp" id="label4" value="" <?php xfn_check('friendship', '', 'radio'); ?> /> <?php _e('none') ?></label>349 <label for="acquaintance"> 350 <input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance', 'radio'); ?> /> <?php _e('acquaintance') ?></label> 351 <label for="contact"> 352 <input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact', 'radio'); ?> /> <?php _e('contact') ?></label> 353 <label id="friend"> 354 <input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend', 'radio'); ?> /> <?php _e('friend') ?></label> 355 <label for="friendship"> 356 <input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship', '', 'radio'); ?> /> <?php _e('none') ?></label> 357 357 </td> 358 358 </tr> … … 360 360 <th scope="row"> <?php _e('physical') ?> </th> 361 361 <td> 362 <label for=" label10">363 <input class="valinp" type="checkbox" name="physical" value="met" id=" label10" <?php xfn_check('physical', 'met'); ?> />362 <label for="met"> 363 <input class="valinp" type="checkbox" name="physical" value="met" id="met" <?php xfn_check('physical', 'met'); ?> /> 364 364 <?php _e('met') ?></label> 365 365 </td> … … 368 368 <th scope="row"> <?php _e('professional') ?> </th> 369 369 <td> 370 <label for=" label20">371 <input class="valinp" type="checkbox" name="professional" value="co-worker" id=" label20" <?php xfn_check('professional', 'co-worker'); ?> />370 <label for="co-worker"> 371 <input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" <?php xfn_check('professional', 'co-worker'); ?> /> 372 372 <?php _e('co-worker') ?></label> 373 <label for=" label21">374 <input class="valinp" type="checkbox" name="professional" value="colleague" id=" label21" <?php xfn_check('professional', 'colleague'); ?> />373 <label for="colleague"> 374 <input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" <?php xfn_check('professional', 'colleague'); ?> /> 375 375 <?php _e('colleague') ?></label> 376 376 </td> … … 379 379 <th scope="row"> <?php _e('geographical') ?> </th> 380 380 <td> 381 <label for=" label30">382 <input class="valinp" type="radio" name="geographical" value="co-resident" id=" label30" <?php xfn_check('geographical', 'co-resident', 'radio'); ?> />381 <label for="co-resident"> 382 <input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident', 'radio'); ?> /> 383 383 <?php _e('co-resident') ?></label> 384 <label for=" label31">385 <input class="valinp" type="radio" name="geographical" value="neighbor" id=" label31" <?php xfn_check('geographical', 'neighbor', 'radio'); ?> />384 <label for="neighbor"> 385 <input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor', 'radio'); ?> /> 386 386 <?php _e('neighbor') ?></label> 387 <label for=" label32">388 <input class="valinp" type="radio" name="geographical" value="" id=" label32" <?php xfn_check('geographical', '', 'radio'); ?> />387 <label for="geographical"> 388 <input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical', '', 'radio'); ?> /> 389 389 <?php _e('none') ?></label> 390 390 </td> … … 393 393 <th scope="row"> family </th> 394 394 <td> 395 <label for=" label40">396 <input class="valinp" type="radio" name="family" value="child" id=" label40" <?php xfn_check('family', 'child', 'radio'); ?> />395 <label for="child"> 396 <input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child', 'radio'); ?> /> 397 397 <?php _e('child') ?></label> 398 <label for=" label41">399 <input class="valinp" type="radio" name="family" value="kin" id=" label41" <?php xfn_check('family', 'kin', 'radio'); ?> />398 <label for="kin"> 399 <input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin', 'radio'); ?> /> 400 400 <?php _e('kin') ?></label> 401 <label for=" label42">402 <input class="valinp" type="radio" name="family" value="parent" id=" label42" <?php xfn_check('family', 'parent', 'radio'); ?> />401 <label for="parent"> 402 <input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent', 'radio'); ?> /> 403 403 <?php _e('parent') ?></label> 404 <label for=" label43">405 <input class="valinp" type="radio" name="family" value="sibling" id=" label43" <?php xfn_check('family', 'sibling', 'radio'); ?> />404 <label for="sibling"> 405 <input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling', 'radio'); ?> /> 406 406 <?php _e('sibling') ?></label> 407 <label for=" label44">408 <input class="valinp" type="radio" name="family" value="spouse" id=" label44" <?php xfn_check('family', 'spouse', 'radio'); ?> />407 <label for="spouse"> 408 <input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse', 'radio'); ?> /> 409 409 <?php _e('spouse') ?></label> 410 <label for=" label45">411 <input class="valinp" type="radio" name="family" value="" id=" label45" <?php xfn_check('family', '', 'radio'); ?> />410 <label for="family"> 411 <input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family', '', 'radio'); ?> /> 412 412 <?php _e('none') ?></label> 413 413 </td> … … 416 416 <th scope="row"> <?php _e('romantic') ?> </th> 417 417 <td> 418 <label for=" label50">419 <input class="valinp" type="checkbox" name="romantic" value="muse" id=" label50" <?php xfn_check('romantic', 'muse'); ?> />418 <label for="muse"> 419 <input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" <?php xfn_check('romantic', 'muse'); ?> /> 420 420 <?php _e('muse') ?></label> 421 <label for=" label51">422 <input class="valinp" type="checkbox" name="romantic" value="crush" id=" label51" <?php xfn_check('romantic', 'crush'); ?> />421 <label for="crush"> 422 <input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" <?php xfn_check('romantic', 'crush'); ?> /> 423 423 <?php _e('crush') ?></label> 424 <label for=" label52">425 <input class="valinp" type="checkbox" name="romantic" value="date" id=" label52" <?php xfn_check('romantic', 'date'); ?> />424 <label for="date"> 425 <input class="valinp" type="checkbox" name="romantic" value="date" id="date" <?php xfn_check('romantic', 'date'); ?> /> 426 426 <?php _e('date') ?></label> 427 <label for=" label53">428 <input class="valinp" type="checkbox" name="romantic" value="sweetheart" id=" label53" <?php xfn_check('romantic', 'sweetheart'); ?> />427 <label for="romantic"> 428 <input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="romantic" <?php xfn_check('romantic', 'sweetheart'); ?> /> 429 429 <?php _e('sweetheart') ?></label> 430 430 </td>
Note: See TracChangeset
for help on using the changeset viewer.