Remove trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@11971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
235afd2f97
commit
57f26bb58e
|
@ -60,10 +60,10 @@ function wp_import_cleanup( $id ) {
|
|||
*/
|
||||
function wp_import_handle_upload() {
|
||||
if ( !isset($_FILES['import']) ) {
|
||||
$file['error'] = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' );
|
||||
$file['error'] = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' );
|
||||
return $file;
|
||||
}
|
||||
|
||||
|
||||
$overrides = array( 'test_form' => false, 'test_type' => false );
|
||||
$_FILES['import']['name'] .= '.txt';
|
||||
$file = wp_handle_upload( $_FILES['import'], $overrides );
|
||||
|
|
|
@ -347,12 +347,12 @@ function deactivate_plugins($plugins, $silent= false) {
|
|||
continue;
|
||||
if ( ! $silent )
|
||||
do_action( 'deactivate_plugin', trim( $plugin ) );
|
||||
|
||||
|
||||
$key = array_search( $plugin, (array) $current );
|
||||
|
||||
|
||||
if ( false !== $key )
|
||||
array_splice( $current, $key, 1 );
|
||||
|
||||
|
||||
//Used by Plugin updater to internally deactivate plugin, however, not to notify plugins of the fact to prevent plugin output.
|
||||
if ( ! $silent ) {
|
||||
do_action( 'deactivate_' . trim( $plugin ) );
|
||||
|
@ -489,7 +489,7 @@ function delete_plugins($plugins, $redirect = '' ) {
|
|||
}
|
||||
|
||||
function validate_active_plugins() {
|
||||
$check_plugins = apply_filters( 'active_plugins', get_option('active_plugins') );
|
||||
$check_plugins = apply_filters( 'active_plugins', get_option('active_plugins') );
|
||||
|
||||
// Sanity check. If the active plugin list is not an array, make it an
|
||||
// empty array.
|
||||
|
|
|
@ -589,7 +589,7 @@ function add_meta( $post_ID ) {
|
|||
|
||||
$wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->postmeta (post_id,meta_key,meta_value ) VALUES (%s, %s, %s)", $post_ID, $metakey, $metavalue) );
|
||||
do_action( 'added_postmeta', $wpdb->insert_id, $post_ID, $metakey, $metavalue );
|
||||
|
||||
|
||||
return $wpdb->insert_id;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -62,7 +62,7 @@ function press_it() {
|
|||
// Replace the POSTED content <img> with correct uploaded ones. Regex contains fix for Magic Quotes
|
||||
if( !is_wp_error($upload) ) $content = preg_replace('/<img ([^>]*)src=\\\?(\"|\')'.preg_quote(htmlspecialchars($image), '/').'\\\?(\2)([^>\/]*)\/*>/is', $upload, $content);
|
||||
}
|
||||
|
||||
|
||||
// set the post_content and status
|
||||
$quick['post_status'] = isset($_POST['publish']) ? 'publish' : 'draft';
|
||||
$quick['post_content'] = $content;
|
||||
|
|
|
@ -177,7 +177,7 @@ if ( isset($_GET['s']) && $_GET['s'] )
|
|||
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( get_search_query() ) ); ?>
|
||||
</h2>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
$message = '';
|
||||
if ( isset($_GET['posted']) && (int) $_GET['posted'] ) {
|
||||
$_GET['message'] = '1';
|
||||
|
|
|
@ -863,8 +863,8 @@ function wp_trash_comment($comment_id = 0) {
|
|||
do_action('trash_comment', $comment_id);
|
||||
|
||||
add_comment_meta($comment_id,'_wp_trash_meta_status', $comment->comment_approved);
|
||||
add_comment_meta($comment_id,'_wp_trash_meta_time', time() );
|
||||
|
||||
add_comment_meta($comment_id,'_wp_trash_meta_time', time() );
|
||||
|
||||
wp_set_comment_status($comment_id, 'trash');
|
||||
|
||||
do_action('trashed_comment', $comment_id);
|
||||
|
@ -886,7 +886,7 @@ function wp_untrash_comment($comment_id = 0) {
|
|||
do_action('untrash_comment', $comment_id);
|
||||
|
||||
$comment = array('comment_ID'=>$comment_id, 'comment_approved'=>'0');
|
||||
|
||||
|
||||
//Either set comment_approved to the value in comment_meta or worse case to false which will mean moderation
|
||||
$comment['comment_approved'] = get_comment_meta($comment_id, '_wp_trash_meta_status', true);
|
||||
|
||||
|
|
|
@ -3385,7 +3385,7 @@ function wp_scheduled_delete() {
|
|||
}
|
||||
|
||||
$comments_to_delete = $wpdb->get_results($wpdb->prepare("SELECT comment_id FROM $wpdb->commentmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A);
|
||||
|
||||
|
||||
foreach ( (array) $comments_to_delete as $comment ) {
|
||||
wp_delete_comment($comment['comment_id']);
|
||||
}
|
||||
|
|
|
@ -24,15 +24,15 @@ function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique =
|
|||
$meta_key = stripslashes($meta_key);
|
||||
|
||||
if ( $unique && $wpdb->get_var( $wpdb->prepare(
|
||||
"SELECT COUNT(*) FROM $table WHERE meta_key = %s AND $column = %d",
|
||||
"SELECT COUNT(*) FROM $table WHERE meta_key = %s AND $column = %d",
|
||||
$meta_key, $object_id ) ) )
|
||||
return false;
|
||||
|
||||
$meta_value = maybe_serialize( stripslashes_deep($meta_value) );
|
||||
|
||||
$wpdb->insert( $table, array(
|
||||
$column => $object_id,
|
||||
'meta_key' => $meta_key,
|
||||
$column => $object_id,
|
||||
'meta_key' => $meta_key,
|
||||
'meta_value' => $meta_value
|
||||
) );
|
||||
|
||||
|
@ -96,7 +96,7 @@ function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '') {
|
|||
$meta_value = maybe_serialize( stripslashes_deep($meta_value) );
|
||||
|
||||
$query = $wpdb->prepare( "SELECT meta_id FROM $table WHERE meta_key = %s", $meta_key );
|
||||
|
||||
|
||||
if ( $meta_value )
|
||||
$query .= $wpdb->prepare("AND meta_value = %s", $meta_value );
|
||||
|
||||
|
@ -105,9 +105,9 @@ function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '') {
|
|||
return false;
|
||||
|
||||
$query = "DELETE FROM $table WHERE meta_id IN( " . implode( ',', $meta_ids ) . " )";
|
||||
|
||||
|
||||
$count = $wpdb->query($query);
|
||||
|
||||
|
||||
if ( !$count )
|
||||
return false;
|
||||
|
||||
|
@ -177,7 +177,7 @@ function update_meta_cache($meta_type, $object_ids) {
|
|||
// Get meta info
|
||||
$id_list = join(',', $ids);
|
||||
$cache = array();
|
||||
$meta_list = $wpdb->get_results( $wpdb->prepare("SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list)",
|
||||
$meta_list = $wpdb->get_results( $wpdb->prepare("SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list)",
|
||||
$meta_type), ARRAY_A );
|
||||
|
||||
if ( !empty($meta_list) ) {
|
||||
|
|
|
@ -1689,7 +1689,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
|
|||
do_action( 'edit_term_taxonomy', $tt_id );
|
||||
$wpdb->update( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent' ), array( 'term_taxonomy_id' => $tt_id ) );
|
||||
do_action( 'edited_term_taxonomy', $tt_id );
|
||||
|
||||
|
||||
do_action("edit_term", $term_id, $tt_id);
|
||||
do_action("edit_$taxonomy", $term_id, $tt_id);
|
||||
|
||||
|
|
|
@ -907,7 +907,7 @@ add_action('setup_theme', 'preview_theme');
|
|||
*
|
||||
* @since 2.9.0
|
||||
* @access private
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function _preview_theme_template_filter() {
|
||||
|
@ -916,10 +916,10 @@ function _preview_theme_template_filter() {
|
|||
|
||||
/**
|
||||
* Private function to modify the current stylesheet when previewing a theme
|
||||
*
|
||||
*
|
||||
* @since 2.9.0
|
||||
* @access private
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function _preview_theme_stylesheet_filter() {
|
||||
|
|
Loading…
Reference in New Issue