Strip trailing whites.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-05-03 20:26:11 +00:00
parent ebff7d7c0f
commit 7b7243d94a
45 changed files with 325 additions and 325 deletions

View File

@ -134,7 +134,7 @@ case 'imgedit-preview' :
case 'menu-quick-search':
if ( ! current_user_can( 'switch_themes' ) )
die('-1');
require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
_wp_ajax_menu_quick_search( $_REQUEST );
@ -399,7 +399,7 @@ case 'delete-link' :
case 'delete-menu-item' :
$menu_item_id = (int) $_POST['menu-item'];
check_admin_referer( 'delete-menu_item_' . $menu_item_id );
if ( ! current_user_can( 'switch_themes' ) )
if ( ! current_user_can( 'switch_themes' ) )
die('-1');
if ( is_nav_menu_item( $menu_item_id ) && wp_delete_post( $menu_item_id, true ) )
@ -827,12 +827,12 @@ case 'add-menu-item' :
$menu_id = (int) $_POST['menu'];
if ( isset( $_POST['menu-item'] ) ) {
$item_ids = wp_save_nav_menu_item( $menu_id, $_POST['menu-item'] );
if ( is_wp_error( $item_ids ) )
if ( is_wp_error( $item_ids ) )
die('-1');
} else {
$item_ids = array();
}
foreach ( (array) $item_ids as $menu_item_id ) {
$menu_obj = get_post( $menu_item_id );
if ( ! empty( $menu_obj->ID ) ) {
@ -847,7 +847,7 @@ case 'add-menu-item' :
'context' => 'backend',
'link_after' => '',
'link_before' => '',
'walker' => new Walker_Nav_Menu_Edit,
'walker' => new Walker_Nav_Menu_Edit,
);
echo walk_nav_menu_tree( $menu_items, 0, (object) $args );
}
@ -1093,7 +1093,7 @@ case 'hidden-columns' :
case 'menu-quick-search':
if ( ! current_user_can( 'switch_themes' ) )
die('-1');
require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
_wp_ajax_menu_quick_search( $_REQUEST );

View File

@ -9,8 +9,8 @@
font-size: 16px;
}
#dashboard_right_now div.musubtable {
border-top: none;
#dashboard_right_now div.musubtable {
border-top: none;
}
/* No drag and drop on ms-sites.php */

View File

@ -1,14 +1,14 @@
.howto span {
float: right;
.howto span {
float: right;
}
.menu-item-textbox {
float: left;
.menu-item-textbox {
float: left;
}
.add-to-menu {
float: left;
.add-to-menu {
float: left;
}
.menu-item-title input[type="checkbox"] {
margin-left: 3px;
margin-left: 3px;
}
.menu li dl dt {
padding-left: 0;
@ -16,17 +16,17 @@
}
.menu li ul li {
margin-left: 0;
margin-right: 20px;
margin-right: 20px;
}
.menu li .item-title {
.menu li .item-title {
margin-right: 0;
margin-left: 18em;
margin-left: 18em;
}
.item-controls {
.item-controls {
right: auto;
left: 15px;
left: 15px;
}
.item-type {
padding-right: 0;
padding-left: 10px;
padding-left: 10px;
}

View File

@ -55,12 +55,12 @@ body {
#menu-management .menu-edit {
margin-bottom: 20px;
}
#nav-menu-header, #post-body {
border-color: #ccc;
border-style: solid;
}
#nav-menu-header {
background: url("../images/gray-grad.png") repeat-x scroll left top #dfdfdf;
border-width: 1px 1px 0 1px;
@ -73,7 +73,7 @@ body {
-khtml-border-top-right-radius: 6px;
border-top-right-radius: 6px;
}
#post-body {
background: #fff;
padding:0 0 10px 10px;
@ -87,11 +87,11 @@ body {
-khtml-border-bottom-right-radius: 6px;
border-bottom-right-radius: 6px;
}
#post-body-content {
position: relative;
}
.post-body-plain {
padding: 10px 10px 0 0;
}
@ -99,9 +99,9 @@ body {
#menu-management .menu-add-new abbr {
font-weight:bold;
}
/* Menu Tabs */
#menu-management .nav-tabs-nav {
margin: 0 20px;
}
@ -162,12 +162,12 @@ body {
text-align: right;
padding: 0 10px 3px 10px;
margin-bottom: 5px;
}
}
#select-nav-menu {
width: 100px;
display: inline;
}
/* Menu Toolbar */
#menu-management #major-publishing-actions #delete-action {
float: right;
@ -184,7 +184,7 @@ body {
#wpbody .open-label span {
padding-right: 10px;
}
.js .input-with-default-title {
color: #aaa;
font-style: italic;
@ -210,7 +210,7 @@ body {
/* Button Secondary Actions */
.list-controls { float: left; margin-top: 5px; }
.add-to-menu {
.add-to-menu {
float: right;
}
@ -265,7 +265,7 @@ body {
.menu ul { width: 100%; }
.menu ul.sub-menu {
}
.menu li {
.menu li {
margin-bottom: 0;
}
.menu li dl {
@ -276,12 +276,12 @@ body {
}
.menu li dl dt {
background: url("../images/gray-grad.png") repeat-x scroll left top #DFDFDF;
border: 1px solid #E6E6E6;
border: 1px solid #E6E6E6;
clear:both;
position: relative;
position: relative;
padding-left: 10px;
height: auto;
width: 400px;
width: 400px;
line-height: 35px;
text-shadow: 0 1px 0 #FFFFFF;
font-weight:bold;
@ -289,7 +289,7 @@ body {
}
.menu li dl.menu-item-edit-inactive dt {
border-radius: 6px;
-webkit-border-radius: 6px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
-khtml-border-radius: 6px;
}
@ -311,7 +311,7 @@ body {
background-color:#faa;
}
.menu li .item-title {
.menu li .item-title {
padding: 7px 0;
line-height: 20px;
display:block;
@ -424,9 +424,9 @@ body.js .item-order {
font-size: 11px;
color: #777;
font-style: italic;
border: 1px solid #dfdfdf;
border: 1px solid #dfdfdf;
border-radius: 6px;
-webkit-border-radius: 6px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
-khtml-border-radius: 6px;
}

View File

@ -316,7 +316,7 @@ h3.tb {
font-size: 12px;
margin: 1px;
}
.category-add select {
width: 100%;
-x-system-font: none;

View File

@ -2014,11 +2014,11 @@ input#link_url {
}
div.tabs-panel-active {
display:block;
display:block;
}
div.tabs-panel-inactive {
display:none;
display:none;
}
#post-body .categorydiv div.tabs-panel,

View File

@ -154,7 +154,7 @@ class Custom_Background {
<tr valign="top">
<th scope="row"><?php _e('Current Image'); ?></th>
<td>
<style type="text/css">
<style type="text/css">
#custom-background-image {
background-color: #<?php echo get_background_color()?>;
<?php if ( get_background_image() ) { ?>
@ -164,7 +164,7 @@ class Custom_Background {
background-attachment: <?php echo get_theme_mod('background_position', 'fixed'); ?>;
<?php } ?>
}
</style>
</style>
<div id="custom-background-image">
<?php if ( get_background_image() ) { ?>
<img class="custom-background-image" src="<?php echo get_theme_mod('background_image_thumb', ''); ?>" style="visibility:hidden;" /><br />

View File

@ -641,7 +641,7 @@ function _unzip_file_ziparchive($file, $to, $needed_dirs = array() ) {
continue;
if ( '__MACOSX/' === substr($info['name'], 0, 9) ) // Don't extract the OS X-created __MACOSX directory files
continue;
continue;
$contents = $z->getFromIndex($i);
if ( false === $contents )
@ -685,9 +685,9 @@ function _unzip_file_pclzip($file, $to, $needed_dirs = array()) {
// Determine any children directories needed (From within the archive)
foreach ( $archive_files as $file ) {
if ( '__MACOSX/' === substr($file['filename'], 0, 9) ) // Skip the OS X-created __MACOSX directory
if ( '__MACOSX/' === substr($file['filename'], 0, 9) ) // Skip the OS X-created __MACOSX directory
continue;
$needed_dirs[] = $to . untrailingslashit( $file['folder'] ? $file['filename'] : dirname($file['filename']) );
}

View File

@ -2160,7 +2160,7 @@ function type_url_form_file() {
function _insert_into_post_button($type) {
if ( !post_type_supports(get_post_type($_GET['post_id']), 'editor') )
return '';
if ( 'image' == $type )
return '
<tr>
@ -2168,7 +2168,7 @@ function _insert_into_post_button($type) {
<td>
<input type="button" class="button" id="go_button" style="color:#bbb;" onclick="addExtImage.insert()" value="' . esc_attr__('Insert into Post') . '" />
</td>
</tr>
</tr>
';
return '

View File

@ -248,7 +248,7 @@ function post_tags_meta_box($post, $box) {
$help_hint = isset( $taxonomy->help_hint ) ? $taxonomy->help_hint : __('Add new tag');
$help_nojs = isset( $taxonomy->help_nojs ) ? $taxonomy->help_nojs : __('Add or remove tags');
$help_cloud = isset( $taxonomy->help_cloud ) ? $taxonomy->help_cloud : __('Choose from the most used tags in %s');
$disabled = !current_user_can($taxonomy->assign_cap) ? 'disabled="disabled"' : '';
?>
<div class="tagsdiv" id="<?php echo $tax_name; ?>">

View File

@ -452,7 +452,7 @@ function display_space_usage() {
/* translators: Gigabytes */
$space .= __( 'GB' );
} else {
/* translators: Megabytes */
/* translators: Megabytes */
$space .= __( 'MB' );
}
?>
@ -546,7 +546,7 @@ function refresh_user_details( $id ) {
function format_code_lang( $code = '' ) {
$code = strtolower( substr( $code, 0, 2 ) );
$lang_codes = array(
$lang_codes = array(
'aa' => 'Afar', 'ab' => 'Abkhazian', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'ba' => 'Bashkir', 'bm' => 'Bambara', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali',
'bh' => 'Bihari', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan; Valencian', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'zh' => 'Chinese', 'cu' => 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic', 'cv' => 'Chuvash', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree',
'cs' => 'Czech', 'da' => 'Danish', 'dv' => 'Divehi; Dhivehi; Maldivian', 'nl' => 'Dutch; Flemish', 'dz' => 'Dzongkha', 'en' => 'English', 'eo' => 'Esperanto', 'et' => 'Estonian', 'ee' => 'Ewe', 'fo' => 'Faroese', 'fj' => 'Fijjian', 'fi' => 'Finnish', 'fr' => 'French', 'fy' => 'Western Frisian', 'ff' => 'Fulah', 'ka' => 'Georgian', 'de' => 'German', 'gd' => 'Gaelic; Scottish Gaelic',
@ -630,7 +630,7 @@ function mu_dropdown_languages( $lang_files = array(), $current = '' ) {
if ( $code_lang == 'en_US' ) { // American English
$flag = true;
$ae = __( 'American English' );
$ae = __( 'American English' );
$output[$ae] = '<option value="' . esc_attr( $code_lang ) . '"' . selected( $current, $code_lang ) . '> ' . $ae . '</option>';
} elseif ( $code_lang == 'en_GB' ) { // British English
$flag = true;

View File

@ -16,7 +16,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
* @param int $depth Depth of page.
*/
function start_lvl(&$output, $depth) {}
/**
* @see Walker_Nav_Menu::end_lvl()
* @since 3.0.0
@ -25,7 +25,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
* @param int $depth Depth of page.
*/
function end_lvl(&$output, $depth) {}
/**
* @see Walker::start_el()
* @since 3.0.0
@ -49,7 +49,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
'page-tab',
'_wpnonce',
);
$original_title = '';
if ( 'taxonomy' == $item->type ) {
$original_title = get_term_field( 'name', $item->object_id, $item->object, 'raw' );
@ -59,7 +59,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
}
?>
<li id="menu-item-<?php echo $item_id; ?>" class="menu-item menu-item-depth-<?php echo $depth; ?> menu-item-<?php echo strtolower(esc_attr( $item->append )); ?>">
<dl class="<?php
<dl class="<?php
if ( isset($_GET['edit-menu-item']) && $item_id == $_GET['edit-menu-item'] )
echo 'menu-item-edit-active';
else
@ -71,44 +71,44 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
<span class="item-type"><?php echo esc_html( $item->append ); ?></span>
<span class="item-order">
<a href="<?php
echo wp_nonce_url(
echo wp_nonce_url(
add_query_arg(
array(
'action' => 'move-up-menu-item',
'action' => 'move-up-menu-item',
'menu-item' => $item_id,
),
remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
),
'move-item'
);
remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
),
'move-item'
);
?>" class="item-move-up"><abbr title="<?php esc_attr_e('Move up'); ?>">&#8593;</abbr></a>
|
<a href="<?php
echo wp_nonce_url(
echo wp_nonce_url(
add_query_arg(
array(
'action' => 'move-down-menu-item',
'action' => 'move-down-menu-item',
'menu-item' => $item_id,
),
remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
),
remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
),
'move-item'
);
);
?>" class="item-move-down"><abbr title="<?php esc_attr_e('Move down'); ?>">&#8595;</abbr></a>
</span>
<a class="item-edit" id="edit-<?php echo $item_id; ?>" title="<?php _e('Edit Menu Item'); ?>" href="<?php
echo add_query_arg('edit-menu-item', $item_id, remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) );
<a class="item-edit" id="edit-<?php echo $item_id; ?>" title="<?php _e('Edit Menu Item'); ?>" href="<?php
echo add_query_arg('edit-menu-item', $item_id, remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) );
?>#menu-item-settings-<?php echo $item_id; ?>">Edit Menu Item</a>
</span>
</dt>
</dl>
<div class="menu-item-settings <?php
<div class="menu-item-settings <?php
if ( isset($_GET['edit-menu-item']) && $item_id == $_GET['edit-menu-item'] )
echo 'menu-item-edit-active';
else
echo 'menu-item-edit-inactive';
?>" id="menu-item-settings-<?php echo $item_id; ?>">
?>" id="menu-item-settings-<?php echo $item_id; ?>">
<?php if( 'custom' == $item->type ) : ?>
<p class="field-url description description-wide">
<label for="edit-menu-item-url-<?php echo $item_id; ?>">
@ -157,11 +157,11 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
<span class="description"><?php _e('The description will be displayed in the menu if the current theme supports it.'); ?></span>
</label>
</p>
<span class="menu-item-actions description-wide submitbox">
<?php if( 'custom' != $item->type ) : ?>
<p class="link-to-original"><?php
_e('Original ');
_e('Original ');
echo esc_html( $item->append );
echo ":"; ?>
<a href="<?php echo esc_attr( $item->url ); ?>">
@ -169,20 +169,20 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
</a>
</p>
<?php endif; ?>
<a class="item-delete submitdelete deletion" id="delete-<?php echo $item_id; ?>" href="<?php
<a class="item-delete submitdelete deletion" id="delete-<?php echo $item_id; ?>" href="<?php
echo wp_nonce_url(
add_query_arg(
array(
'action' => 'delete-menu-item',
'menu-item' => $item_id,
),
remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
),
'delete-menu_item_' . $item_id
); ?>"><?php _e('Remove'); ?></a> | <a class="item-close submitclose" id="close-<?php echo $item_id; ?>" href=""><?php _e('Close'); ?></a>
<input class="button-primary save-menu-item" name="save_menu_item" type="submit" value="<?php esc_attr_e('Save Menu Item'); ?>" />
</span>
<input class="menu-item-data-append" type="hidden" name="menu-item-append[<?php echo $item_id; ?>]" value="<?php echo $item->append; ?>" />
<input class="menu-item-data-db-id" type="hidden" name="menu-item-db-id[<?php echo $item_id; ?>]" value="<?php echo $item_id; ?>" />
<input class="menu-item-data-object-id" type="hidden" name="menu-item-object-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object_id ); ?>" />
@ -190,7 +190,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
<input class="menu-item-data-parent-id" type="hidden" name="menu-item-parent-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->post_parent ); ?>" />
<input class="menu-item-data-position" type="hidden" class="menu-item-position" name="menu-item-position[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_order ); ?>" />
<input class="menu-item-data-type" type="hidden" name="menu-item-type[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->type ); ?>" />
</div><!-- .menu-item-settings-->
</div><!-- .menu-item-settings-->
<ul class="menu-item-transport"></ul>
<?php
$output .= ob_get_clean();
@ -201,7 +201,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
* Prints the appropriate response to a menu quick search.
*
* @since 3.0.0
*
*
* @param array $request The unsanitized request values.
*/
function _wp_ajax_menu_quick_search( $request = array() ) {
@ -313,15 +313,15 @@ function wp_nav_menu_setup() {
add_meta_box( 'add-custom-links', __('Custom Links'), 'wp_nav_menu_item_link_meta_box', 'nav-menus', 'side', 'default' );
wp_nav_menu_post_type_meta_boxes();
wp_nav_menu_taxonomy_meta_boxes();
// Register advanced menu items (columns)
add_filter( 'manage_nav-menus_columns', 'wp_nav_menu_manage_columns');
add_filter( 'columns_prefs_header', create_function( '', "return __('Show advanced menu properties');" ));
// If first time editing, disable advanced items by default.
if( false === get_user_option( 'managenav-menuscolumnshidden' ) ) {
$user = wp_get_current_user();
@ -422,7 +422,7 @@ function wp_nav_menu_item_link_meta_box() {
}
$removed_args = array(
'action',
'action',
'customlink-tab',
'edit-menu-item',
'menu-item',
@ -476,13 +476,13 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
$pagenum = isset( $_REQUEST[$post_type_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;
$offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0;
$args = array(
'offset' => $offset,
$args = array(
'offset' => $offset,
'order' => 'ASC',
'orderby' => 'title',
'posts_per_page' => $per_page,
'post_type' => $post_type_name,
'suppress_filters' => true,
'orderby' => 'title',
'posts_per_page' => $per_page,
'post_type' => $post_type_name,
'suppress_filters' => true,
);
if ( isset( $post_type['args']->_default_query ) )
@ -511,7 +511,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
}
$parent_ids = array_unique($parent_ids);
$child_ids = array_unique($child_ids);
$missing_parents = array();
do {
foreach( (array) $missing_parents as $missing_parent_id ) {
@ -520,27 +520,27 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
$child_ids[] = $missing_parent_id;
$parent_ids[] = $missing_parent->post_parent;
}
$missing_parents = array_filter( array_diff( array_unique( $parent_ids ), array_unique( $child_ids ) ) );
} while( 0 < count( $missing_parents ) );
}
$page_links = paginate_links( array(
'base' => add_query_arg(
'base' => add_query_arg(
array(
$post_type_name . '-tab' => 'all',
'paged' => '%#%',
)
),
'format' => '',
'format' => '',
'prev_text' => __('&laquo;'),
'next_text' => __('&raquo;'),
'total' => $num_pages,
'current' => $pagenum
));
if ( !$posts )
$error = '<li id="error">'. sprintf( __( 'No %s exists' ), $post_type['args']->label ) .'</li>';
@ -554,7 +554,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
}
$removed_args = array(
'action',
'action',
'customlink-tab',
'edit-menu-item',
'menu-item',
@ -569,10 +569,10 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
<li <?php echo ( 'search' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="nav-tab-link" href="<?php echo add_query_arg($post_type_name . '-tab', 'search', remove_query_arg($removed_args)); ?>#tabs-panel-posttype-<?php echo $post_type_name; ?>-search"><?php _e('Search'); ?></a></li>
</ul>
<div class="tabs-panel <?php
<div class="tabs-panel <?php
echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
?>" id="tabs-panel-posttype-<?php echo $post_type_name; ?>-search">
<?php
<?php
if ( isset( $_REQUEST['quick-search-posttype-' . $post_type_name] ) ) {
$searched = esc_attr( $_REQUEST['quick-search-posttype-' . $post_type_name] );
$search_results = get_posts( array( 's' => $searched, 'post_type' => $post_type_name, 'fields' => 'all', 'order' => 'DESC', ) );
@ -614,7 +614,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
if ( 'all' == $current_tab && ! empty( $_REQUEST['selectall'] ) ) {
$checkbox_items = preg_replace('/(type=(.)checkbox(\2))/', '$1 checked=$2checked$2', $checkbox_items);
}
echo $checkbox_items;
?>
@ -627,7 +627,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
<p class="button-controls">
<span class="list-controls">
<a href="<?php
<a href="<?php
echo add_query_arg(
array(
$post_type_name . '-tab' => 'all',
@ -669,35 +669,35 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
$offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0;
$args = array(
'child_of' => 0,
'child_of' => 0,
'exclude' => '',
'hide_empty' => false,
'hierarchical' => 1,
'include' => '',
'include_last_update_time' => false,
'number' => $per_page,
'hide_empty' => false,
'hierarchical' => 1,
'include' => '',
'include_last_update_time' => false,
'number' => $per_page,
'offset' => $offset,
'order' => 'ASC',
'orderby' => 'name',
'orderby' => 'name',
'pad_counts' => false,
);
$num_pages = ceil( $term_count / $per_page );
$page_links = paginate_links( array(
'base' => add_query_arg(
'base' => add_query_arg(
array(
$taxonomy_name . '-tab' => 'all',
'paged' => '%#%',
)
),
'format' => '',
'format' => '',
'prev_text' => __('&laquo;'),
'next_text' => __('&raquo;'),
'total' => $num_pages,
'current' => $pagenum
));
$walker = new Walker_Nav_Menu_Checklist;
// @todo transient caching of these results with proper invalidation on updating of a tax of this type
$terms = get_terms( $taxonomy_name, $args );
@ -715,7 +715,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
}
$removed_args = array(
'action',
'action',
'customlink-tab',
'edit-menu-item',
'menu-item',
@ -740,15 +740,15 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
$args['walker'] = $walker;
echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $popular_terms), 0, (object) $args );
?>
<?php
<?php
?>
</ul>
</div><!-- /.tabs-panel -->
<div class="tabs-panel <?php
<div class="tabs-panel <?php
echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
?>" id="tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>">
<?php
<?php
if ( isset( $_REQUEST['quick-search-taxonomy-' . $taxonomy_name] ) ) {
$searched = esc_attr( $_REQUEST['quick-search-taxonomy-' . $taxonomy_name] );
$search_results = get_terms( $taxonomy_name, array( 'name__like' => $searched, 'fields' => 'all', 'orderby' => 'count', 'order' => 'DESC', 'hierarchical' => false ) );
@ -761,7 +761,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
<input type="text" class="quick-search regular-text" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" />
<input type="submit" class="quick-search-submit button-secondary" value="<?php esc_attr_e('Search'); ?>" />
</p>
<ul id="<?php echo $taxonomy_name; ?>-search-checklist" class="list:<?php echo $taxonomy_name?> categorychecklist form-no-clear">
<?php if ( ! empty( $search_results ) && ! is_wp_error( $search_results ) ) : ?>
<?php
@ -795,7 +795,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
<p class="button-controls">
<span class="list-controls">
<a href="<?php
<a href="<?php
echo add_query_arg(
array(
$taxonomy_name . '-tab' => 'all',
@ -834,12 +834,12 @@ function wp_save_nav_menu_item( $menu_id = 0, $menu_data = array() ) {
// Loop through all the menu items' POST values
foreach( (array) $menu_data as $_possible_db_id => $_item_object_data ) {
if (
if (
empty( $_item_object_data['menu-item-object-id'] ) && // checkbox is not checked
(
! isset( $_item_object_data['menu-item-type'] ) || // and item type either isn't set
(
! isset( $_item_object_data['menu-item-type'] ) || // and item type either isn't set
in_array( $_item_object_data['menu-item-url'], array( 'http://', '' ) ) || // or URL is the default
'custom' != $_item_object_data['menu-item-type'] || // or it's not a custom menu item
'custom' != $_item_object_data['menu-item-type'] || // or it's not a custom menu item
! empty( $_item_object_data['menu-item-db-id'] ) // or it *is* a custom menu item that already exists
)
) {
@ -847,7 +847,7 @@ function wp_save_nav_menu_item( $menu_id = 0, $menu_data = array() ) {
}
// if this possible menu item doesn't actually have a menu database ID yet
if (
if (
empty( $_item_object_data['menu-item-db-id'] ) ||
( 0 > $_possible_db_id ) ||
$_possible_db_id != $_item_object_data['menu-item-db-id']
@ -856,7 +856,7 @@ function wp_save_nav_menu_item( $menu_id = 0, $menu_data = array() ) {
} else {
$_actual_db_id = (int) $_item_object_data['menu-item-db-id'];
}
$args = array(
'menu-item-db-id' => ( isset( $_item_object_data['menu-item-db-id'] ) ? $_item_object_data['menu-item-db-id'] : '' ),
'menu-item-object-id' => ( isset( $_item_object_data['menu-item-object-id'] ) ? $_item_object_data['menu-item-object-id'] : '' ),
@ -885,7 +885,7 @@ function wp_save_nav_menu_item( $menu_id = 0, $menu_data = array() ) {
* Adds custom arguments to some of the meta box object types.
*
* @since 3.0.0
*
*
* @access private
*
* @param object $object The post type or taxonomy meta-object.
@ -896,7 +896,7 @@ function _wp_nav_menu_meta_box_object( $object = null ) {
// don't show media meta box
if ( 'attachment' == $object->name )
return false;
// pages should show most recent
if ( 'page' == $object->name ) {
$object->_default_query = array(
@ -919,7 +919,7 @@ function _wp_nav_menu_meta_box_object( $object = null ) {
);
}
}
return $object;
}
@ -933,16 +933,16 @@ function _wp_nav_menu_meta_box_object( $object = null ) {
*/
function wp_get_nav_menu_to_edit( $menu_item_id = 0 ) {
$menu = wp_get_nav_menu_object( $menu_item_id );
// If the menu exists, get its items.
if ( is_nav_menu( $menu ) ) {
$menu_items = wp_get_nav_menu_items( $menu->term_id, array('post_status' => 'any') );
$walker = new Walker_Nav_Menu_Edit;
$walker = new Walker_Nav_Menu_Edit;
return walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $menu_items), 0, (object) array('walker' => $walker ) );
} elseif ( is_wp_error( $menu ) ) {
return $menu;
return $menu;
}

View File

@ -1198,7 +1198,7 @@ function wp_set_post_lock( $post_id ) {
$now = time();
update_post_meta( $post->ID, '_edit_lock', $now );
update_post_meta( $post->ID, '_edit_lock', $now );
}
/**

View File

@ -897,7 +897,7 @@ function inline_edit_row( $screen ) {
<?php
if ( post_type_supports( $screen->post_type, 'title' ) ) :
if ( post_type_supports( $screen->post_type, 'title' ) ) :
if ( $bulk ) : ?>
<div id="bulk-title-div">
<div id="bulk-titles"></div>
@ -1031,7 +1031,7 @@ if ( !$bulk ) :
</select>
</label>
<?php
<?php
endif; // post_type_supports page-attributes
endif; // $post_type_object->hierarchical ?>

View File

@ -210,30 +210,30 @@ function _get_template_edit_filename($fullpath, $containingfolder) {
/**
* Check the current theme for reliance on deprecated theme compatibility
*
*
* Check to see if the current theme has all the required templates available
* from itself or its parent
* @since 3.0
* @access private
* @return nothing
*/
function _check_theme_deprecated_files() {
$files = array( );
if ( ! locate_template( array( 'header.php' ) ) )
$files[] = 'header.php';
if ( ! locate_template( array( 'footer.php' ) ) )
$files[] = 'footer.php';
if ( ! locate_template( array( 'sidebar.php' ) ) )
$files[] = 'sidebar.php';
// Only notify if both are missing as you can use one or the other
// Only notify if both are missing as you can use one or the other
if ( ! locate_template( array( 'comments.php' ) ) && ! locate_template( array( 'comments-popup.php' ) ) ) {
$files[] = 'comments.php';
$files[] = 'comments-popup.php';
}
}
if ( ! empty( $files ) ) : ?>
<div id="deprecated-files-message" class="error"><p>
<?php echo sprintf( __('The current theme is incomplete as it is missing %1$s. Please update your theme to include these files as you are currently relying on deprecated behaviour.'), implode( $files, ', ') ); ?>

View File

@ -144,19 +144,19 @@ columns = {
page: pagenow
});
},
checked : function(column) {
$('.column-' + column).show();
},
unchecked : function(column) {
$('.column-' + column).hide();
},
hidden : function() {
return $('.manage-column').filter(':hidden').map(function() { return this.id; }).get().join(',');
},
useCheckboxesForHidden : function() {
this.hidden = function(){
return $('.hide-column-tog').not(':checked').map(function() {

View File

@ -27,7 +27,7 @@ jQuery(document).ready(function() {
jQuery('select[name="background-repeat"]').change(function() {
jQuery('#custom-background-image').css('background-repeat', jQuery(this).val());
});
farbtastic = jQuery.farbtastic('#colorPickerDiv', function(color) {
pickColor(color);
});

View File

@ -10,7 +10,7 @@
var WPNavMenuHandler = function ($) {
var autoCompleteData = {},
menuItemDepthPerLevel = 30, // Do not use directly. Use depthToPx and pxToDepth instead.
globalMaxDepth = 11,
@ -32,9 +32,9 @@ var WPNavMenuHandler = function ($) {
return data.post_title;
}
},
getListDataFromID = function(menuItemID, parentEl) {
if ( ! menuItemID )
if ( ! menuItemID )
return false;
parentEl = parentEl || document;
var fields = [
@ -62,10 +62,10 @@ var WPNavMenuHandler = function ($) {
while ( i-- ) {
j = fields.length;
while ( j-- ) {
if (
if (
inputs[i] &&
inputs[i].name &&
'menu-item[' + menuItemID + '][' + fields[j] + ']' == inputs[i].name
'menu-item[' + menuItemID + '][' + fields[j] + ']' == inputs[i].name
) {
itemData[fields[j]] = inputs[i].value;
}
@ -74,21 +74,21 @@ var WPNavMenuHandler = function ($) {
return itemData;
},
recalculateMenuItemPositions = function() {
menuList.find('.menu-item-data-position').val( function(index) { return index + 1; } );
},
depthToPx = function(depth) {
return depth * menuItemDepthPerLevel;
},
pxToDepth = function(px) {
return Math.floor(px / menuItemDepthPerLevel);
},
menuList;
// jQuery extensions
$.fn.extend({
menuItemDepth : function() {
@ -149,29 +149,29 @@ var WPNavMenuHandler = function ($) {
});
return {
// Functions that run on init.
init : function() {
menuList = $('#menu-to-edit');
this.attachMenuEditListeners();
this.attachMenuMetaListeners(document.getElementById('nav-menu-meta'));
this.attachTabsPanelListeners();
if( menuList.length ) // If no menu, we're in the + tab.
this.initSortables();
this.initToggles();
this.initTabManager();
},
initToggles : function() {
// init postboxes
postboxes.add_postbox_toggles('nav-menus');
// adjust columns functions for menus UI
columns.useCheckboxesForHidden();
columns.checked = function(field) {
@ -183,22 +183,22 @@ var WPNavMenuHandler = function ($) {
// hide fields
menuList.hideAdvancedMenuItemFields();
},
initSortables : function() {
var currentDepth = 0, originalDepth, minDepth, maxDepth,
menuLeft = menuList.offset().left;
menuList.sortable({
handle: ' > dl',
placeholder: 'sortable-placeholder',
start: function(e, ui) {
var next, height, width, parent, children, maxChildDepth,
transport = ui.item.children('.menu-item-transport');
// Set depths
originalDepth = ui.item.menuItemDepth();
updateCurrentDepth(ui, originalDepth);
// Attach child elements to parent
// Skip the placeholder
parent = ( ui.item.next()[0] == ui.placeholder[0] ) ? ui.item.next() : ui.item;
@ -207,7 +207,7 @@ var WPNavMenuHandler = function ($) {
// Now that the element is complete, we can update...
updateDepthRange(ui);
// Update the height of the placeholder to match the moving item.
height = transport.outerHeight();
// If there are children, account for distance between top of children and parent
@ -215,7 +215,7 @@ var WPNavMenuHandler = function ($) {
height += ui.item.outerHeight();
height -= 2; // Subtract 2 for borders
ui.placeholder.height(height);
// Update the width of the placeholder to match the moving item.
maxChildDepth = originalDepth;
children.each(function(){
@ -229,10 +229,10 @@ var WPNavMenuHandler = function ($) {
},
stop: function(e, ui) {
var children, depthChange = currentDepth - originalDepth;
// Return child elements to the list
children = ui.item.children('.menu-item-transport').children().insertAfter(ui.item);
// Update depth classes
if( depthChange != 0 ) {
ui.item.updateDepthClass( currentDepth );
@ -247,7 +247,7 @@ var WPNavMenuHandler = function ($) {
// Otherwise fix it, or we're in trouble.
if( ! ui.placeholder.parent().hasClass('menu') )
ui.placeholder.appendTo(menuList);
updateDepthRange(ui);
},
sort: function(e, ui) {
@ -255,34 +255,34 @@ var WPNavMenuHandler = function ($) {
// Check and correct if depth is not within range.
if ( depth < minDepth ) depth = minDepth;
else if ( depth > maxDepth ) depth = maxDepth;
if( depth != currentDepth )
updateCurrentDepth(ui, depth);
}
});
function updateDepthRange(ui) {
var prev = ui.placeholder.prev(),
next = ui.placeholder.next(), depth;
// Make sure we don't select the moving item.
if( prev[0] == ui.item[0] ) prev = prev.prev();
if( prev[0] == ui.item[0] ) prev = prev.prev();
if( next[0] == ui.item[0] ) next = next.next();
minDepth = (next.length) ? next.menuItemDepth() : 0;
if( prev.length )
maxDepth = ( (depth = prev.menuItemDepth() + 1) > globalMaxDepth ) ? globalMaxDepth : depth;
else
maxDepth = 0;
}
function updateCurrentDepth(ui, depth) {
ui.placeholder.updateDepthClass( depth, currentDepth );
currentDepth = depth;
}
},
attachMenuEditListeners : function() {
var that = this;
$('#update-nav-menu').bind('click', function(e) {
@ -299,7 +299,7 @@ var WPNavMenuHandler = function ($) {
}
});
},
/**
* An interface for managing default values for input elements
* that is both JS and accessibility-friendly.
@ -309,11 +309,11 @@ var WPNavMenuHandler = function ($) {
*/
setupInputWithDefaultTitle : function() {
var name = 'input-with-default-title';
$('.' + name).each( function(){
var $t = $(this), title = $t.attr('title'), val = $t.val();
$t.data( name, title );
if( '' == val ) $t.val( title );
else if ( title == val ) return;
else $t.removeClass( name );
@ -334,17 +334,17 @@ var WPNavMenuHandler = function ($) {
var that = this;
this.setupInputWithDefaultTitle();
// auto-suggest for the quick-search boxes
$('input.quick-search').each(function(i, el) {
that.setupQuickSearchEventListeners(el);
that.setupQuickSearchEventListeners(el);
});
$(formEL).bind('submit', function(e) {
return that.eventSubmitMetaForm.call(that, this, e);
});
$(formEL).find('input:submit').click(function() {
$(this).siblings('img.waiting').show();
$(formEL).find('input:submit').click(function() {
$(this).siblings('img.waiting').show();
});
},
@ -359,7 +359,7 @@ var WPNavMenuHandler = function ($) {
i = inputs.length;
// upon changing tabs, we want to uncheck all checkboxes
while( i-- )
while( i-- )
inputs[i].checked = false;
$('.tabs-panel', wrapper).each(function() {
@ -379,7 +379,7 @@ var WPNavMenuHandler = function ($) {
activePanel.className = activePanel.className.replace('tabs-panel-inactive', 'tabs-panel-active');
}
}
return false;
} else if ( e.target && e.target.className && -1 != e.target.className.indexOf('select-all') ) {
var selectAreaMatch = /#(.*)$/.exec(e.target.href);
@ -390,7 +390,7 @@ var WPNavMenuHandler = function ($) {
}
});
},
initTabManager : function() {
var fixed = $('.nav-tabs-wrapper'),
fluid = fixed.children('.nav-tabs'),
@ -400,13 +400,13 @@ var WPNavMenuHandler = function ($) {
fixedRight, fixedLeft,
arrowLeft, arrowRight
resizing = false;
function resetMenuTabs() {
fixedLeft = fixed.offset().left;
fixedRight = fixedLeft + fixed.width();
active.makeTabVisible();
}
$.fn.extend({
makeTabVisible : function() {
var t = this.eq(0), left, right;
@ -426,43 +426,43 @@ var WPNavMenuHandler = function ($) {
return ( right <= fixedRight && left >= fixedLeft ) ? true : false;
}
});
// Find the width of all tabs
tabs.each(function(){
tabsWidth += $(this).outerWidth(true);
});
// Check if we need the tab manager
if( tabsWidth <= fixed.width()
- fluid.css('padding-left').slice(0,-2)
- fluid.css('padding-right').slice(0,-2) )
return;
// Set up right margin for overflow, unset padding
fluid.css({
'margin-right' : (-1 * tabsWidth) + 'px',
'padding' : 0,
});
// Build tab navigation
arrowLeft = $('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>&laquo;</a></div>');
arrowRight = $('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>&raquo;</a></div>');
// Attach to the document
fixed.wrap('<div class="nav-tabs-nav"/>').parent().prepend( arrowLeft ).append( arrowRight );
// Set the menu tabs
resetMenuTabs();
// Make sure the tabs reset on resize
$(window).resize(function() {
if( resizing ) return;
resizing = true;
setTimeout(function(){
setTimeout(function(){
resetMenuTabs();
resizing = false;
}, 1000);
});
// Build arrow functions
// Build arrow functions
$.each([{
arrow : arrowLeft,
next : "next",
@ -501,23 +501,23 @@ var WPNavMenuHandler = function ($) {
*/
setupQuickSearchEventListeners : function(el) {
var that = this;
$(el).autocomplete( ajaxurl + '?action=menu-quick-search&type=' + el.name,
{
delay: 500,
$(el).autocomplete( ajaxurl + '?action=menu-quick-search&type=' + el.name,
{
delay: 500,
formatItem: formatAutocompleteResponse,
formatResult: formatAutocompleteResult,
minchars: 2,
multiple: false
minchars: 2,
multiple: false
}
).bind('blur', function(e) {
var changedData = autoCompleteData[this.value],
inputEl = this;
if ( changedData ) {
$.post(
$.post(
ajaxurl + '?action=menu-quick-search&type=get-post-item&response-format=markup',
changedData,
function(r) {
that.processQuickSearchQueryResponse.call(that, r, changedData);
that.processQuickSearchQueryResponse.call(that, r, changedData);
autoCompleteData[inputEl.value] = false;
}
);
@ -546,12 +546,12 @@ var WPNavMenuHandler = function ($) {
}
}
},
eventOnClickCloseLink : function(clickedEl) {
$(clickedEl).closest('.menu-item-settings').siblings('dl').find('.item-edit').click();
return false;
},
eventOnClickMenuDelete : function(clickedEl) {
// Delete warning AYS
if ( confirm( navMenuL10n.warnDeleteMenu ) ) {
@ -570,7 +570,7 @@ var WPNavMenuHandler = function ($) {
if ( confirm( navMenuL10n.warnDeleteMenuItem ) ) {
matchedSection = /_wpnonce=([a-zA-Z0-9]*)$/.exec(clickedEl.href);
if ( matchedSection && matchedSection[1] ) {
itemID = parseInt(clickedEl.id.replace('delete-', ''), 10);
itemID = parseInt(clickedEl.id.replace('delete-', ''), 10);
$.post(
ajaxurl,
{
@ -583,7 +583,7 @@ var WPNavMenuHandler = function ($) {
that.removeMenuItem(document.getElementById('menu-item-' + itemID));
}
);
return false;
return false;
}
return true;
} else {
@ -629,7 +629,7 @@ var WPNavMenuHandler = function ($) {
listItemDBIDMatch = re.exec(inputs[i].name);
listItemDBID = 'undefined' == typeof listItemDBIDMatch[1] ? 0 : parseInt(listItemDBIDMatch[1], 10);
listItemData = getListDataFromID(listItemDBID);
for ( j in listItemData ) {
params['menu-item[' + listItemDBID + '][' + j + ']'] = listItemData[j];
}
@ -654,7 +654,7 @@ var WPNavMenuHandler = function ($) {
params['menu-settings-column-nonce'] = thisForm.elements['menu-settings-column-nonce'].value;
$.post( ajaxurl, params, function(menuMarkup) {
processMethod.call(that, menuMarkup, params);
processMethod.call(that, menuMarkup, params);
$(thisForm).find('img.waiting').hide();
});
@ -677,7 +677,7 @@ var WPNavMenuHandler = function ($) {
/**
* Process the quick search response into a search result
*
*
* @param string resp The server response to the query.
* @param object req The request arguments.
*/
@ -708,7 +708,7 @@ var WPNavMenuHandler = function ($) {
}
wrap.innerHTML = resp;
items = wrap.getElementsByTagName('li');
if ( items[0] && req.object_type ) {
@ -738,7 +738,7 @@ var WPNavMenuHandler = function ($) {
removeMenuItem : function(el) {
el = $(el)
var children = el.childMenuItems();
el.addClass('deleting').fadeOut( 350 , function() {
el.remove();
children.shiftDepthClass(-1).updateParentMenuItemDBId();

View File

@ -50,7 +50,7 @@ jQuery(document).ready(function($) {
$('#TB_iframeContent').width('100%');
thickDims();
return false;
} );

View File

@ -15,7 +15,7 @@ if ( !is_multisite() )
// @todo Create a delete blog cap.
if ( ! current_user_can( 'manage_options' ) )
wp_die(__( 'You do not have sufficient permissions to delete this site.'));
if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) != false ) {
if ( get_option( 'delete_blog_hash' ) == $_GET['h'] ) {
wpmu_delete_blog( $wpdb->blogid );

View File

@ -329,7 +329,7 @@ switch ( $_GET['action'] ) {
if ( ! current_user_can( 'manage_sites' ) )
wp_die( __( 'You do not have permission to access this page.' ) );
if ( $_GET['action'] != -1 || $_POST['action2'] != -1 )
$doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
@ -454,7 +454,7 @@ switch ( $_GET['action'] ) {
nocache_headers();
header( 'Content-Type: text/html; charset=utf-8' );
}
if ( $current_site->blog_id == $id )
if ( $current_site->blog_id == $id )
wp_die( __( 'You are not allowed to change the current site.' ) );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -489,8 +489,8 @@ switch ( $_GET['action'] ) {
if ( $id != '0' && $id != '1' ) {
$_POST['allusers'] = array( $id ); // confirm_delete_users() can only handle with arrays
$title = __( 'Users' );
$parent_file = 'ms-admin.php';
$title = __( 'Users' );
$parent_file = 'ms-admin.php';
require_once( 'admin-header.php' );
echo '<div class="wrap">';
confirm_delete_users( $_POST['allusers'] );
@ -498,7 +498,7 @@ switch ( $_GET['action'] ) {
require_once( 'admin-footer.php' );
exit();
} else {
wp_redirect( admin_url( 'ms-users.php' ) );
wp_redirect( admin_url( 'ms-users.php' ) );
}
break;
@ -516,8 +516,8 @@ switch ( $_GET['action'] ) {
if ( !empty( $val ) ) {
switch ( $doaction ) {
case 'delete':
$title = __( 'Users' );
$parent_file = 'ms-admin.php';
$title = __( 'Users' );
$parent_file = 'ms-admin.php';
require_once( 'admin-header.php' );
echo '<div class="wrap">';
confirm_delete_users( $_POST['allusers'] );
@ -543,13 +543,13 @@ switch ( $_GET['action'] ) {
case 'notspam':
$userfunction = 'all_notspam';
$blogs = get_blogs_of_user( $val, true );
foreach ( (array) $blogs as $key => $details )
foreach ( (array) $blogs as $key => $details )
update_blog_status( $details->userblog_id, 'spam', '0' );
update_user_status( $val, 'spam', '0', 1 );
break;
}
}
}
}
}
wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $userfunction ), wp_get_referer() ) );
@ -578,7 +578,7 @@ switch ( $_GET['action'] ) {
if ( is_array( $_POST['user'] ) && ! empty( $_POST['user'] ) )
foreach( $_POST['user'] as $id ) {
wpmu_delete_user( $id );
$i++;
$i++;
}
if ( $i == 1 )

View File

@ -92,7 +92,7 @@ if (isset($_GET['updated'])) {
<th scope="row"><label for="admin_notice_feed"><?php _e( 'Admin Notice Feed' ) ?></label></th>
<td><input name="admin_notice_feed" class="large-text" type="text" id="admin_notice_feed" value="<?php echo esc_attr( get_site_option( 'admin_notice_feed' ) ) ?>" size="80" /><br />
<?php _e( 'Display the latest post from this RSS or Atom feed on all site dashboards. Leave blank to disable.' ); ?><br />
<?php if ( get_site_option( 'admin_notice_feed' ) != get_home_url( $current_site->id, 'feed/' ) )
echo __( 'A good one to use would be the feed from your main site: ' ) . esc_url( get_home_url( $current_site->id, 'feed/' ) ) ?></td>
</tr>

View File

@ -255,7 +255,7 @@ if ( isset( $_GET['updated'] ) && $_GET['updated'] == 'true' && ! empty( $_GET['
<?php
break;
case 'registered':
case 'registered':
if ( 'list' == $mode )
$date = 'Y/m/d';
else
@ -284,7 +284,7 @@ if ( isset( $_GET['updated'] ) && $_GET['updated'] == 'true' && ! empty( $_GET['
if ( get_blog_status( $val->userblog_id, 'spam' ) == 1 )
echo 'style="background-color: #faa" ';
echo 'href="' . esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . '</a>';
echo '</small><br />';
}
}

View File

@ -31,7 +31,7 @@ if ( 'updateblogsettings' == $action && isset( $_POST['primary_blog'] ) ) {
update_user_option( $current_user->id, 'primary_blog', (int) $_POST['primary_blog'], true );
$updated = true;
} else {
wp_die( __( 'The primary site you chose does not exist.' ) );
wp_die( __( 'The primary site you chose does not exist.' ) );
}
}

View File

@ -107,17 +107,17 @@ switch ( $action ) {
if ( ! empty( $possible_object_id ) ) {
$dbids_to_objectids[$ordered_menu_item_object->ID] = $possible_object_id;
$objectids_to_dbids[$possible_object_id] = $ordered_menu_item_object->ID;
}
}
}
}
// if this menu item is not first
if ( ! empty( $dbids_to_orders[$menu_item_id] ) && ! empty( $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] ) ) {
// if this menu item is a child of the previous
if (
! empty( $menu_item_data['post_parent'] ) &&
if (
! empty( $menu_item_data['post_parent'] ) &&
isset( $objectids_to_dbids[$menu_item_data['post_parent']] ) &&
isset( $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] ) &&
( $objectids_to_dbids[$menu_item_data['post_parent']] == $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] )
@ -127,7 +127,7 @@ switch ( $action ) {
$parent_data = get_post( $parent_db_id, ARRAY_A );
if ( ! is_wp_error( $parent_data ) ) {
// if there is something before the parent, make menu item a child of the parent's parent
if ( ! empty( $dbids_to_orders[$parent_db_id] ) && ! empty( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1] ) ) {
$menu_item_data['post_parent'] = $parent_data['post_parent'];
@ -136,13 +136,13 @@ switch ( $action ) {
} else {
$menu_item_data['post_parent'] = 0;
}
// set former parent's [menu_order] to that of menu-item's
$parent_data['menu_order'] = $parent_data['menu_order'] + 1;
// set menu-item's [menu_order] to that of former parent
$menu_item_data['menu_order'] = $menu_item_data['menu_order'] - 1;
// save changes
wp_update_post($menu_item_data);
wp_update_post($parent_data);
@ -168,7 +168,7 @@ switch ( $action ) {
if ( is_nav_menu_item( $menu_item_id ) ) {
if ( wp_delete_post( $menu_item_id, true ) ) {
$messages[] = '<div id="message" class="updated"><p>' . __('The menu item has been successfully deleted.') . '</p></div>';
}
}
@ -248,7 +248,7 @@ switch ( $action ) {
$menu_item_db_id = wp_update_nav_menu_item( $nav_menu_selected_id, ( $_POST['menu-item-db-id'][$_key] != $_key ? 0 : $_key ), $args );
if ( is_wp_error( $menu_item_db_id ) )
if ( is_wp_error( $menu_item_db_id ) )
$messages[] = '<div id="message" class="error"><p>' . $menu_item_db_id->get_error_message() . '</p></div>';
elseif ( isset( $menu_items[$menu_item_db_id] ) )
unset( $menu_items[$menu_item_db_id] );
@ -327,12 +327,12 @@ require_once( 'admin-header.php' );
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php esc_html_e('Menus'); ?></h2>
<?php
<?php
foreach( $messages as $message ) :
echo $message . "\n";
echo $message . "\n";
endforeach;
?>
<?php if ( current_theme_supports('nav-menus') || current_theme_supports('widgets') ) : ?>
<div id="nav-menus-frame">
<div id="menu-settings-column" class="metabox-holder">
@ -364,10 +364,10 @@ require_once( 'admin-header.php' );
</div>
<div class="nav-tabs-wrapper">
<div class="nav-tabs">
<?php
<?php
foreach( (array) $nav_menus as $_nav_menu ) :
?><a href="<?php
?><a href="<?php
echo add_query_arg(
array(
'action' => 'edit',
@ -375,14 +375,14 @@ require_once( 'admin-header.php' );
),
admin_url( 'nav-menus.php' )
);
?>" class="nav-tab<?php
if ( $nav_menu_selected_id == $_nav_menu->term_id )
?>" class="nav-tab<?php
if ( $nav_menu_selected_id == $_nav_menu->term_id )
echo ' nav-tab-active';
else
echo ' hide-if-no-js';
?>"><?php echo esc_html( $_nav_menu->name ); ?></a><?php
endforeach;
?><a href="<?php
?><a href="<?php
echo add_query_arg(
array(
'action' => 'edit',
@ -390,8 +390,8 @@ require_once( 'admin-header.php' );
),
admin_url( 'nav-menus.php' )
);
?>" class="nav-tab menu-add-new<?php
if ( 0 == $nav_menu_selected_id )
?>" class="nav-tab menu-add-new<?php
if ( 0 == $nav_menu_selected_id )
echo ' nav-tab-active';
?>"><?php printf( '<abbr title="%s">+</abbr>', esc_html__( 'Add menu' ) ); ?></a>
</div>
@ -406,11 +406,11 @@ require_once( 'admin-header.php' );
<input name="menu-name" type="text" class="menu-name regular-text menu-item-textbox input-with-default-title" title="Enter menu name here." value="<?php echo esc_attr( $nav_menu_selected_title ); ?>" />
<br class="clear" />
</label>
<div class="publishing-action">
<input class="button-primary" name="save_menu" type="submit" value="<?php empty($nav_menu_selected_id) ? esc_attr_e('Create Menu') : esc_attr_e('Save Menu'); ?>" />
</div><!--END .publishing-action-->
<?php if ( ! empty( $nav_menu_selected_id ) ) : ?>
<div class="delete-action">
<a class="submitdelete deletion menu-delete" href="<?php echo wp_nonce_url( admin_url('nav-menus.php?action=delete&amp;menu=' . $nav_menu_selected_id), 'delete-nav_menu-' . $nav_menu_selected_id ); ?>"><?php _e('Delete Menu'); ?></a>
@ -429,8 +429,8 @@ require_once( 'admin-header.php' );
<div id="post-body-content">
<?php if ( is_nav_menu( $nav_menu_selected_id ) && ( current_theme_supports('nav-menus') || current_theme_supports('widgets') ) ) : ?>
<ul class="menu" id="menu-to-edit">
<?php
$edit_markup = wp_get_nav_menu_to_edit( $nav_menu_selected_id );
<?php
$edit_markup = wp_get_nav_menu_to_edit( $nav_menu_selected_id );
if ( ! is_wp_error( $edit_markup ) ) {
echo $edit_markup;
}

View File

@ -486,7 +486,7 @@ var photostorage = false;
<h3 class="hndle"><?php _e('Categories') ?></h3>
<div class="inside">
<div id="taxonomy-category" class="categorydiv">
<ul id="category-tabs" class="category-tabs">
<li class="tabs"><a href="#category-all" tabindex="3"><?php printf( __( 'All %s' ), $tax->label ); ?></a></li>
<li class="hide-if-no-js"><a href="#category-pop" tabindex="3"><?php _e( 'Most Used' ); ?></a></li>

View File

@ -160,9 +160,9 @@ switch($step) {
if ( empty($prefix) )
$prefix = 'wp_';
// Validate $prefix: it can only contain letters, numbers and underscores
if ( preg_match( '|[^a-z0-9_]|i', $prefix ) )
wp_die( /*WP_I18N_BAD_PREFIX*/'<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ );
// Validate $prefix: it can only contain letters, numbers and underscores
if ( preg_match( '|[^a-z0-9_]|i', $prefix ) )
wp_die( /*WP_I18N_BAD_PREFIX*/'<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ );
// Test the db connection.
/**#@+

View File

@ -86,7 +86,7 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
$id = max( get_query_var('p'), get_query_var('page_id'), get_query_var('attachment_id'));
if ( $id && $redirect_url = get_permalink($id) )
$redirect['query'] = remove_query_arg(array('p', 'page_id', 'attachment_id'), $redirect['query']);
if ( ! $redirect_url )
$redirect_url = redirect_guess_404_permalink();

View File

@ -1180,9 +1180,9 @@ function remove_role( $role ) {
* Retrieve a list of super admins.
*
* @since 3.0.0
*
*
* @uses $super_admins Super admins global variable, if set.
*
*
* @return array List of super admin logins
*/
function get_super_admins() {

View File

@ -473,7 +473,7 @@ function wp_list_categories( $args = '' ) {
$r['exclude_tree'] = $r['exclude'];
$r['exclude'] = '';
}
if ( !isset( $r['class'] ) )
$r['class'] = ( 'category' == $r['taxonomy'] ) ? 'categories' : $r['taxonomy'];

View File

@ -391,7 +391,7 @@ class WP_Http {
*/
function processResponse($strResponse) {
$res = explode("\r\n\r\n", $strResponse, 2);
return array('headers' => isset($res[0]) ? $res[0] : array(), 'body' => isset($res[1]) ? $res[1] : '');
}

View File

@ -168,7 +168,7 @@ class WP_oEmbed {
$provider = add_query_arg( 'maxwidth', $args['width'], $provider );
$provider = add_query_arg( 'maxheight', $args['height'], $provider );
$provider = add_query_arg( 'url', urlencode($url), $provider );
foreach( array( 'json', 'xml' ) as $format ) {
$result = $this->_fetch_with_format( $provider, $format );
if ( is_wp_error( $result ) && 'not-implemented' == $result->get_error_code() )

View File

@ -1257,7 +1257,7 @@ class Walker_Comment extends Walker {
* display children of higher nesting levels than selected inline on
* the highest depth level displayed. This prevents them being orphaned
* at the end of the comment list.
*
*
* Example: max_depth = 2, with 5 levels of nested content.
* 1
* 1.1

View File

@ -52,10 +52,10 @@ function wptexturize($text) {
$cockney = array("'tain't","'twere","'twas","'tis","'twill","'til","'bout","'nuff","'round","'cause");
$cockneyreplace = array("&#8217;tain&#8217;t","&#8217;twere","&#8217;twas","&#8217;tis","&#8217;twill","&#8217;til","&#8217;bout","&#8217;nuff","&#8217;round","&#8217;cause");
}
$static_characters = array_merge(array('---', ' -- ', '--', ' - ', 'xn&#8211;', '...', '``', '\'\'', ' (tm)'), $cockney);
$static_replacements = array_merge(array('&#8212;', ' &#8212; ', '&#8211;', ' &#8211; ', 'xn--', '&#8230;', $opening_quote, $closing_quote, ' &#8482;'), $cockneyreplace);
$dynamic_characters = array('/\'(\d\d(?:&#8217;|\')?s)/', '/\'(\d+)/', '/(\s|\A|[([{<]|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A|[([{<])"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/\b(\d+)x(\d+)\b/');
$dynamic_replacements = array('&#8217;$1','&#8217;$1', '$1&#8216;', '$1&#8243;', '$1&#8242;', '$1&#8217;$2', '$1' . $opening_quote . '$2', $closing_quote . '$1', '&#8217;$1', '$1&#215;$2');

View File

@ -2912,7 +2912,7 @@ function wp_parse_id_list( $list ) {
*
* @param array $list An array of objects to filter
* @param array $args An array of key => value arguments to match against each object
* @param string $operator The logical operation to perform. 'or' means only one element
* @param string $operator The logical operation to perform. 'or' means only one element
* from the array needs to match; 'and' means all elements must match. The default is 'and'.
* @param bool|string $field A field from the object to place instead of the entire object
* @return array A list of objects or object fields

View File

@ -181,7 +181,7 @@ class WP_Locale {
/* translators: $thousands_sep argument for http://php.net/number_format, default is , */
$trans = __('number_format_thousands_sep');
$this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans;
/* translators: $dec_point argument for http://php.net/number_format, default is . */
$trans = __('number_format_decimal_point');
$this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans;

View File

@ -1325,7 +1325,7 @@ function maybe_add_existing_user_to_blog() {
if ( empty( $details ) || is_wp_error( add_existing_user_to_blog( $details ) ) )
wp_die( sprintf(__('An error occurred adding you to this site. Back to the <a href="%s">homepage</a>.'), site_url() ) );
wp_die( sprintf(__('You have been added to this site. Please visit the <a href="%s">homepage</a> or <a href="%s">login</a> using your username and password.'), site_url(), admin_url() ), __('Success') );
}

View File

@ -84,7 +84,7 @@ class Walker_Nav_Menu extends Walker {
$classes = ' class="' . esc_attr( $classes ) . '"';
$output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $classes .'>';
$attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : '';
$attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : '';
$attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : '';
@ -95,7 +95,7 @@ class Walker_Nav_Menu extends Walker {
$item_output .= $args->link_before . apply_filters( 'the_title', $item->title ) . $args->link_after;
$item_output .= '</a>';
$item_output .= $args->after;
$output .= apply_filters( 'wp_get_nav_menu_item', $item_output, $args );
}
@ -208,7 +208,7 @@ function wp_nav_menu( $args = array() ) {
}
}
}
// If the menu exists, get its items.
if ( $menu && ! is_wp_error($menu) )
$menu_items = wp_get_nav_menu_items( $menu->term_id );
@ -219,7 +219,7 @@ function wp_nav_menu( $args = array() ) {
return call_user_func( $args->fallback_cb, (array) $args );
}
}
$nav_menu = '';
$items = '';
$container_allowedtags = apply_filters( 'wp_nav_menu_container_allowedtags', array( 'div', 'p', 'nav' ) );
@ -236,10 +236,10 @@ function wp_nav_menu( $args = array() ) {
$items .= walk_nav_menu_tree( $sorted_menu_items, $args->depth, $args );
// Attributes
// Attributes
$attributes = ' id="menu-' . $menu->slug . '"';
$attributes .= $args->menu_class ? ' class="'. $args->menu_class .'"' : '';
$nav_menu .= '<ul'. $attributes .'>';
// Allow plugins to hook into the menu to add their own <li>'s

View File

@ -16,7 +16,7 @@
* @return mixed $menu|false Or WP_Error
*/
function wp_get_nav_menu_object( $menu ) {
if ( ! $menu )
if ( ! $menu )
return false;
$menu_obj = get_term( $menu, 'nav_menu' );
@ -47,17 +47,17 @@ function wp_get_nav_menu_object( $menu ) {
function is_nav_menu( $menu ) {
if ( ! $menu )
return false;
$menu_obj = wp_get_nav_menu_object( $menu );
if (
$menu_obj &&
! is_wp_error( $menu_obj ) &&
if (
$menu_obj &&
! is_wp_error( $menu_obj ) &&
! empty( $menu_obj->taxonomy ) &&
'nav_menu' == $menu_obj->taxonomy
)
)
return true;
return false;
}
@ -163,22 +163,22 @@ function wp_update_nav_menu_object( $menu_id = 0, $menu_data = array() ) {
return $_menu;
if ( $_menu && isset( $_menu->term_id ) ) {
$args = array(
'description' => ( isset( $menu_data['description'] ) ? $menu_data['description'] : '' ),
'name' => ( isset( $menu_data['menu-name'] ) ? $menu_data['menu-name'] : '' ),
'parent' => ( isset( $menu_data['parent'] ) ? (int) $menu_data['parent'] : 0 ),
'slug' => null,
$args = array(
'description' => ( isset( $menu_data['description'] ) ? $menu_data['description'] : '' ),
'name' => ( isset( $menu_data['menu-name'] ) ? $menu_data['menu-name'] : '' ),
'parent' => ( isset( $menu_data['parent'] ) ? (int) $menu_data['parent'] : 0 ),
'slug' => null,
);
$menu_id = (int) $_menu->term_id;
// double-check that we're not changing a menu to the name of another
$_possible_existing = get_term_by( 'name', $menu_data['menu-name'], 'nav_menu' );
if (
$_possible_existing &&
! is_wp_error( $_possible_existing ) &&
$_possible_existing = get_term_by( 'name', $menu_data['menu-name'], 'nav_menu' );
if (
$_possible_existing &&
! is_wp_error( $_possible_existing ) &&
isset( $_possible_existing->term_id ) &&
$_possible_existing->term_id != $menu_id
$_possible_existing->term_id != $menu_id
) {
return new WP_Error( 'menu_exists', sprintf( __('The menu name <strong>%s</strong> conflicts with another menu name. Please try another.'), esc_html( $menu_data['menu-name'] ) ) );
}
@ -255,7 +255,7 @@ function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item
$args['menu-item-position'] = $count;
}
}
if ( 'custom' != $args['menu-item-type'] ) {
/* if non-custom menu item, then:
* use original object's URL
@ -297,9 +297,9 @@ function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item
'ping_status' => 0,
'post_content' => $args['menu-item-description'],
'post_excerpt' => $args['menu-item-attr-title'],
'post_parent' => $args['menu-item-parent-id'],
'post_title' => $args['menu-item-title'],
'post_type' => 'nav_menu_item',
'post_parent' => $args['menu-item-parent-id'],
'post_title' => $args['menu-item-title'],
'post_type' => 'nav_menu_item',
'tax_input' => array( 'nav_menu' => $menu->name ),
);
@ -376,10 +376,10 @@ function _sort_nav_menu_items($a, $b) {
$_b = (int) $b->$_menu_item_sort_prop;
if ( $a->$_menu_item_sort_prop == $b->$_menu_item_sort_prop ) {
return 0;
} elseif (
( $_a == $a->$_menu_item_sort_prop ) &&
( $_b == $b->$_menu_item_sort_prop )
return 0;
} elseif (
( $_a == $a->$_menu_item_sort_prop ) &&
( $_b == $b->$_menu_item_sort_prop )
) {
return $_a < $_b ? -1 : 1;
} else {
@ -404,7 +404,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) {
if ( ! $menu )
return false;
$items = get_objects_in_term( $menu->term_id, 'nav_menu' );
if ( ! empty( $items ) ) {
@ -448,7 +448,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) {
* - url: The URL to which this menu item points.
* - title: The title of this menu item.
* - target: The target attribute of the link element for this menu item.
* - attr_title: The title attribute of the link element for this menu item.
* - attr_title: The title attribute of the link element for this menu item.
* - classes: The class attribute value for the link element of this menu item.
* - xfn: The XFN relationship expressed in the link of this menu item.
* - description: The description of this menu item.
@ -465,12 +465,12 @@ function wp_setup_nav_menu_item( $menu_item ) {
$menu_item->object_id = get_post_meta( $menu_item->ID, '_menu_item_object_id', true );
$menu_item->object = get_post_meta( $menu_item->ID, '_menu_item_object', true );
$menu_item->type = get_post_meta( $menu_item->ID, '_menu_item_type', true );
if ( 'post_type' == $menu_item->type ) {
$object = get_post_type_object( $menu_item->object );
$menu_item->append = $object->singular_label;
$menu_item->url = get_permalink( $menu_item->object_id );
$original_object = get_post( $menu_item->object_id );
$original_title = $original_object->post_title;
$menu_item->title = '' == $menu_item->post_title ? $original_title : $menu_item->post_title;
@ -488,7 +488,7 @@ function wp_setup_nav_menu_item( $menu_item ) {
$menu_item->title = $menu_item->post_title;
$menu_item->url = get_post_meta( $menu_item->ID, '_menu_item_url', true );
}
$menu_item->target = get_post_meta( $menu_item->ID, '_menu_item_target', true );
$menu_item->attr_title = strip_tags( $menu_item->post_excerpt );
@ -542,7 +542,7 @@ function wp_setup_nav_menu_item( $menu_item ) {
* Get the menu items associated with a particular object.
*
* @since 3.0.0
*
*
* @param int $object_id The ID of the original object.
* @param string $object_type The type of object, such as "taxonomy" or "post_type."
* @return array The array of menu item IDs; empty array if none;

View File

@ -632,7 +632,7 @@ function get_post_status_object( $post_status ) {
*
* @param array|string $args An array of key => value arguments to match against the post status objects.
* @param string $output The type of output to return, either post status 'names' or 'objects'. 'names' is the default.
* @param string $operator The logical operation to perform. 'or' means only one element
* @param string $operator The logical operation to perform. 'or' means only one element
* from the array needs to match; 'and' means all elements must match. The default is 'and'.
* @return array A list of post type names or objects
*/
@ -738,7 +738,7 @@ function get_post_type_object( $post_type ) {
*
* @param array|string $args An array of key => value arguments to match against the post type objects.
* @param string $output The type of output to return, either post type 'names' or 'objects'. 'names' is the default.
* @param string $operator The logical operation to perform. 'or' means only one element
* @param string $operator The logical operation to perform. 'or' means only one element
* from the array needs to match; 'and' means all elements must match. The default is 'and'.
* @return array A list of post type names or objects
*/

View File

@ -1719,7 +1719,7 @@ class WP_Query {
// Non-hierarchical post_types & parent-level-hierarchical post_types can directly use 'name'
$q['name'] = $q[ $ptype_obj->query_var ];
} else {
// Hierarchical post_types will operate through the
// Hierarchical post_types will operate through the
$q['pagename'] = $q[ $ptype_obj->query_var ];
$q['name'] = '';
}
@ -2482,7 +2482,7 @@ class WP_Query {
$stickies = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE $wpdb->posts.ID IN ($stickies__in) $stickies_where" );
foreach ( $stickies as $sticky_post ) {
// Ignore sticky posts the current user cannot read or are not published.
if ( 'publish' != $sticky_post->post_status )
if ( 'publish' != $sticky_post->post_status )
continue;
array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
$sticky_offset++;

View File

@ -1567,7 +1567,7 @@ class WP_Rewrite {
// robots.txt -only if installed at the root
$home_path = parse_url( home_url() );
$robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array();
// Default Feed rules - These are require to allow for the direct access files to work with permalink structure starting with %category%
$default_feeds = array( '.*wp-atom.php$' => $this->index . '?feed=atom',
'.*wp-rdf.php$' => $this->index . '?feed=rdf',

View File

@ -69,7 +69,7 @@ add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority
*
* @param array $args An array of key => value arguments to match against the taxonomy objects.
* @param string $output The type of output to return, either taxonomy 'names' or 'objects'. 'names' is the default.
* @param string $operator The logical operation to perform. 'or' means only one element
* @param string $operator The logical operation to perform. 'or' means only one element
* from the array needs to match; 'and' means all elements must match. The default is 'and'.
* @return array A list of taxonomy names or objects
*/
@ -1571,7 +1571,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
}
// Seems unreachable, However, Is used in the case that a term name is provided, which sanitizes to an empty string.
if ( empty($slug) ) {
if ( empty($slug) ) {
$slug = sanitize_title($slug, $term_id);
do_action( 'edit_terms', $term_id );
$wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) );

View File

@ -844,9 +844,9 @@ function get_date_template() {
/**
* Retrieve path of home template in current or parent template.
*
*
* This is the template used for the page containing the blog posts
*
*
* Attempts to locate 'home.php' first before falling back to 'index.php'.
*
* @since 1.5.0

View File

@ -558,9 +558,9 @@ function register_sidebar($args = array()) {
$wp_registered_sidebars[$sidebar['id']] = $sidebar;
add_theme_support('widgets');
do_action( 'register_sidebar', $sidebar );
return $sidebar['id'];
}
@ -690,7 +690,7 @@ function wp_sidebar_description( $id ) {
*/
function wp_unregister_sidebar_widget($id) {
do_action( 'wp_unregister_sidebar_widget', $id );
wp_register_sidebar_widget($id, '', '');
wp_unregister_widget_control($id);
}
@ -884,7 +884,7 @@ function dynamic_sidebar($index = 1) {
$params = apply_filters( 'dynamic_sidebar_params', $params );
$callback = $wp_registered_widgets[$id]['callback'];
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] );
if ( is_callable($callback) ) {