Pink trailing whites.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-12-13 21:21:50 +00:00
parent 93fb27623f
commit 3949ce12d0
35 changed files with 106 additions and 106 deletions

View File

@ -83,9 +83,9 @@ do_action('admin_head');
if ( get_user_setting('mfold') == 'f' ) if ( get_user_setting('mfold') == 'f' )
$admin_body_class .= ' folded'; $admin_body_class .= ' folded';
if ( is_admin_bar_showing() ) if ( is_admin_bar_showing() )
$admin_body_class .= ' admin-bar'; $admin_body_class .= ' admin-bar';
if ( $is_iphone ) { ?> if ( $is_iphone ) { ?>
<style type="text/css">.row-actions{visibility:visible;}</style> <style type="text/css">.row-actions{visibility:visible;}</style>

View File

@ -135,11 +135,11 @@ require_once('./admin-header.php');
<div class="wrap"> <div class="wrap">
<?php screen_icon(); ?> <?php screen_icon(); ?>
<h2><?php <h2><?php
if ( $post_id ) if ( $post_id )
echo sprintf(__('Comments on &#8220;%s&#8221;'), echo sprintf(__('Comments on &#8220;%s&#8221;'),
sprintf('<a href="%s">%s</a>', sprintf('<a href="%s">%s</a>',
get_edit_post_link($post_id), get_edit_post_link($post_id),
wp_html_excerpt(_draft_or_post_title($post_id), 50) wp_html_excerpt(_draft_or_post_title($post_id), 50)
) )
); );

View File

@ -7,7 +7,7 @@
*/ */
/** WordPress Administration Bootstrap */ /** WordPress Administration Bootstrap */
require_once( './admin.php' ); require_once( './admin.php' );
$wp_list_table = get_list_table('WP_Posts_List_Table'); $wp_list_table = get_list_table('WP_Posts_List_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();
$pagenum = $wp_list_table->get_pagenum(); $pagenum = $wp_list_table->get_pagenum();

View File

@ -20,7 +20,7 @@ function add_js() {
?> ?>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
jQuery(document).ready(function($){ jQuery(document).ready(function($){
var form = $('#export-filters'), var form = $('#export-filters'),
filters = form.find('.export-filters'); filters = form.find('.export-filters');
filters.hide(); filters.hide();

View File

@ -53,7 +53,7 @@ class WP_Comments_List_Table extends WP_List_Table {
$orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : ''; $orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : '';
$order = ( isset( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : ''; $order = ( isset( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : '';
$comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' ); $comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );
$comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status ); $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
@ -70,7 +70,7 @@ class WP_Comments_List_Table extends WP_List_Table {
'moderated' => 'hold', 'moderated' => 'hold',
'approved' => 'approve' 'approved' => 'approve'
); );
$args = array( $args = array(
'status' => isset( $status_map[$comment_status] ) ? $status_map[$comment_status] : $comment_status, 'status' => isset( $status_map[$comment_status] ) ? $status_map[$comment_status] : $comment_status,
'search' => $search, 'search' => $search,

View File

@ -516,12 +516,12 @@ class WP_List_Table {
} }
/** /**
* Get a list of sortable columns. The format is: * Get a list of sortable columns. The format is:
* 'internal-name' => 'orderby' * 'internal-name' => 'orderby'
* or * or
* 'internal-name' => array( 'orderby', true ) * 'internal-name' => array( 'orderby', true )
* *
* The second format will make the initial sorting order be descending * The second format will make the initial sorting order be descending
* *
* @since 3.1.0 * @since 3.1.0
* @access protected * @access protected
@ -559,7 +559,7 @@ class WP_List_Table {
$data = (array) $data; $data = (array) $data;
if ( !isset( $data[1] ) ) if ( !isset( $data[1] ) )
$data[1] = false; $data[1] = false;
$sortable[$id] = $data; $sortable[$id] = $data;
} }

View File

@ -317,7 +317,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
</td> </td>
<?php } <?php }
break; break;
default: default:
echo "<td class='$column_name column-$column_name'$style>"; echo "<td class='$column_name column-$column_name'$style>";
do_action( 'manage_sites_custom_column', $column_name, $blog['blog_id'] ); do_action( 'manage_sites_custom_column', $column_name, $blog['blog_id'] );

View File

@ -160,7 +160,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
$style = ' style="display:none;"'; $style = ' style="display:none;"';
$attributes = "$class$style"; $attributes = "$class$style";
switch ( $column_name ) { switch ( $column_name ) {
case 'cb': ?> case 'cb': ?>
@ -219,14 +219,14 @@ class WP_MS_Users_List_Table extends WP_List_Table {
foreach ( (array) $blogs as $key => $val ) { foreach ( (array) $blogs as $key => $val ) {
if ( !can_edit_network( $val->site_id ) ) if ( !can_edit_network( $val->site_id ) )
continue; continue;
$path = ( $val->path == '/' ) ? '' : $val->path; $path = ( $val->path == '/' ) ? '' : $val->path;
echo '<span class="site-' . $val->site_id . '" >'; echo '<span class="site-' . $val->site_id . '" >';
echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . str_replace( '.' . $current_site->domain, '', $val->domain . $path ) . '</a>'; echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . str_replace( '.' . $current_site->domain, '', $val->domain . $path ) . '</a>';
echo ' <small class="row-actions">'; echo ' <small class="row-actions">';
$actions = array(); $actions = array();
$actions['edit'] = '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a>'; $actions['edit'] = '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a>';
$class = ''; $class = '';
if ( get_blog_status( $val->userblog_id, 'spam' ) == 1 ) if ( get_blog_status( $val->userblog_id, 'spam' ) == 1 )
$class .= 'site-spammed '; $class .= 'site-spammed ';
@ -236,11 +236,11 @@ class WP_MS_Users_List_Table extends WP_List_Table {
$class .= 'site-deleted '; $class .= 'site-deleted ';
if ( get_blog_status( $val->userblog_id, 'archived' ) == 1 ) if ( get_blog_status( $val->userblog_id, 'archived' ) == 1 )
$class .= 'site-archived '; $class .= 'site-archived ';
$actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . '</a>'; $actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . '</a>';
$actions = apply_filters('ms_user_list_site_actions', $actions, $val->userblog_id); $actions = apply_filters('ms_user_list_site_actions', $actions, $val->userblog_id);
$i=0; $i=0;
$action_count = count( $actions ); $action_count = count( $actions );
foreach ( $actions as $action => $link ) { foreach ( $actions as $action => $link ) {

View File

@ -286,7 +286,7 @@ class WP_Terms_List_Table extends WP_List_Table {
$args['post_type'] = $post_type; $args['post_type'] = $post_type;
return "<a href='" . add_query_arg( $args, 'edit.php' ) . "'>$count</a>"; return "<a href='" . add_query_arg( $args, 'edit.php' ) . "'>$count</a>";
} }
function column_links( $tag ) { function column_links( $tag ) {

View File

@ -7,10 +7,10 @@
* @since 3.1.0 * @since 3.1.0
*/ */
class WP_Users_List_Table extends WP_List_Table { class WP_Users_List_Table extends WP_List_Table {
var $site_id; var $site_id;
var $is_site_users; var $is_site_users;
function WP_Users_List_Table() { function WP_Users_List_Table() {
$screen = get_current_screen(); $screen = get_current_screen();
$this->is_site_users = 'site-users-network' == $screen->id; $this->is_site_users = 'site-users-network' == $screen->id;
@ -50,7 +50,7 @@ class WP_Users_List_Table extends WP_List_Table {
'role' => $role, 'role' => $role,
'search' => $usersearch 'search' => $usersearch
); );
if ( $this->is_site_users ) if ( $this->is_site_users )
$args['blog_id'] = $this->site_id; $args['blog_id'] = $this->site_id;
@ -79,7 +79,7 @@ class WP_Users_List_Table extends WP_List_Table {
global $wp_roles, $role; global $wp_roles, $role;
if ( $this->is_site_users ) { if ( $this->is_site_users ) {
$url = 'site-users.php?id=' . $this->site_id; $url = 'site-users.php?id=' . $this->site_id;
switch_to_blog( $this->site_id ); switch_to_blog( $this->site_id );
$users_of_blog = count_users(); $users_of_blog = count_users();
restore_current_blog(); restore_current_blog();
@ -160,7 +160,7 @@ class WP_Users_List_Table extends WP_List_Table {
if ( $this->is_site_users ) if ( $this->is_site_users )
unset( $c['posts'] ); unset( $c['posts'] );
return $c; return $c;
} }
@ -171,7 +171,7 @@ class WP_Users_List_Table extends WP_List_Table {
'email' => 'email', 'email' => 'email',
'posts' => 'post_count', 'posts' => 'post_count',
); );
if ( $this->is_site_users ) if ( $this->is_site_users )
unset( $c['posts'] ); unset( $c['posts'] );
@ -213,7 +213,7 @@ class WP_Users_List_Table extends WP_List_Table {
$user_object = new WP_User( (int) $user_object ); $user_object = new WP_User( (int) $user_object );
$user_object = sanitize_user_object( $user_object, 'display' ); $user_object = sanitize_user_object( $user_object, 'display' );
$email = $user_object->user_email; $email = $user_object->user_email;
if ( $this->is_site_users ) if ( $this->is_site_users )
$url = "site-users.php?id={$this->site_id}&amp;"; $url = "site-users.php?id={$this->site_id}&amp;";
else else

View File

@ -144,9 +144,9 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_
if ( isset( $_GET['edit'] ) && $widget_id == $_GET['edit'] ) { if ( isset( $_GET['edit'] ) && $widget_id == $_GET['edit'] ) {
list($url) = explode( '#', add_query_arg( 'edit', false ), 2 ); list($url) = explode( '#', add_query_arg( 'edit', false ), 2 );
$widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( $url ) . '">' . __( 'Cancel' ) . '</a></span>'; $widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( $url ) . '">' . __( 'Cancel' ) . '</a></span>';
$callback = '_wp_dashboard_control_callback'; $callback = '_wp_dashboard_control_callback';
} else { } else {
list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 ); list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 );
$widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Configure' ) . '</a></span>'; $widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Configure' ) . '</a></span>';
} }
} }

View File

@ -117,6 +117,6 @@ function wp_link_dialog() {
</div> </div>
</div> </div>
</form> </form>
<?php <?php
} }
?> ?>

View File

@ -1458,9 +1458,9 @@ if ( is_multisite() && !is_upload_space_available() ) {
do_action('pre-upload-ui'); do_action('pre-upload-ui');
if ( $flash ) : if ( $flash ) :
// Set the post params, which SWFUpload will post back with the file, and pass // Set the post params, which SWFUpload will post back with the file, and pass
// them through a filter. // them through a filter.
$post_params = array( $post_params = array(
"post_id" => $post_id, "post_id" => $post_id,

View File

@ -721,20 +721,20 @@ function revoke_super_admin( $user_id ) {
} }
/** /**
* Whether or not we can edit this network from this page * Whether or not we can edit this network from this page
* *
* By default editing of network is restricted to the Network Admin for that site_id this allows for this to be overridden * By default editing of network is restricted to the Network Admin for that site_id this allows for this to be overridden
* *
* @since 3.1.0 * @since 3.1.0
* @param integer $site_id The network/site id to check. * @param integer $site_id The network/site id to check.
*/ */
function can_edit_network( $site_id ) { function can_edit_network( $site_id ) {
global $wpdb; global $wpdb;
if ($site_id == $wpdb->siteid ) if ($site_id == $wpdb->siteid )
$result = true; $result = true;
else else
$result = false; $result = false;
return apply_filters( 'can_edit_network', $result, $site_id ); return apply_filters( 'can_edit_network', $result, $site_id );
} }
?> ?>

View File

@ -875,7 +875,7 @@ function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $pri
foreach ( array('high', 'core', 'default', 'low') as $a_priority ) { foreach ( array('high', 'core', 'default', 'low') as $a_priority ) {
if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) ) if ( !isset($wp_meta_boxes[$page][$a_context][$a_priority][$id]) )
continue; continue;
// If a core box was previously added or removed by a plugin, don't add. // If a core box was previously added or removed by a plugin, don't add.
if ( 'core' == $priority ) { if ( 'core' == $priority ) {
// If core box previously deleted, don't add // If core box previously deleted, don't add
@ -1538,7 +1538,7 @@ function iframe_header( $title = '', $limit_styles = false ) {
show_admin_bar( false ); show_admin_bar( false );
global $hook_suffix, $current_screen, $current_user, $admin_body_class, $wp_locale; global $hook_suffix, $current_screen, $current_user, $admin_body_class, $wp_locale;
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix); $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>> <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
<head> <head>

View File

@ -45,13 +45,13 @@ adminMenu = {
}); });
}, },
toggle : function(el) { toggle : function(el) {
el.slideToggle(150, function() { el.slideToggle(150, function() {
var id = el.parent().toggleClass( 'wp-menu-open' ).attr('id'); var id = el.parent().toggleClass( 'wp-menu-open' ).attr('id');
if ( id ) { if ( id ) {
$('li.wp-has-submenu', '#adminmenu').each(function(i, e) { $('li.wp-has-submenu', '#adminmenu').each(function(i, e) {
if ( id == e.id ) { if ( id == e.id ) {
var v = $(e).hasClass('wp-menu-open') ? 'o' : 'c'; var v = $(e).hasClass('wp-menu-open') ? 'o' : 'c';
setUserSetting( 'm'+i, v ); setUserSetting( 'm'+i, v );
} }
}); });

View File

@ -35,7 +35,7 @@ var ThemeViewer;
$( '#filter-box' ).slideToggle(); $( '#filter-box' ).slideToggle();
$( '#current-theme' ).slideToggle( 300 ); $( '#current-theme' ).slideToggle( 300 );
}); });
return false; return false;
}); });
} }

View File

@ -365,7 +365,7 @@ define( 'BLOG_ID_CURRENT_SITE', 1 );</textarea>
if ( defined( $c ) ) if ( defined( $c ) )
unset( $keys_salts[ $c ] ); unset( $keys_salts[ $c ] );
} }
if ( ! empty( $keys_salts ) ) { if ( ! empty( $keys_salts ) ) {
$keys_salts_str = ''; $keys_salts_str = '';
$from_api = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' ); $from_api = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' );
if ( is_wp_error( $from_api ) ) { if ( is_wp_error( $from_api ) ) {

View File

@ -13,7 +13,7 @@ if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-informat
require_once('./admin.php'); require_once('./admin.php');
if ( ! current_user_can('install_plugins') ) 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.'));
if ( is_multisite() && ! is_network_admin() ) { if ( is_multisite() && ! is_network_admin() ) {
wp_redirect( network_admin_url( 'plugin-install.php' ) ); wp_redirect( network_admin_url( 'plugin-install.php' ) );
exit(); exit();

View File

@ -11,7 +11,7 @@ require_once('./admin.php');
if ( !current_user_can('activate_plugins') ) if ( !current_user_can('activate_plugins') )
wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) ); wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
$wp_list_table = get_list_table('WP_Plugins_List_Table'); $wp_list_table = get_list_table('WP_Plugins_List_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();

View File

@ -332,7 +332,7 @@ var photostorage = false;
if ( user_can_richedit() ) { if ( user_can_richedit() ) {
wp_tiny_mce( true, array( 'height' => '370' ) ); wp_tiny_mce( true, array( 'height' => '370' ) );
wp_tiny_mce_preload_dialogs(); wp_tiny_mce_preload_dialogs();
} }
?> ?>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -8,7 +8,7 @@
if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'theme-information' == $_GET['tab'] ) ) if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'theme-information' == $_GET['tab'] ) )
define( 'IFRAME_REQUEST', true ); define( 'IFRAME_REQUEST', true );
/** WordPress Administration Bootstrap */ /** WordPress Administration Bootstrap */
require_once('./admin.php'); require_once('./admin.php');
if ( ! current_user_can('install_themes') ) if ( ! current_user_can('install_themes') )

View File

@ -10,7 +10,7 @@
require_once('./admin.php'); require_once('./admin.php');
if ( !current_user_can('switch_themes') && !current_user_can('edit_theme_options') ) if ( !current_user_can('switch_themes') && !current_user_can('edit_theme_options') )
wp_die( __( 'Cheatin&#8217; uh?' ) ); wp_die( __( 'Cheatin&#8217; uh?' ) );
$wp_list_table = get_list_table('WP_Themes_List_Table'); $wp_list_table = get_list_table('WP_Themes_List_Table');
$wp_list_table->check_permissions(); $wp_list_table->check_permissions();

View File

@ -67,7 +67,7 @@ function get_the_category( $id = false ) {
$categories = get_the_terms( $id, 'category' ); $categories = get_the_terms( $id, 'category' );
if ( ! $categories ) if ( ! $categories )
$categories = array(); $categories = array();
$categories = array_values( $categories ); $categories = array_values( $categories );
foreach ( array_keys( $categories ) as $key ) { foreach ( array_keys( $categories ) as $key ) {
@ -1073,7 +1073,7 @@ function get_the_terms( $id = 0, $taxonomy ) {
$terms = wp_get_object_terms( $id, $taxonomy ); $terms = wp_get_object_terms( $id, $taxonomy );
wp_cache_add($id, $terms, $taxonomy . '_relationships'); wp_cache_add($id, $terms, $taxonomy . '_relationships');
} }
$terms = apply_filters( 'get_the_terms', $terms, $id, $taxonomy ); $terms = apply_filters( 'get_the_terms', $terms, $id, $taxonomy );
if ( empty( $terms ) ) if ( empty( $terms ) )

View File

@ -179,13 +179,13 @@ class WP_Admin_Bar {
add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 30 ); add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 30 );
add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 ); add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 );
add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 70 ); add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 70 );
if ( !is_network_admin() && !is_user_admin() ) { if ( !is_network_admin() && !is_user_admin() ) {
add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 40 ); add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 40 );
add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 50 ); add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 50 );
add_action( 'admin_bar_menu', 'wp_admin_bar_appearance_menu', 60 ); add_action( 'admin_bar_menu', 'wp_admin_bar_appearance_menu', 60 );
} }
do_action( 'add_admin_bar_menus' ); do_action( 'add_admin_bar_menus' );
} }

View File

@ -1101,7 +1101,7 @@ class wp_xmlrpc_server extends IXR_Server {
if ( !current_user_can( 'edit_comment', $comment_ID ) ) if ( !current_user_can( 'edit_comment', $comment_ID ) )
return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) );
do_action('xmlrpc_call', 'wp.deleteComment'); do_action('xmlrpc_call', 'wp.deleteComment');
if ( ! get_comment($comment_ID) ) if ( ! get_comment($comment_ID) )
@ -1135,7 +1135,7 @@ class wp_xmlrpc_server extends IXR_Server {
if ( !current_user_can( 'edit_comment', $comment_ID ) ) if ( !current_user_can( 'edit_comment', $comment_ID ) )
return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) ); return new IXR_Error( 403, __( 'You are not allowed to moderate comments on this site.' ) );
do_action('xmlrpc_call', 'wp.editComment'); do_action('xmlrpc_call', 'wp.editComment');
if ( ! get_comment($comment_ID) ) if ( ! get_comment($comment_ID) )
@ -1608,18 +1608,18 @@ class wp_xmlrpc_server extends IXR_Server {
return $attachments_struct; return $attachments_struct;
} }
/** /**
* Retrives a list of post formats used by the site * Retrives a list of post formats used by the site
* *
* @since 3.1 * @since 3.1
* *
* @param array $args Method parameters. Contains: * @param array $args Method parameters. Contains:
* - blog_id * - blog_id
* - username * - username
* - password * - password
* @return array * @return array
*/ */
function wp_getPostFormats( $args ) { function wp_getPostFormats( $args ) {
$this->escape( $args ); $this->escape( $args );
@ -1629,10 +1629,10 @@ class wp_xmlrpc_server extends IXR_Server {
if ( !$user = $this->login( $username, $password ) ) if ( !$user = $this->login( $username, $password ) )
return $this->error; return $this->error;
do_action( 'xmlrpc_call', 'wp.getPostFormats' ); do_action( 'xmlrpc_call', 'wp.getPostFormats' );
return get_post_format_strings(); return get_post_format_strings();
} }
/* Blogger API functions. /* Blogger API functions.
* specs on http://plant.blogger.com/api and http://groups.yahoo.com/group/bloggerDev/ * specs on http://plant.blogger.com/api and http://groups.yahoo.com/group/bloggerDev/
@ -2092,7 +2092,7 @@ class wp_xmlrpc_server extends IXR_Server {
return $this->error; return $this->error;
do_action('xmlrpc_call', 'metaWeblog.newPost'); do_action('xmlrpc_call', 'metaWeblog.newPost');
$page_template = ''; $page_template = '';
if ( !empty( $content_struct['post_type'] ) ) { if ( !empty( $content_struct['post_type'] ) ) {
if ( $content_struct['post_type'] == 'page' ) { if ( $content_struct['post_type'] == 'page' ) {
@ -2127,15 +2127,15 @@ class wp_xmlrpc_server extends IXR_Server {
else else
$cap = 'edit_posts'; $cap = 'edit_posts';
$error_message = __( 'Sorry, you are not allowed to publish posts on this site.' ); $error_message = __( 'Sorry, you are not allowed to publish posts on this site.' );
$post_type = 'post'; $post_type = 'post';
} }
if ( !current_user_can( $cap ) ) if ( !current_user_can( $cap ) )
return new IXR_Error( 401, $error_message ); return new IXR_Error( 401, $error_message );
// Check for a valid post format if one was given // Check for a valid post format if one was given
if ( isset( $content_struct['wp_post_format'] ) ) { if ( isset( $content_struct['wp_post_format'] ) ) {
$content_struct['wp_post_format'] = sanitize_key( $content_struct['wp_post_format'] ); $content_struct['wp_post_format'] = sanitize_key( $content_struct['wp_post_format'] );
if ( !array_key_exists( $content_struct['wp_post_format'], get_post_format_strings() ) ) { if ( !array_key_exists( $content_struct['wp_post_format'], get_post_format_strings() ) ) {
return new IXR_Error( 404, __( 'Invalid post format' ) ); return new IXR_Error( 404, __( 'Invalid post format' ) );
} }
@ -2330,11 +2330,11 @@ class wp_xmlrpc_server extends IXR_Server {
$this->add_enclosure_if_new($post_ID, $thisEnclosure); $this->add_enclosure_if_new($post_ID, $thisEnclosure);
$this->attach_uploads( $post_ID, $post_content ); $this->attach_uploads( $post_ID, $post_content );
// Handle post formats if assigned, value is validated earlier // Handle post formats if assigned, value is validated earlier
// in this function // in this function
if ( isset( $content_struct['wp_post_format'] ) ) if ( isset( $content_struct['wp_post_format'] ) )
wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' ); wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' );
logIO('O', "Posted ! ID: $post_ID"); logIO('O', "Posted ! ID: $post_ID");
@ -2436,15 +2436,15 @@ class wp_xmlrpc_server extends IXR_Server {
else else
$cap = 'edit_posts'; $cap = 'edit_posts';
$error_message = __( 'Sorry, you are not allowed to publish posts on this site.' ); $error_message = __( 'Sorry, you are not allowed to publish posts on this site.' );
$post_type = 'post'; $post_type = 'post';
} }
if ( !current_user_can( $cap ) ) if ( !current_user_can( $cap ) )
return new IXR_Error( 401, $error_message ); return new IXR_Error( 401, $error_message );
// Check for a valid post format if one was given // Check for a valid post format if one was given
if ( isset( $content_struct['wp_post_format'] ) ) { if ( isset( $content_struct['wp_post_format'] ) ) {
$content_struct['wp_post_format'] = sanitize_key( $content_struct['wp_post_format'] ); $content_struct['wp_post_format'] = sanitize_key( $content_struct['wp_post_format'] );
if ( !array_key_exists( $content_struct['wp_post_format'], get_post_format_strings() ) ) { if ( !array_key_exists( $content_struct['wp_post_format'], get_post_format_strings() ) ) {
return new IXR_Error( 404, __( 'Invalid post format' ) ); return new IXR_Error( 404, __( 'Invalid post format' ) );
} }
@ -2649,11 +2649,11 @@ class wp_xmlrpc_server extends IXR_Server {
$this->add_enclosure_if_new($post_ID, $thisEnclosure); $this->add_enclosure_if_new($post_ID, $thisEnclosure);
$this->attach_uploads( $ID, $post_content ); $this->attach_uploads( $ID, $post_content );
// Handle post formats if assigned, validation is handled // Handle post formats if assigned, validation is handled
// earlier in this function // earlier in this function
if ( isset( $content_struct['wp_post_format'] ) ) if ( isset( $content_struct['wp_post_format'] ) )
wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' ); wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' );
logIO('O',"(MW) Edited ! ID: $post_ID"); logIO('O',"(MW) Edited ! ID: $post_ID");
@ -2721,8 +2721,8 @@ class wp_xmlrpc_server extends IXR_Server {
// Consider future posts as published // Consider future posts as published
if ( $postdata['post_status'] === 'future' ) if ( $postdata['post_status'] === 'future' )
$postdata['post_status'] = 'publish'; $postdata['post_status'] = 'publish';
// Get post format // Get post format
$post_format = get_post_format( $post_ID ); $post_format = get_post_format( $post_ID );
if ( empty( $post_format ) ) if ( empty( $post_format ) )
$post_format = 'standard'; $post_format = 'standard';
@ -2848,8 +2848,8 @@ class wp_xmlrpc_server extends IXR_Server {
// Consider future posts as published // Consider future posts as published
if ( $entry['post_status'] === 'future' ) if ( $entry['post_status'] === 'future' )
$entry['post_status'] = 'publish'; $entry['post_status'] = 'publish';
// Get post format // Get post format
$post_format = get_post_format( $entry['ID'] ); $post_format = get_post_format( $entry['ID'] );
if ( empty( $post_format ) ) if ( empty( $post_format ) )
$post_format = 'standard'; $post_format = 'standard';

View File

@ -23,7 +23,7 @@
text-decoration: none; text-decoration: none;
} }
#wpadminbar ul, #wpadminbar ul,
#wpadminbar ul li { #wpadminbar ul li {
background: none; background: none;
list-style: none; list-style: none;
@ -111,7 +111,7 @@
#wpadminbar .quicklinks li:hover { #wpadminbar .quicklinks li:hover {
background: #555; background: #555;
background: -moz-linear-gradient(bottom, #555, #3e3e3e); background: -moz-linear-gradient(bottom, #555, #3e3e3e);
background: -webkit-gradient(linear, left bottom, left top, from(#555), to(#3e3e3e)); background: -webkit-gradient(linear, left bottom, left top, from(#555), to(#3e3e3e));
} }
#wpadminbar .quicklinks .menupop li:hover { #wpadminbar .quicklinks .menupop li:hover {
@ -209,7 +209,7 @@
text-shadow: 0px 1px 0px #eee; text-shadow: 0px 1px 0px #eee;
cursor: pointer; cursor: pointer;
float: left; float: left;
background: #aaa; background: #aaa;
background: -moz-linear-gradient(bottom, #aaa, #cecece); background: -moz-linear-gradient(bottom, #aaa, #cecece);
background: -webkit-gradient(linear, left bottom, left top, from(#aaa), to(#cecece)); background: -webkit-gradient(linear, left bottom, left top, from(#aaa), to(#cecece));
-webkit-border-radius: 10px; -webkit-border-radius: 10px;
@ -222,7 +222,7 @@
} }
#wpadminbar #adminbarsearch .adminbar-button:active { #wpadminbar #adminbarsearch .adminbar-button:active {
background: #a0a0a0; background: #a0a0a0;
background:-moz-linear-gradient(bottom, #a0a0a0, #c1c1c1); background:-moz-linear-gradient(bottom, #a0a0a0, #c1c1c1);
background:-webkit-gradient(linear, left bottom, left top, from(#a0a0a0), to(#c1c1c1)); background:-webkit-gradient(linear, left bottom, left top, from(#a0a0a0), to(#c1c1c1));
-moz-box-shadow: inset 1px 1px 1px #9b9b9b; -moz-box-shadow: inset 1px 1px 1px #9b9b9b;

View File

@ -71,7 +71,7 @@
* http://docs.jquery.com/UI/Dialog#theming * http://docs.jquery.com/UI/Dialog#theming
*/ */
.wp-dialog { position: absolute; width: 300px; overflow: hidden; } .wp-dialog { position: absolute; width: 300px; overflow: hidden; }
.wp-dialog .ui-dialog-titlebar { position: relative; } .wp-dialog .ui-dialog-titlebar { position: relative; }
.wp-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } .wp-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.wp-dialog .ui-dialog-content { position: relative; border: 0; padding: 0; background: none; overflow: auto; zoom: 1; } .wp-dialog .ui-dialog-content { position: relative; border: 0; padding: 0; background: none; overflow: auto; zoom: 1; }
.wp-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } .wp-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }

View File

@ -4196,7 +4196,7 @@ function wp_scheduled_delete() {
* Searches for metadata in the first 8kiB of a file, such as a plugin or theme. * Searches for metadata in the first 8kiB of a file, such as a plugin or theme.
* Each piece of metadata must be on its own line. Fields can not span multple * Each piece of metadata must be on its own line. Fields can not span multple
* lines, the value will get cut at the end of the first line. * lines, the value will get cut at the end of the first line.
* *
* If the file data is not within that first 8kiB, then the author should correct * If the file data is not within that first 8kiB, then the author should correct
* their plugin file and move the data headers to the top. * their plugin file and move the data headers to the top.
* *

View File

@ -324,8 +324,8 @@ wpList = {
var list = this, var list = this,
$el = $(el || document); $el = $(el || document);
$el.delegate( "form[class^=add:" + list.id + ":]", 'submit', function(){ $el.delegate( "form[class^=add:" + list.id + ":]", 'submit', function(){
return list.wpList.add(this); return list.wpList.add(this);
}); });
$el.delegate( "[class^=add:" + list.id + ":]:not(form)", 'click', function(){ $el.delegate( "[class^=add:" + list.id + ":]:not(form)", 'click', function(){
@ -333,7 +333,7 @@ wpList = {
}); });
$el.delegate( "[class^=delete:" + list.id + ":]", 'click', function(){ $el.delegate( "[class^=delete:" + list.id + ":]", 'click', function(){
return list.wpList.del(this); return list.wpList.del(this);
}); });
$el.delegate( "[class^=dim:" + list.id + ":]", 'click', function(){ $el.delegate( "[class^=dim:" + list.id + ":]", 'click', function(){

View File

@ -671,10 +671,10 @@ function get_blog_status( $id, $pref ) {
*/ */
function get_last_updated( $deprecated = '', $start = 0, $quantity = 40 ) { function get_last_updated( $deprecated = '', $start = 0, $quantity = 40 ) {
global $wpdb; global $wpdb;
if ( ! empty( $deprecated ) ) if ( ! empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, 'MU' ); // never used _deprecated_argument( __FUNCTION__, 'MU' ); // never used
return $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", $wpdb->siteid, $start, $quantity ) , ARRAY_A ); return $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", $wpdb->siteid, $start, $quantity ) , ARRAY_A );
} }

View File

@ -2318,7 +2318,7 @@ function wp_get_single_post($postid = 0, $mode = OBJECT) {
$post = get_post($postid, $mode); $post = get_post($postid, $mode);
if ( if (
( OBJECT == $mode && empty( $post->ID ) ) || ( OBJECT == $mode && empty( $post->ID ) ) ||
( OBJECT != $mode && empty( $post['ID'] ) ) ( OBJECT != $mode && empty( $post['ID'] ) )
) )
@ -3827,7 +3827,7 @@ function wp_get_attachment_url( $post_id = 0 ) {
if ( 'attachment' != $post->post_type || empty( $url ) ) if ( 'attachment' != $post->post_type || empty( $url ) )
return false; return false;
return $url; return $url;
} }

View File

@ -604,7 +604,7 @@ class WP_Tax_Query {
$query = array_merge( $defaults, $query ); $query = array_merge( $defaults, $query );
$query['terms'] = (array) $query['terms']; $query['terms'] = (array) $query['terms'];
$this->queries[] = $query; $this->queries[] = $query;
} }
} }
@ -706,7 +706,7 @@ class WP_Tax_Query {
* @param array &$terms The list of terms * @param array &$terms The list of terms
* @param string $taxonomy The taxonomy of the terms * @param string $taxonomy The taxonomy of the terms
* @param string $field The initial field * @param string $field The initial field
* @param string $resulting_field The resulting field * @param string $resulting_field The resulting field
*/ */
function _transform_terms( &$terms, $taxonomy, $field, $resulting_field ) { function _transform_terms( &$terms, $taxonomy, $field, $resulting_field ) {
global $wpdb; global $wpdb;
@ -1582,8 +1582,8 @@ function wp_count_terms( $taxonomy, $args = array() ) {
/** /**
* Will unlink the object from the taxonomy or taxonomies. * Will unlink the object from the taxonomy or taxonomies.
* *
* Will remove all relationships between the object and any terms in * Will remove all relationships between the object and any terms in
* a particular taxonomy or taxonomies. Does not remove the term or * a particular taxonomy or taxonomies. Does not remove the term or
* taxonomy itself. * taxonomy itself.
* *
* @package WordPress * @package WordPress
@ -1697,8 +1697,8 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
// Clean the relationship caches for all object types using this term // Clean the relationship caches for all object types using this term
$tax_object = get_taxonomy( $taxonomy ); $tax_object = get_taxonomy( $taxonomy );
foreach ( $tax_object->object_type as $object_type ) foreach ( $tax_object->object_type as $object_type )
clean_object_term_cache( $objects, $object_type ); clean_object_term_cache( $objects, $object_type );
do_action( 'delete_term_taxonomy', $tt_id ); do_action( 'delete_term_taxonomy', $tt_id );
$wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = %d", $tt_id ) ); $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = %d", $tt_id ) );
do_action( 'deleted_term_taxonomy', $tt_id ); do_action( 'deleted_term_taxonomy', $tt_id );

View File

@ -1479,7 +1479,7 @@ function add_custom_image_header( $header_callback, $admin_header_callback, $adm
function remove_custom_image_header() { function remove_custom_image_header() {
if ( ! current_theme_supports( 'custom-header' ) ) if ( ! current_theme_supports( 'custom-header' ) )
return false; return false;
$callback = get_theme_support( 'custom-header' ); $callback = get_theme_support( 'custom-header' );
remove_action( 'wp_head', $callback[0]['callback'] ); remove_action( 'wp_head', $callback[0]['callback'] );
_remove_theme_support( 'custom-header' ); _remove_theme_support( 'custom-header' );
@ -1619,7 +1619,7 @@ function add_custom_background( $header_callback = '', $admin_header_callback =
function remove_custom_background() { function remove_custom_background() {
if ( ! current_theme_supports( 'custom-background' ) ) if ( ! current_theme_supports( 'custom-background' ) )
return false; return false;
$callback = get_theme_support( 'custom-background' ); $callback = get_theme_support( 'custom-background' );
remove_action( 'wp_head', $callback[0]['callback'] ); remove_action( 'wp_head', $callback[0]['callback'] );
_remove_theme_support( 'custom-background' ); _remove_theme_support( 'custom-background' );

View File

@ -677,7 +677,7 @@ d = document.getElementById('user_login');
<?php if ( 'invalid_username' == $errors->get_error_code() ) { ?> <?php if ( 'invalid_username' == $errors->get_error_code() ) { ?>
if( d.value != '' ) if( d.value != '' )
d.value = ''; d.value = '';
<?php <?php
} }
}?> }?>
d.focus(); d.focus();