Changeset 3999
- Timestamp:
- 07/06/2006 04:27:45 AM (19 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r3985 r3999 637 637 function dropdown_categories($default = 0) { 638 638 write_nested_categories(get_nested_categories($default)); 639 } 640 641 function return_link_categories_list($parent = 0) { 642 global $wpdb; 643 return $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND link_count > 0"); 644 } 645 646 function get_nested_link_categories( $default = 0, $parent = 0 ) { 647 global $post_ID, $link_id, $mode, $wpdb; 648 649 if ($link_id) { 650 $checked_categories = $wpdb->get_col(" 651 SELECT category_id 652 FROM $wpdb->categories, $wpdb->link2cat 653 WHERE $wpdb->link2cat.category_id = cat_ID AND $wpdb->link2cat.link_id = '$link_id' 654 "); 655 656 if (count($checked_categories) == 0) { 657 // No selected categories, strange 658 $checked_categories[] = $default; 659 } 660 } else { 661 $checked_categories[] = $default; 662 } 663 664 $cats = return_link_categories_list($parent); 665 $result = array (); 666 667 if (is_array($cats)) { 668 foreach ($cats as $cat) { 669 $result[$cat]['children'] = get_nested_link_categories($default, $cat); 670 $result[$cat]['cat_ID'] = $cat; 671 $result[$cat]['checked'] = in_array($cat, $checked_categories); 672 $result[$cat]['cat_name'] = get_the_category_by_ID($cat); 673 } 674 } 675 676 usort($result, 'sort_cats'); 677 678 return $result; 679 } 680 681 function dropdown_link_categories($default = 0) { 682 write_nested_categories(get_nested_link_categories($default)); 639 683 } 640 684 … … 770 814 return false; 771 815 } 772 }773 774 function return_link_categories_list($parent = 0) {775 global $wpdb;776 return $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent ORDER BY link_count DESC");777 816 } 778 817 -
trunk/wp-admin/admin-header.php
r3788 r3999 31 31 <h1><?php echo wptexturize(get_settings(('blogname'))); ?> <span>(<a href="<?php echo get_settings('home') . '/'; ?>"><?php _e('View site »') ?></a>)</span></h1> 32 32 </div> 33 <div id="user_info"><p><?php printf(__('Howdy, <strong>%s</strong>.'), $user_identity) ?> [<a href="<?php echo get_settings('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>, <a href="profile.php"><?php _e('My Account'); ?></a>] </p></div>33 <div id="user_info"><p><?php printf(__('Howdy, <strong>%s</strong>.'), $user_identity) ?> [<a href="<?php echo get_settings('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>, <a href="profile.php"><?php _e('My Profile'); ?></a>] </p></div> 34 34 35 35 <?php -
trunk/wp-admin/edit-form-advanced.php
r3921 r3999 90 90 91 91 <fieldset id="passworddiv" class="dbx-box"> 92 <h3 class="dbx-handle"><?php _e('P assword-Protect Post') ?></h3>92 <h3 class="dbx-handle"><?php _e('Post Password') ?></h3> 93 93 <div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div> 94 94 </fieldset> -
trunk/wp-admin/edit-link-form.php
r3978 r3999 1 1 <?php 2 2 if ( ! empty($link_id) ) { 3 $heading = __('Edit Bookmark');3 $heading = __('Edit Link'); 4 4 $submit_text = __('Save Changes »'); 5 5 $form = '<form name="editlink" id="editlink" method="post" action="link.php">'; 6 6 $nonce_action = 'update-bookmark_' . $link_id; 7 7 } else { 8 $heading = __(' Create Bookmark');9 $submit_text = __('Add Bookmark »');8 $heading = __('Add Link'); 9 $submit_text = __('Add Link »'); 10 10 $form = '<form name="addlink" id="addlink" method="post" action="link.php">'; 11 11 $nonce_action = 'add-bookmark'; … … 44 44 <div class="dbx-content"> 45 45 <p id="jaxcat"></p> 46 <ul id="categorychecklist"><?php dropdown_ categories(get_settings('default_link_category')); ?></ul>46 <ul id="categorychecklist"><?php dropdown_link_categories(get_settings('default_link_category')); ?></ul> 47 47 </div> 48 48 </fieldset> … … 80 80 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 81 81 <tr> 82 <th width="20%" scope="row" valign="top"><label for="link_url"><?php _e('URI:') ?></label></th>83 <td width="80%"><input type="text" name="link_url" value="<?php echo $link->link_url; ?>" style="width: 95%" /></td>82 <th scope="row" valign="top"><label for="link_name"><?php _e('Name:') ?></label></th> 83 <td><input type="text" name="link_name" value="<?php echo $link->link_name; ?>" style="width: 95%" /></td> 84 84 </tr> 85 85 <tr> 86 <th scope="row" valign="top"><label for="link_name"><?php _e('Name:') ?></label></th>87 <td ><input type="text" name="link_name" value="<?php echo $link->link_name; ?>" style="width: 95%" /></td>86 <th width="20%" scope="row" valign="top"><label for="link_url"><?php _e('Address:') ?></label></th> 87 <td width="80%"><input type="text" name="link_url" value="<?php echo $link->link_url; if ( empty( $link->link_url ) ) echo 'http://'; ?>" style="width: 95%" /></td> 88 88 </tr> 89 89 <tr> … … 217 217 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 218 218 <tr> 219 <th width="20%" scope="row"><?php _e('Image URI:') ?></th>219 <th width="20%" scope="row"><?php _e('Image Address:') ?></th> 220 220 <td width="80%"><input type="text" name="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td> 221 221 </tr> 222 222 <tr> 223 <th scope="row"><?php _e('RSS URI:') ?> </th>223 <th scope="row"><?php _e('RSS Address:') ?> </th> 224 224 <td><input name="link_rss" type="text" id="rss_uri" value="<?php echo $link->link_rss; ?>" size="50" style="width: 95%" /></td> 225 225 </tr> -
trunk/wp-admin/edit-page-form.php
r3983 r3999 70 70 71 71 <fieldset id="passworddiv" class="dbx-box"> 72 <h3 class="dbx-handle"><?php _e('Pa ssword-Protect Page') ?></h3>72 <h3 class="dbx-handle"><?php _e('Page Password') ?></h3> 73 73 <div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div> 74 74 </fieldset> -
trunk/wp-admin/link-add.php
r3946 r3999 19 19 20 20 <?php if ($_GET['added']) : ?> 21 <div id="message" class="updated fade"><p><?php _e(' Bookmark added.'); ?></p></div>21 <div id="message" class="updated fade"><p><?php _e('Link added.'); ?></p></div> 22 22 <?php endif; ?> 23 23 … … 28 28 29 29 <div class="wrap"> 30 <?php printf(__('<p>You can drag <a href="%s" title=" Bookmark add bookmarklet">Link This</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you’re on to your bookmarks! Right now this only works on Mozilla or Netscape, but we’re working on it.</p>'), "javascript:void(linkmanpopup=window.open('" . get_settings('siteurl') . "/wp-admin/link-add.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?>30 <?php printf(__('<p>You can drag <a href="%s" title="Link add bookmarklet">Link This</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you’re on to your bookmarks! Right now this only works on Mozilla or Netscape, but we’re working on it.</p>'), "javascript:void(linkmanpopup=window.open('" . get_settings('siteurl') . "/wp-admin/link-add.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?> 31 31 </div> 32 32 -
trunk/wp-admin/link-manager.php
r3985 r3999 74 74 <div class="wrap"> 75 75 76 <h2><?php _e('B ookmarkManagement'); ?></h2>76 <h2><?php _e('Blogroll Management'); ?></h2> 77 77 <p><?php _e('Here you add links to sites that you visit often and share them on your blog. When you have a list of links in your sidebar to other blogs, it’s called a “blogroll.”'); ?></p> 78 78 <form id="cats" method="get" action=""> … … 86 86 <?php endforeach; ?> 87 87 </select> 88 bookmarks ordered by88 links ordered by 89 89 <select name="order_by"> 90 90 <option value="order_id" <?php if ($order_by == 'order_id') echo " selected='selected'";?>><?php _e('Bookmark ID') ?></option> 91 91 <option value="order_name" <?php if ($order_by == 'order_name') echo " selected='selected'";?>><?php _e('Name') ?></option> 92 <option value="order_url" <?php if ($order_by == 'order_url') echo " selected='selected'";?>><?php _e(' URI') ?></option>92 <option value="order_url" <?php if ($order_by == 'order_url') echo " selected='selected'";?>><?php _e('Address') ?></option> 93 93 </select> 94 94 <input type="submit" name="action" value="<?php _e('Update »') ?>" /></p> -
trunk/wp-admin/menu.php
r3985 r3999 16 16 $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php'); 17 17 18 $menu[20] = array(__('B ookmarks'), 'manage_links', 'link-manager.php');18 $menu[20] = array(__('Blogroll'), 'manage_links', 'link-manager.php'); 19 19 $menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php'); 20 20 $menu[30] = array(__('Plugins'), 'activate_plugins', 'plugins.php'); … … 39 39 $submenu['edit.php'][40] = array(__('Export'), 'import', 'export.php'); 40 40 41 $submenu['link-manager.php'][5] = array(__('Manage B ookmarks'), 'manage_links', 'link-manager.php');42 $submenu['link-manager.php'][10] = array(__('Add Bookmark'), 'manage_links', 'link-add.php');43 $submenu['link-manager.php'][20] = array(__('Import Bookmarks'), 'manage_links', 'link-import.php');41 $submenu['link-manager.php'][5] = array(__('Manage Blogroll'), 'manage_links', 'link-manager.php'); 42 $submenu['link-manager.php'][10] = array(__('Add Link'), 'manage_links', 'link-add.php'); 43 $submenu['link-manager.php'][20] = array(__('Import Links'), 'manage_links', 'link-import.php'); 44 44 45 45 if ( current_user_can('edit_users') ) { -
trunk/wp-admin/profile.php
r3857 r3999 28 28 <input type="hidden" name="checkuser_id" value="<?php echo $user_ID ?>" /> 29 29 </p> 30 31 <h3><?php _e('Personal Options'); ?></h3> 32 33 <p><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', get_user_option('rich_editing')); ?> /> 34 <?php _e('Use the visual editor when writing') ?></label></p> 35 36 <?php do_action('profile_personal_options'); ?> 30 37 31 38 <fieldset> … … 111 118 <br clear="all" /> 112 119 113 <h3><?php _e('Personal Options'); ?></h3>114 115 <p><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', get_user_option('rich_editing')); ?> />116 <?php _e('Use the visual rich editor when writing') ?></label></p>117 118 <?php do_action('profile_personal_options'); ?>119 120 120 <table width="99%" border="0" cellspacing="2" cellpadding="3" class="editform"> 121 121 <?php
Note: See TracChangeset
for help on using the changeset viewer.