Changeset 3999

Show
Ignore:
Timestamp:
07/06/06 04:27:45 (3 years ago)
Author:
matt
Message:

Some renames

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-functions.php

    r3985 r3999  
    637637function dropdown_categories($default = 0) { 
    638638    write_nested_categories(get_nested_categories($default)); 
     639} 
     640 
     641function 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 
     646function 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 
     681function dropdown_link_categories($default = 0) { 
     682    write_nested_categories(get_nested_link_categories($default)); 
    639683} 
    640684 
     
    770814        return false; 
    771815    } 
    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"); 
    777816} 
    778817 
  • trunk/wp-admin/admin-header.php

    r3788 r3999  
    3131<h1><?php echo wptexturize(get_settings(('blogname'))); ?> <span>(<a href="<?php echo get_settings('home') . '/'; ?>"><?php _e('View site &raquo;') ?></a>)</span></h1> 
    3232</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> 
    3434 
    3535<?php 
  • trunk/wp-admin/edit-form-advanced.php

    r3921 r3999  
    9090 
    9191<fieldset id="passworddiv" class="dbx-box"> 
    92 <h3 class="dbx-handle"><?php _e('Password-Protect Post') ?></h3>  
     92<h3 class="dbx-handle"><?php _e('Post Password') ?></h3>  
    9393<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div> 
    9494</fieldset> 
  • trunk/wp-admin/edit-link-form.php

    r3978 r3999  
    11<?php 
    22if ( ! empty($link_id) ) { 
    3     $heading = __('Edit Bookmark'); 
     3    $heading = __('Edit Link'); 
    44    $submit_text = __('Save Changes &raquo;'); 
    55    $form = '<form name="editlink" id="editlink" method="post" action="link.php">'; 
    66    $nonce_action = 'update-bookmark_' . $link_id; 
    77} else { 
    8     $heading = __('Create Bookmark'); 
    9     $submit_text = __('Add Bookmark &raquo;'); 
     8    $heading = __('Add Link'); 
     9    $submit_text = __('Add Link &raquo;'); 
    1010    $form = '<form name="addlink" id="addlink" method="post" action="link.php">'; 
    1111    $nonce_action = 'add-bookmark'; 
     
    4444<div class="dbx-content"> 
    4545<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> 
    4747</div> 
    4848</fieldset> 
     
    8080<table class="editform" width="100%" cellspacing="2" cellpadding="5"> 
    8181<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> 
    8484</tr> 
    8585<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> 
    8888</tr> 
    8989<tr> 
     
    217217<table class="editform" width="100%" cellspacing="2" cellpadding="5"> 
    218218    <tr> 
    219         <th width="20%" scope="row"><?php _e('Image URI:') ?></th> 
     219        <th width="20%" scope="row"><?php _e('Image Address:') ?></th> 
    220220        <td width="80%"><input type="text" name="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td> 
    221221    </tr> 
    222222    <tr> 
    223         <th scope="row"><?php _e('RSS URI:') ?> </th> 
     223        <th scope="row"><?php _e('RSS Address:') ?> </th> 
    224224        <td><input name="link_rss" type="text" id="rss_uri" value="<?php echo $link->link_rss; ?>" size="50" style="width: 95%" /></td> 
    225225    </tr> 
  • trunk/wp-admin/edit-page-form.php

    r3983 r3999  
    7070 
    7171<fieldset id="passworddiv" class="dbx-box"> 
    72 <h3 class="dbx-handle"><?php _e('Password-Protect Page') ?></h3>  
     72<h3 class="dbx-handle"><?php _e('Page Password') ?></h3>  
    7373<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div> 
    7474</fieldset> 
  • trunk/wp-admin/link-add.php

    r3946 r3999  
    1919 
    2020<?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> 
    2222<?php endif; ?> 
    2323 
     
    2828 
    2929<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&#8217;re on to your bookmarks! Right now this only works on Mozilla or Netscape, but we&#8217;re working on it.</p>'), "javascript:void(linkmanpopup=window.open('" . get_settings('siteurl') . "/wp-admin/link-add.php?action=popup&amp;linkurl='+escape(location.href)+'&amp;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&#8217;re on to your bookmarks! Right now this only works on Mozilla or Netscape, but we&#8217;re working on it.</p>'), "javascript:void(linkmanpopup=window.open('" . get_settings('siteurl') . "/wp-admin/link-add.php?action=popup&amp;linkurl='+escape(location.href)+'&amp;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();") ?> 
    3131</div> 
    3232 
  • trunk/wp-admin/link-manager.php

    r3985 r3999  
    7474<div class="wrap"> 
    7575 
    76 <h2><?php _e('Bookmark Management'); ?></h2> 
     76<h2><?php _e('Blogroll Management'); ?></h2> 
    7777<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&#8217;s called a &#8220;blogroll.&#8221;'); ?></p> 
    7878<form id="cats" method="get" action=""> 
     
    8686<?php endforeach; ?> 
    8787</select> 
    88 bookmarks ordered by  
     88links ordered by  
    8989<select name="order_by"> 
    9090<option value="order_id" <?php if ($order_by == 'order_id') echo " selected='selected'";?>><?php _e('Bookmark ID') ?></option> 
    9191<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> 
    9393</select> 
    9494<input type="submit" name="action" value="<?php _e('Update &raquo;') ?>" /></p> 
  • trunk/wp-admin/menu.php

    r3985 r3999  
    1616    $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php'); 
    1717 
    18 $menu[20] = array(__('Bookmarks'), 'manage_links', 'link-manager.php'); 
     18$menu[20] = array(__('Blogroll'), 'manage_links', 'link-manager.php'); 
    1919$menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php'); 
    2020$menu[30] = array(__('Plugins'), 'activate_plugins', 'plugins.php'); 
     
    3939$submenu['edit.php'][40] = array(__('Export'), 'import', 'export.php'); 
    4040 
    41 $submenu['link-manager.php'][5] = array(__('Manage Bookmarks'), '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'); 
    4444 
    4545if ( current_user_can('edit_users') ) { 
  • trunk/wp-admin/profile.php

    r3857 r3999  
    2828<input type="hidden" name="checkuser_id" value="<?php echo $user_ID ?>" /> 
    2929</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'); ?> 
    3037 
    3138<fieldset> 
     
    111118<br clear="all" /> 
    112119 
    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  
    120120  <table width="99%"  border="0" cellspacing="2" cellpadding="3" class="editform"> 
    121121    <?php