Pruning shears.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
012bb5278c
commit
14ccdbec33
|
@ -215,7 +215,7 @@ if ( isset($plugin_page) ) {
|
|||
exit();
|
||||
} else {
|
||||
do_action("load-$pagenow");
|
||||
// Backwards compatibility with old load-page-new.php, load-page.php,
|
||||
// Backwards compatibility with old load-page-new.php, load-page.php,
|
||||
// and load-categories.php actions.
|
||||
if ( $typenow == 'page' ) {
|
||||
if ( $pagenow == 'post-new.php' )
|
||||
|
|
|
@ -161,7 +161,7 @@ class WP_Posts_Table extends WP_List_Table {
|
|||
|
||||
$status_links[$status_name] = "<li><a href='edit.php?post_status=$status_name&post_type=$post_type'$class>" . sprintf( _n( $status->label_count[0], $status->label_count[1], $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . '</a>';
|
||||
}
|
||||
|
||||
|
||||
return $status_links;
|
||||
}
|
||||
|
||||
|
@ -998,7 +998,7 @@ class WP_Media_Table extends WP_List_Table {
|
|||
function check_permissions() {
|
||||
if ( !current_user_can('upload_files') )
|
||||
wp_die( __( 'You do not have permission to upload files.' ) );
|
||||
}
|
||||
}
|
||||
|
||||
function prepare_items() {
|
||||
global $lost, $wpdb, $wp_query, $post_mime_types, $avail_post_mime_types;
|
||||
|
@ -1488,10 +1488,10 @@ class WP_Terms_Table extends WP_List_Table {
|
|||
$args['order'] = trim( stripslashes( $_REQUEST['order'] ) );
|
||||
|
||||
$this->callback_args = $args;
|
||||
|
||||
|
||||
$this->set_pagination_args( array(
|
||||
'total_items' => wp_count_terms( $taxonomy, compact( 'search' ) ),
|
||||
'per_page' => $tags_per_page,
|
||||
'per_page' => $tags_per_page,
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -1820,10 +1820,10 @@ class WP_Users_Table extends WP_List_Table {
|
|||
$wp_user_search = new WP_User_Query( $args );
|
||||
|
||||
$this->items = $wp_user_search->get_results();
|
||||
|
||||
|
||||
$this->set_pagination_args( array(
|
||||
'total_items' => $wp_user_search->get_total(),
|
||||
'per_page' => $users_per_page,
|
||||
'per_page' => $users_per_page,
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -2566,7 +2566,7 @@ class WP_Links_Table extends WP_List_Table {
|
|||
$args['order'] = $order;
|
||||
|
||||
$this->items = get_bookmarks( $args );
|
||||
}
|
||||
}
|
||||
|
||||
function no_items() {
|
||||
_e( 'No links found.' );
|
||||
|
@ -2727,7 +2727,7 @@ class WP_Sites_Table extends WP_List_Table {
|
|||
) );
|
||||
}
|
||||
|
||||
function check_permissions() {
|
||||
function check_permissions() {
|
||||
if ( ! current_user_can( 'manage_sites' ) )
|
||||
wp_die( __( 'You do not have permission to access this page.' ) );
|
||||
}
|
||||
|
@ -3048,10 +3048,10 @@ class WP_MS_Users_Table extends WP_List_Table {
|
|||
$wp_user_search = new WP_User_Query( $args );
|
||||
|
||||
$this->items = $wp_user_search->get_results();
|
||||
|
||||
|
||||
$this->set_pagination_args( array(
|
||||
'total_items' => $wp_user_search->get_total(),
|
||||
'per_page' => $users_per_page,
|
||||
'per_page' => $users_per_page,
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -3371,7 +3371,7 @@ class WP_Plugins_Table extends WP_List_Table {
|
|||
}
|
||||
uasort( $this->items, '_order_plugins_callback' );
|
||||
}
|
||||
|
||||
|
||||
$plugins_per_page = $this->get_items_per_page( 'plugins_per_page', 999 );
|
||||
|
||||
$start = ( $page - 1 ) * $plugins_per_page;
|
||||
|
@ -3644,7 +3644,7 @@ class WP_Plugin_Install_Table extends WP_List_Table {
|
|||
|
||||
function check_permissions() {
|
||||
if ( ! current_user_can('install_plugins') )
|
||||
wp_die(__('You do not have sufficient permissions to install plugins on this site.'));
|
||||
wp_die(__('You do not have sufficient permissions to install plugins on this site.'));
|
||||
}
|
||||
|
||||
function prepare_items() {
|
||||
|
@ -4085,8 +4085,8 @@ class WP_Theme_Install_Table extends WP_List_Table {
|
|||
function prepare_items() {
|
||||
include( ABSPATH . 'wp-admin/includes/theme-install.php' );
|
||||
|
||||
global $tabs, $tab, $paged, $type, $term, $theme_field_defaults;
|
||||
|
||||
global $tabs, $tab, $paged, $type, $term, $theme_field_defaults;
|
||||
|
||||
wp_reset_vars( array( 'tab' ) );
|
||||
|
||||
$paged = $this->get_pagenum();
|
||||
|
|
|
@ -148,7 +148,7 @@ class WP_List_Table {
|
|||
function get_pagination_arg( $key ) {
|
||||
if ( 'page' == $key )
|
||||
return $this->get_pagenum();
|
||||
|
||||
|
||||
if ( isset( $this->_pagination_args[$key] ) )
|
||||
return $this->_pagination_args[$key];
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ class WP_List_Table {
|
|||
|
||||
if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
|
||||
return $_REQUEST['action2'];
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ var ThemeViewer;
|
|||
// Set the options
|
||||
opts.search = $( 'input[name=s]' ).val();
|
||||
opts.order = document.location.href.match( /order=(\w*)/ ) ? document.location.href.match( /order=(\w*)/ )[1] : 'random';
|
||||
|
||||
|
||||
$( '#availablethemes td' ).fadeTo( 500, 0.1, function() {
|
||||
$( '#availablethemes td img' ).hide();
|
||||
} );
|
||||
|
@ -55,7 +55,7 @@ var ThemeViewer;
|
|||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// These are the functions we expose
|
||||
var api = {
|
||||
init: init
|
||||
|
|
|
@ -26,9 +26,9 @@ $submenu['themes.php'][10] = array( _x('Add New', 'theme'), 'manage_network_them
|
|||
$submenu['themes.php'][15] = array( _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php' );
|
||||
|
||||
$plugin_update_count = $theme_update_count = $wordpress_update_count = 0;
|
||||
$update_plugins = get_site_transient( 'update_plugins' );
|
||||
if ( !empty($update_plugins->response) )
|
||||
$plugin_update_count = count( $update_plugins->response );
|
||||
$update_plugins = get_site_transient( 'update_plugins' );
|
||||
if ( !empty($update_plugins->response) )
|
||||
$plugin_update_count = count( $update_plugins->response );
|
||||
$menu[20] = array(sprintf( __('Plugins %s'), "<span class='update-plugins count-$plugin_update_count'><span class='plugin-count'>" . number_format_i18n($plugin_update_count) . "</span></span>" ), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div');
|
||||
$submenu['plugins.php'][5] = array( __('Plugins'), 'manage_network_plugins', 'plugins.php' );
|
||||
$submenu['plugins.php'][10] = array( _x('Add New', 'plugin editor'), 'install_plugins', 'plugin-install.php' );
|
||||
|
|
|
@ -40,14 +40,14 @@ include(ABSPATH . 'wp-admin/admin-header.php');
|
|||
?>
|
||||
<div class="wrap">
|
||||
<?php
|
||||
screen_icon();
|
||||
screen_icon();
|
||||
|
||||
if ( is_network_admin() ) : ?>
|
||||
<h2><?php echo esc_html( $title ); ?></h2>
|
||||
<?php else : ?>
|
||||
<h2><a href="themes.php" class="nav-tab"><?php echo esc_html_x('Manage Themes', 'theme'); ?></a><a href="theme-install.php" class="nav-tab nav-tab-active"><?php echo esc_html( $title ); ?></a></h2>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
endif;
|
||||
|
||||
$wp_list_table->views(); ?>
|
||||
|
|
|
@ -146,7 +146,7 @@ if ( ! current_user_can( 'switch_themes' ) ) {
|
|||
|
||||
<?php foreach ( $feature_list as $feature_name => $features ) :
|
||||
$feature_name = esc_html( $feature_name ); ?>
|
||||
|
||||
|
||||
<div class="feature-container">
|
||||
<div class="feature-name"><?php echo $feature_name ?></div>
|
||||
|
||||
|
|
|
@ -342,7 +342,7 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
|
|||
|
||||
if ( !$redirect_url || $redirect_url == $requested_url )
|
||||
return false;
|
||||
|
||||
|
||||
// Hex encoded octets are case-insensitive.
|
||||
if ( false !== strpos($requested_url, '%') ) {
|
||||
if ( !function_exists('lowercase_octets') ) {
|
||||
|
|
|
@ -260,8 +260,8 @@ autosave = function() {
|
|||
post_data["excerpt"] = jQuery("#excerpt").val();
|
||||
if ( jQuery("#post_author").size() )
|
||||
post_data["post_author"] = jQuery("#post_author").val();
|
||||
if ( jQuery("#parent_id").val() )
|
||||
post_data["parent_id"] = jQuery("#parent_id").val();
|
||||
if ( jQuery("#parent_id").val() )
|
||||
post_data["parent_id"] = jQuery("#parent_id").val();
|
||||
post_data["user_ID"] = jQuery("#user-id").val();
|
||||
if ( jQuery('#auto_draft').val() == '1' )
|
||||
post_data["auto_draft"] = '1';
|
||||
|
|
|
@ -314,9 +314,9 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
|||
$possible_object_parents = array_filter( $possible_object_parents );
|
||||
|
||||
foreach ( (array) $menu_items as $key => $menu_item ) {
|
||||
|
||||
|
||||
$menu_items[$key]->current = false;
|
||||
|
||||
|
||||
$classes = (array) $menu_item->classes;
|
||||
$classes[] = 'menu-item';
|
||||
$classes[] = 'menu-item-type-' . $menu_item->type;
|
||||
|
@ -362,7 +362,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
|||
$current_url = untrailingslashit( ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
||||
$item_url = untrailingslashit( strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url );
|
||||
$_indexless_current = untrailingslashit( preg_replace( '/index.php$/', '', $current_url ) );
|
||||
|
||||
|
||||
if ( in_array( $item_url, array( $current_url, $_indexless_current ) ) ) {
|
||||
$classes[] = 'current-menu-item';
|
||||
$menu_items[$key]->current = true;
|
||||
|
@ -383,7 +383,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
|||
$active_parent_object_ids[] = (int) $menu_item->post_parent;
|
||||
$active_object = $menu_item->object;
|
||||
}
|
||||
|
||||
|
||||
if ( untrailingslashit($item_url) == home_url() )
|
||||
$classes[] = 'menu-item-home';
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
|||
$classes = (array) $parent_item->classes;
|
||||
$menu_items[$key]->current_item_ancestor = false;
|
||||
$menu_items[$key]->current_item_parent = false;
|
||||
|
||||
|
||||
if (
|
||||
isset( $parent_item->type ) &&
|
||||
(
|
||||
|
|
|
@ -1111,7 +1111,7 @@ function _get_custom_object_labels( $object, $nohier_vs_hier_defaults ) {
|
|||
*
|
||||
* @access private
|
||||
* @since 3.1.0
|
||||
*/
|
||||
*/
|
||||
function _add_post_type_submenus() {
|
||||
foreach ( get_post_types( array( 'show_ui' => true ) ) as $ptype ) {
|
||||
$ptype_obj = get_post_type_object( $ptype );
|
||||
|
|
|
@ -503,7 +503,7 @@ function get_objects_in_term( $terms, $taxonomies, $args = array() ) {
|
|||
if ( $term = get_term_by( $field, $term, $taxonomy ) )
|
||||
$term = $term->term_id;
|
||||
else
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
$children = array_merge( $children, get_term_children( $term, $taxonomy ) );
|
||||
$children[] = $term;
|
||||
|
@ -2831,7 +2831,7 @@ function get_ancestors($object_id = 0, $object_type = '') {
|
|||
if ( empty( $object_id ) ) {
|
||||
return apply_filters('get_ancestors', $ancestors, $object_id, $object_type);
|
||||
}
|
||||
|
||||
|
||||
if ( is_taxonomy_hierarchical( $object_type ) ) {
|
||||
$term = get_term($object_id, $object_type);
|
||||
while ( ! is_wp_error($term) && ! empty( $term->parent ) && ! in_array( $term->parent, $ancestors ) ) {
|
||||
|
|
|
@ -1043,7 +1043,7 @@ class wpdb {
|
|||
</ul>
|
||||
<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>
|
||||
"/*/WP_I18N_DB_CONN_ERROR*/, $this->dbhost ), 'db_connect_fail' );
|
||||
|
||||
|
||||
//If show errors is disabled then we need to die anyway as we don't have a working DB connection
|
||||
die();
|
||||
}
|
||||
|
|
|
@ -261,7 +261,7 @@ function check_password_reset_key($key, $login) {
|
|||
|
||||
if ( empty( $user ) )
|
||||
return new WP_Error('invalid_key', __('Invalid key'));
|
||||
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue