Some renames
git-svn-id: https://develop.svn.wordpress.org/trunk@3999 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c3ce93fbb4
commit
4ec0249ac2
@ -638,6 +638,50 @@ function dropdown_categories($default = 0) {
|
|||||||
write_nested_categories(get_nested_categories($default));
|
write_nested_categories(get_nested_categories($default));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function return_link_categories_list($parent = 0) {
|
||||||
|
global $wpdb;
|
||||||
|
return $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND link_count > 0");
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_nested_link_categories( $default = 0, $parent = 0 ) {
|
||||||
|
global $post_ID, $link_id, $mode, $wpdb;
|
||||||
|
|
||||||
|
if ($link_id) {
|
||||||
|
$checked_categories = $wpdb->get_col("
|
||||||
|
SELECT category_id
|
||||||
|
FROM $wpdb->categories, $wpdb->link2cat
|
||||||
|
WHERE $wpdb->link2cat.category_id = cat_ID AND $wpdb->link2cat.link_id = '$link_id'
|
||||||
|
");
|
||||||
|
|
||||||
|
if (count($checked_categories) == 0) {
|
||||||
|
// No selected categories, strange
|
||||||
|
$checked_categories[] = $default;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$checked_categories[] = $default;
|
||||||
|
}
|
||||||
|
|
||||||
|
$cats = return_link_categories_list($parent);
|
||||||
|
$result = array ();
|
||||||
|
|
||||||
|
if (is_array($cats)) {
|
||||||
|
foreach ($cats as $cat) {
|
||||||
|
$result[$cat]['children'] = get_nested_link_categories($default, $cat);
|
||||||
|
$result[$cat]['cat_ID'] = $cat;
|
||||||
|
$result[$cat]['checked'] = in_array($cat, $checked_categories);
|
||||||
|
$result[$cat]['cat_name'] = get_the_category_by_ID($cat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
usort($result, 'sort_cats');
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function dropdown_link_categories($default = 0) {
|
||||||
|
write_nested_categories(get_nested_link_categories($default));
|
||||||
|
}
|
||||||
|
|
||||||
// Dandy new recursive multiple category stuff.
|
// Dandy new recursive multiple category stuff.
|
||||||
function cat_rows($parent = 0, $level = 0, $categories = 0) {
|
function cat_rows($parent = 0, $level = 0, $categories = 0) {
|
||||||
global $wpdb, $class;
|
global $wpdb, $class;
|
||||||
@ -771,11 +815,6 @@ function wp_dropdown_cats($currentcat = 0, $currentparent = 0, $parent = 0, $lev
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function return_link_categories_list($parent = 0) {
|
|
||||||
global $wpdb;
|
|
||||||
return $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent ORDER BY link_count DESC");
|
|
||||||
}
|
|
||||||
|
|
||||||
function wp_create_thumbnail($file, $max_side, $effect = '') {
|
function wp_create_thumbnail($file, $max_side, $effect = '') {
|
||||||
|
|
||||||
// 1 = GIF, 2 = JPEG, 3 = PNG
|
// 1 = GIF, 2 = JPEG, 3 = PNG
|
||||||
|
@ -30,7 +30,7 @@ function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}el
|
|||||||
<div id="wphead">
|
<div id="wphead">
|
||||||
<h1><?php echo wptexturize(get_settings(('blogname'))); ?> <span>(<a href="<?php echo get_settings('home') . '/'; ?>"><?php _e('View site »') ?></a>)</span></h1>
|
<h1><?php echo wptexturize(get_settings(('blogname'))); ?> <span>(<a href="<?php echo get_settings('home') . '/'; ?>"><?php _e('View site »') ?></a>)</span></h1>
|
||||||
</div>
|
</div>
|
||||||
<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>
|
<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>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
require(ABSPATH . '/wp-admin/menu-header.php');
|
require(ABSPATH . '/wp-admin/menu-header.php');
|
||||||
|
@ -89,7 +89,7 @@ addLoadEvent(focusit);
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset id="passworddiv" class="dbx-box">
|
<fieldset id="passworddiv" class="dbx-box">
|
||||||
<h3 class="dbx-handle"><?php _e('Password-Protect Post') ?></h3>
|
<h3 class="dbx-handle"><?php _e('Post Password') ?></h3>
|
||||||
<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div>
|
<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
if ( ! empty($link_id) ) {
|
if ( ! empty($link_id) ) {
|
||||||
$heading = __('Edit Bookmark');
|
$heading = __('Edit Link');
|
||||||
$submit_text = __('Save Changes »');
|
$submit_text = __('Save Changes »');
|
||||||
$form = '<form name="editlink" id="editlink" method="post" action="link.php">';
|
$form = '<form name="editlink" id="editlink" method="post" action="link.php">';
|
||||||
$nonce_action = 'update-bookmark_' . $link_id;
|
$nonce_action = 'update-bookmark_' . $link_id;
|
||||||
} else {
|
} else {
|
||||||
$heading = __('Create Bookmark');
|
$heading = __('Add Link');
|
||||||
$submit_text = __('Add Bookmark »');
|
$submit_text = __('Add Link »');
|
||||||
$form = '<form name="addlink" id="addlink" method="post" action="link.php">';
|
$form = '<form name="addlink" id="addlink" method="post" action="link.php">';
|
||||||
$nonce_action = 'add-bookmark';
|
$nonce_action = 'add-bookmark';
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ function xfn_check($class, $value = '', $type = 'check') {
|
|||||||
<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
|
<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
|
||||||
<div class="dbx-content">
|
<div class="dbx-content">
|
||||||
<p id="jaxcat"></p>
|
<p id="jaxcat"></p>
|
||||||
<ul id="categorychecklist"><?php dropdown_categories(get_settings('default_link_category')); ?></ul>
|
<ul id="categorychecklist"><?php dropdown_link_categories(get_settings('default_link_category')); ?></ul>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
@ -79,14 +79,14 @@ function xfn_check($class, $value = '', $type = 'check') {
|
|||||||
|
|
||||||
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
|
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="20%" scope="row" valign="top"><label for="link_url"><?php _e('URI:') ?></label></th>
|
|
||||||
<td width="80%"><input type="text" name="link_url" value="<?php echo $link->link_url; ?>" style="width: 95%" /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row" valign="top"><label for="link_name"><?php _e('Name:') ?></label></th>
|
<th scope="row" valign="top"><label for="link_name"><?php _e('Name:') ?></label></th>
|
||||||
<td><input type="text" name="link_name" value="<?php echo $link->link_name; ?>" style="width: 95%" /></td>
|
<td><input type="text" name="link_name" value="<?php echo $link->link_name; ?>" style="width: 95%" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th width="20%" scope="row" valign="top"><label for="link_url"><?php _e('Address:') ?></label></th>
|
||||||
|
<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>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<th scope="row" valign="top"><label for="link_description"><?php _e('Description:') ?></label></th>
|
<th scope="row" valign="top"><label for="link_description"><?php _e('Description:') ?></label></th>
|
||||||
<td><input type="text" name="link_description" value="<?php echo $link->link_description; ?>" style="width: 95%" /></td>
|
<td><input type="text" name="link_description" value="<?php echo $link->link_description; ?>" style="width: 95%" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -216,11 +216,11 @@ function xfn_check($class, $value = '', $type = 'check') {
|
|||||||
<div class="dbx-content">
|
<div class="dbx-content">
|
||||||
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
|
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="20%" scope="row"><?php _e('Image URI:') ?></th>
|
<th width="20%" scope="row"><?php _e('Image Address:') ?></th>
|
||||||
<td width="80%"><input type="text" name="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td>
|
<td width="80%"><input type="text" name="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e('RSS URI:') ?> </th>
|
<th scope="row"><?php _e('RSS Address:') ?> </th>
|
||||||
<td><input name="link_rss" type="text" id="rss_uri" value="<?php echo $link->link_rss; ?>" size="50" style="width: 95%" /></td>
|
<td><input name="link_rss" type="text" id="rss_uri" value="<?php echo $link->link_rss; ?>" size="50" style="width: 95%" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -69,7 +69,7 @@ addLoadEvent(focusit);
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset id="passworddiv" class="dbx-box">
|
<fieldset id="passworddiv" class="dbx-box">
|
||||||
<h3 class="dbx-handle"><?php _e('Password-Protect Page') ?></h3>
|
<h3 class="dbx-handle"><?php _e('Page Password') ?></h3>
|
||||||
<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div>
|
<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ require('admin-header.php');
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ($_GET['added']) : ?>
|
<?php if ($_GET['added']) : ?>
|
||||||
<div id="message" class="updated fade"><p><?php _e('Bookmark added.'); ?></p></div>
|
<div id="message" class="updated fade"><p><?php _e('Link added.'); ?></p></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -27,7 +27,7 @@ require('admin-header.php');
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?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();") ?>
|
<?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();") ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -73,7 +73,7 @@ if ( isset($_GET['deleted']) ) {
|
|||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
|
|
||||||
<h2><?php _e('Bookmark Management'); ?></h2>
|
<h2><?php _e('Blogroll Management'); ?></h2>
|
||||||
<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>
|
<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>
|
||||||
<form id="cats" method="get" action="">
|
<form id="cats" method="get" action="">
|
||||||
<p>Currently showing
|
<p>Currently showing
|
||||||
@ -85,11 +85,11 @@ if ( isset($_GET['deleted']) ) {
|
|||||||
</option>
|
</option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
bookmarks ordered by
|
links ordered by
|
||||||
<select name="order_by">
|
<select name="order_by">
|
||||||
<option value="order_id" <?php if ($order_by == 'order_id') echo " selected='selected'";?>><?php _e('Bookmark ID') ?></option>
|
<option value="order_id" <?php if ($order_by == 'order_id') echo " selected='selected'";?>><?php _e('Bookmark ID') ?></option>
|
||||||
<option value="order_name" <?php if ($order_by == 'order_name') echo " selected='selected'";?>><?php _e('Name') ?></option>
|
<option value="order_name" <?php if ($order_by == 'order_name') echo " selected='selected'";?>><?php _e('Name') ?></option>
|
||||||
<option value="order_url" <?php if ($order_by == 'order_url') echo " selected='selected'";?>><?php _e('URI') ?></option>
|
<option value="order_url" <?php if ($order_by == 'order_url') echo " selected='selected'";?>><?php _e('Address') ?></option>
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" name="action" value="<?php _e('Update »') ?>" /></p>
|
<input type="submit" name="action" value="<?php _e('Update »') ?>" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
@ -15,7 +15,7 @@ if ( strstr($_SERVER['REQUEST_URI'], 'page-new.php') )
|
|||||||
else
|
else
|
||||||
$menu[10] = array(__('Manage'), 'edit_posts', 'edit.php');
|
$menu[10] = array(__('Manage'), 'edit_posts', 'edit.php');
|
||||||
|
|
||||||
$menu[20] = array(__('Bookmarks'), 'manage_links', 'link-manager.php');
|
$menu[20] = array(__('Blogroll'), 'manage_links', 'link-manager.php');
|
||||||
$menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php');
|
$menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php');
|
||||||
$menu[30] = array(__('Plugins'), 'activate_plugins', 'plugins.php');
|
$menu[30] = array(__('Plugins'), 'activate_plugins', 'plugins.php');
|
||||||
if ( current_user_can('edit_users') )
|
if ( current_user_can('edit_users') )
|
||||||
@ -38,9 +38,9 @@ $submenu['edit.php'][30] = array(__('Files'), 'edit_files', 'templates.php');
|
|||||||
$submenu['edit.php'][35] = array(__('Import'), 'import', 'import.php');
|
$submenu['edit.php'][35] = array(__('Import'), 'import', 'import.php');
|
||||||
$submenu['edit.php'][40] = array(__('Export'), 'import', 'export.php');
|
$submenu['edit.php'][40] = array(__('Export'), 'import', 'export.php');
|
||||||
|
|
||||||
$submenu['link-manager.php'][5] = array(__('Manage Bookmarks'), 'manage_links', 'link-manager.php');
|
$submenu['link-manager.php'][5] = array(__('Manage Blogroll'), 'manage_links', 'link-manager.php');
|
||||||
$submenu['link-manager.php'][10] = array(__('Add Bookmark'), 'manage_links', 'link-add.php');
|
$submenu['link-manager.php'][10] = array(__('Add Link'), 'manage_links', 'link-add.php');
|
||||||
$submenu['link-manager.php'][20] = array(__('Import Bookmarks'), 'manage_links', 'link-import.php');
|
$submenu['link-manager.php'][20] = array(__('Import Links'), 'manage_links', 'link-import.php');
|
||||||
|
|
||||||
if ( current_user_can('edit_users') ) {
|
if ( current_user_can('edit_users') ) {
|
||||||
$submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php');
|
$submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php');
|
||||||
|
@ -28,6 +28,13 @@ $bookmarklet_height= 440;
|
|||||||
<input type="hidden" name="checkuser_id" value="<?php echo $user_ID ?>" />
|
<input type="hidden" name="checkuser_id" value="<?php echo $user_ID ?>" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<h3><?php _e('Personal Options'); ?></h3>
|
||||||
|
|
||||||
|
<p><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', get_user_option('rich_editing')); ?> />
|
||||||
|
<?php _e('Use the visual editor when writing') ?></label></p>
|
||||||
|
|
||||||
|
<?php do_action('profile_personal_options'); ?>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><?php _e('Name'); ?></legend>
|
<legend><?php _e('Name'); ?></legend>
|
||||||
<p><label><?php _e('Username: (no editing)'); ?><br />
|
<p><label><?php _e('Username: (no editing)'); ?><br />
|
||||||
@ -110,13 +117,6 @@ if ( $show_password_fields ) :
|
|||||||
|
|
||||||
<br clear="all" />
|
<br clear="all" />
|
||||||
|
|
||||||
<h3><?php _e('Personal Options'); ?></h3>
|
|
||||||
|
|
||||||
<p><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', get_user_option('rich_editing')); ?> />
|
|
||||||
<?php _e('Use the visual rich editor when writing') ?></label></p>
|
|
||||||
|
|
||||||
<?php do_action('profile_personal_options'); ?>
|
|
||||||
|
|
||||||
<table width="99%" border="0" cellspacing="2" cellpadding="3" class="editform">
|
<table width="99%" border="0" cellspacing="2" cellpadding="3" class="editform">
|
||||||
<?php
|
<?php
|
||||||
if(count($profileuser->caps) > count($profileuser->roles)):
|
if(count($profileuser->caps) > count($profileuser->roles)):
|
||||||
|
Loading…
Reference in New Issue
Block a user