mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 02:34:38 +00:00
Strip trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@10150 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -90,7 +90,7 @@ class WP_Filesystem_Base {
|
||||
function wp_themes_dir() {
|
||||
return $this->wp_content_dir() . '/themes';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Locates a folder on the remote filesystem.
|
||||
*
|
||||
@@ -136,7 +136,7 @@ class WP_Filesystem_Base {
|
||||
*
|
||||
* @since 2.7
|
||||
* @access public
|
||||
*
|
||||
*
|
||||
* @param string $folder the folder to locate
|
||||
* @return string The location of the remote path.
|
||||
*/
|
||||
@@ -164,7 +164,7 @@ class WP_Filesystem_Base {
|
||||
*
|
||||
* @since 2.7
|
||||
* @access private
|
||||
*
|
||||
*
|
||||
* @param string $folder the folder to locate
|
||||
* @param string $base the folder to start searching from
|
||||
* @param bool $loop if the function has recursed, Internal use only
|
||||
|
||||
@@ -79,10 +79,10 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
$this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username']));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//Set the Connection to use Passive FTP
|
||||
@ftp_pasv( $this->link, true );
|
||||
|
||||
@ftp_pasv( $this->link, true );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,12 +90,12 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
$this->options['username'] = $opt['username'];
|
||||
|
||||
if ( ( !empty ($opt['public_key']) ) && ( !empty ($opt['private_key']) ) ) {
|
||||
$this->options['public_key'] = $opt['public_key'];
|
||||
$this->options['public_key'] = $opt['public_key'];
|
||||
$this->options['private_key'] = $opt['private_key'];
|
||||
|
||||
|
||||
$this->options['hostkey'] = array("hostkey" => "ssh-rsa");
|
||||
|
||||
$this->keys = true;
|
||||
|
||||
$this->keys = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,18 +105,18 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
} else {
|
||||
$this->options['password'] = $opt['password'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function connect() {
|
||||
$this->debug("connect();");
|
||||
|
||||
|
||||
if ( ! $this->keys ) {
|
||||
$this->link = @ssh2_connect($this->options['hostname'], $this->options['port']);
|
||||
$this->link = @ssh2_connect($this->options['hostname'], $this->options['port']);
|
||||
} else {
|
||||
$this->link = @ssh2_connect($this->options['hostname'], $this->options['port'], $this->options['hostkey']);
|
||||
$this->link = @ssh2_connect($this->options['hostname'], $this->options['port'], $this->options['hostkey']);
|
||||
}
|
||||
|
||||
|
||||
if ( ! $this->link ) {
|
||||
$this->errors->add('connect', sprintf(__('Failed to connect to SSH2 Server %1$s:%2$s'), $this->options['hostname'], $this->options['port']));
|
||||
return false;
|
||||
@@ -358,7 +358,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
function touch($file, $time = 0, $atime = 0) {
|
||||
//Not implmented.
|
||||
}
|
||||
|
||||
|
||||
function mkdir($path, $chmod = null, $chown = false, $chgrp = false) {
|
||||
$this->debug("mkdir();");
|
||||
$path = untrailingslashit($path);
|
||||
|
||||
@@ -134,7 +134,7 @@ function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
|
||||
wp_dashboard_trigger_widget_control( $meta_box['id'] );
|
||||
echo "<p class='submit'><input type='hidden' name='widget_id' value='$meta_box[id]' /><input type='submit' value='" . __( 'Submit' ) . "' /></p>";
|
||||
|
||||
echo '</form>';
|
||||
echo '</form>';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -276,7 +276,7 @@ function wp_dashboard_right_now() {
|
||||
} else {
|
||||
printf(__ngettext('Theme <span class="b">%1$s</span> with <span class="b">%2$s Widget</span>', 'Theme <span class="b">%1$s</span> with <span class="b">%2$s Widgets</span>', $num_widgets), $ct->title, $num);
|
||||
}
|
||||
|
||||
|
||||
echo '</p>';
|
||||
|
||||
update_right_now_message();
|
||||
@@ -304,7 +304,7 @@ function wp_dashboard_quick_press() {
|
||||
'orderby' => 'modified',
|
||||
'order' => 'DESC'
|
||||
) );
|
||||
|
||||
|
||||
if ( $drafts_query->posts )
|
||||
$drafts =& $drafts_query->posts;
|
||||
}
|
||||
@@ -329,7 +329,7 @@ function wp_dashboard_quick_press() {
|
||||
<div class="textarea-wrap">
|
||||
<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" tabindex="2"><?php echo $post->post_content; ?></textarea>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">edCanvas = document.getElementById('content');edInsertContent = null;</script>
|
||||
|
||||
<h4><label for="tags-input"><?php _e('Tags') ?></label></h4>
|
||||
@@ -437,7 +437,7 @@ function wp_dashboard_recent_comments() {
|
||||
if ( current_user_can('edit_posts') ) { ?>
|
||||
<p class="textright"><a href="edit-comments.php" class="button"><?php _e('View all'); ?></a></p>
|
||||
<?php }
|
||||
|
||||
|
||||
wp_comment_reply( -1, false, 'dashboard', false );
|
||||
|
||||
else :
|
||||
@@ -785,7 +785,7 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar
|
||||
*/
|
||||
function wp_dashboard_trigger_widget_control( $widget_control_id = false ) {
|
||||
global $wp_dashboard_control_callbacks;
|
||||
|
||||
|
||||
if ( is_scalar($widget_control_id) && $widget_control_id && isset($wp_dashboard_control_callbacks[$widget_control_id]) && is_callable($wp_dashboard_control_callbacks[$widget_control_id]) ) {
|
||||
call_user_func( $wp_dashboard_control_callbacks[$widget_control_id], '', array( 'id' => $widget_control_id, 'callback' => $wp_dashboard_control_callbacks[$widget_control_id] ) );
|
||||
}
|
||||
|
||||
@@ -662,11 +662,11 @@ function request_filesystem_credentials($form_post, $type = '', $error = false)
|
||||
$credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? $_POST['hostname'] : $credentials['hostname']);
|
||||
$credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? $_POST['username'] : $credentials['username']);
|
||||
$credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? $_POST['password'] : $credentials['password']);
|
||||
|
||||
|
||||
// Check to see if we are setting the public/private keys for ssh
|
||||
$credentials['public_key'] = defined('FTP_PUBKEY') ? FTP_PUBKEY : (!empty($_POST['public_key']) ? $_POST['public_key'] : $credentials['public_key']);
|
||||
$credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? $_POST['private_key'] : $credentials['private_key']);
|
||||
|
||||
$credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? $_POST['private_key'] : $credentials['private_key']);
|
||||
|
||||
if ( strpos($credentials['hostname'], ':') )
|
||||
list( $credentials['hostname'], $credentials['port'] ) = explode(':', $credentials['hostname'], 2);
|
||||
|
||||
@@ -704,7 +704,7 @@ jQuery(function($){
|
||||
});
|
||||
jQuery("#ftp, #ftps").click(function () {
|
||||
jQuery("#ssh_keys").hide();
|
||||
});
|
||||
});
|
||||
});
|
||||
-->
|
||||
</script>
|
||||
|
||||
@@ -94,7 +94,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
|
||||
$metadata['height'] = $imagesize[1];
|
||||
list($uwidth, $uheight) = wp_shrink_dimensions($metadata['width'], $metadata['height']);
|
||||
$metadata['hwstring_small'] = "height='$uheight' width='$uwidth'";
|
||||
|
||||
|
||||
// Make the file path relative to the upload dir
|
||||
if ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) { // Get upload directory
|
||||
if ( 0 === strpos($file, $uploads['basedir']) ) {// Check that the upload base exists in the file path
|
||||
|
||||
@@ -102,7 +102,7 @@ function the_media_upload_tabs() {
|
||||
function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = false, $size='medium') {
|
||||
|
||||
$htmlalt = ( empty($alt) ) ? $title : $alt;
|
||||
|
||||
|
||||
$html = get_image_tag($id, $htmlalt, $title, $align, $size);
|
||||
|
||||
$rel = $rel ? ' rel="attachment wp-att-'.attribute_escape($id).'"' : '';
|
||||
@@ -473,7 +473,7 @@ function media_upload_image() {
|
||||
$errors['upload_notice'] = __('Saved.');
|
||||
return media_upload_gallery();
|
||||
}
|
||||
|
||||
|
||||
if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' )
|
||||
return wp_iframe( 'media_upload_type_url_form', 'image', $errors, $id );
|
||||
|
||||
@@ -501,10 +501,10 @@ function media_sideload_image($file, $post_id, $desc = null) {
|
||||
@unlink($file_array['tmp_name']);
|
||||
$file_array['tmp_name'] = '';
|
||||
}
|
||||
|
||||
|
||||
$id = media_handle_sideload($file_array, $post_id, $desc);
|
||||
$src = $id;
|
||||
|
||||
|
||||
if ( is_wp_error($id) ) {
|
||||
@unlink($file_array['tmp_name']);
|
||||
return $id;
|
||||
@@ -567,7 +567,7 @@ function media_upload_audio() {
|
||||
|
||||
if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' )
|
||||
return wp_iframe( 'media_upload_type_url_form', 'audio', $errors, $id );
|
||||
|
||||
|
||||
return wp_iframe( 'media_upload_type_form', 'audio', $errors, $id );
|
||||
}
|
||||
|
||||
@@ -620,7 +620,7 @@ function media_upload_video() {
|
||||
|
||||
if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' )
|
||||
return wp_iframe( 'media_upload_type_url_form', 'video', $errors, $id );
|
||||
|
||||
|
||||
return wp_iframe( 'media_upload_type_form', 'video', $errors, $id );
|
||||
}
|
||||
|
||||
@@ -673,7 +673,7 @@ function media_upload_file() {
|
||||
|
||||
if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' )
|
||||
return wp_iframe( 'media_upload_type_url_form', 'file', $errors, $id );
|
||||
|
||||
|
||||
return wp_iframe( 'media_upload_type_form', 'file', $errors, $id );
|
||||
}
|
||||
|
||||
@@ -731,16 +731,16 @@ function media_upload_library() {
|
||||
* @return unknown
|
||||
*/
|
||||
function image_align_input_fields($post, $checked='') {
|
||||
|
||||
|
||||
$alignments = array('none' => 'None', 'left' => 'Left', 'center' => 'Center', 'right' => 'Right');
|
||||
if ( !array_key_exists($checked, $alignments) )
|
||||
$checked = 'none';
|
||||
|
||||
|
||||
$out = array();
|
||||
foreach ($alignments as $name => $label) {
|
||||
|
||||
|
||||
$out[] = "<input type='radio' name='attachments[{$post->ID}][align]' id='image-align-{$name}-{$post->ID}' value='$name'".
|
||||
( $checked == $name ? " checked='checked'" : "" ) .
|
||||
( $checked == $name ? " checked='checked'" : "" ) .
|
||||
" /><label for='image-align-{$name}-{$post->ID}' class='align image-align-{$name}-label'>" . __($label) . "</label>";
|
||||
}
|
||||
return join("\n", $out);
|
||||
@@ -756,9 +756,9 @@ function image_align_input_fields($post, $checked='') {
|
||||
* @return unknown
|
||||
*/
|
||||
function image_size_input_fields($post, $checked='') {
|
||||
|
||||
|
||||
// get a list of the actual pixel dimensions of each possible intermediate version of this image
|
||||
$size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size'));
|
||||
$size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size'));
|
||||
|
||||
foreach ( $size_names as $size => $name) {
|
||||
$downsize = image_downsize($post->ID, $size);
|
||||
@@ -772,19 +772,19 @@ function image_size_input_fields($post, $checked='') {
|
||||
// if $checked was not specified, default to the first available size that's bigger than a thumbnail
|
||||
if ( !$checked && $enabled && 'thumbnail' != $size )
|
||||
$checked = $size;
|
||||
|
||||
|
||||
$html = "<div class='image-size-item'><input type='radio' ".( $enabled ? '' : "disabled='disabled'")."name='attachments[$post->ID][image-size]' id='{$css_id}' value='{$size}'".( $checked == $size ? " checked='checked'" : '') ." />";
|
||||
|
||||
|
||||
$html .= "<label for='{$css_id}'>" . __($name). "</label>";
|
||||
// only show the dimensions if that choice is available
|
||||
if ( $enabled )
|
||||
$html .= " <label for='{$css_id}' class='help'>" . sprintf( __("(%d × %d)"), $downsize[1], $downsize[2] ). "</label>";
|
||||
|
||||
|
||||
$html .= '</div>';
|
||||
|
||||
|
||||
$out[] = $html;
|
||||
}
|
||||
|
||||
|
||||
return array(
|
||||
'label' => __('Size'),
|
||||
'input' => 'html',
|
||||
@@ -811,7 +811,7 @@ function image_link_input_fields($post, $url_type='') {
|
||||
$url = $file;
|
||||
elseif ( $url_type == 'post' )
|
||||
$url = $link;
|
||||
|
||||
|
||||
return "<input type='text' class='urlfield' name='attachments[$post->ID][url]' value='" . attribute_escape($url) . "' /><br />
|
||||
<button type='button' class='button urlnone' title=''>" . __('None') . "</button>
|
||||
<button type='button' class='button urlfile' title='" . attribute_escape($file) . "'>" . __('File URL') . "</button>
|
||||
@@ -842,7 +842,7 @@ function image_attachment_fields_to_edit($form_fields, $post) {
|
||||
'input' => 'html',
|
||||
'html' => image_align_input_fields($post, get_option('image_default_align')),
|
||||
);
|
||||
|
||||
|
||||
$form_fields['image-size'] = image_size_input_fields($post, get_option('image_default_size'));
|
||||
}
|
||||
return $form_fields;
|
||||
@@ -1287,7 +1287,7 @@ SWFUpload.onload = function() {
|
||||
file_dialog_complete_handler : fileDialogComplete,
|
||||
swfupload_pre_load_handler: swfuploadPreLoad,
|
||||
swfupload_load_failed_handler: swfuploadLoadFailed,
|
||||
custom_settings : {
|
||||
custom_settings : {
|
||||
degraded_element_id : "html-upload-ui", // id of the element displayed when swfupload is unavailable
|
||||
swfupload_element_id : "flash-upload-ui" // id of the element displayed when swfupload is available
|
||||
},
|
||||
@@ -1299,7 +1299,7 @@ SWFUpload.onload = function() {
|
||||
|
||||
<div id="flash-upload-ui">
|
||||
<?php do_action('pre-flash-upload-ui'); ?>
|
||||
|
||||
|
||||
<div><?php _e( 'Choose files to upload' ); ?> <div id="flash-browse-button"></div></div>
|
||||
<?php do_action('post-flash-upload-ui'); ?>
|
||||
<p class="howto"><?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p>
|
||||
@@ -1361,7 +1361,7 @@ jQuery(function($){
|
||||
-->
|
||||
</script>
|
||||
<div id="media-items">
|
||||
<?php
|
||||
<?php
|
||||
if ( $id ) {
|
||||
if ( !is_wp_error($id) ) {
|
||||
echo get_media_items( $id, $errors );
|
||||
@@ -1793,7 +1793,7 @@ function type_url_form_image() {
|
||||
$default_align = get_option('image_default_align');
|
||||
if ( empty($default_align) )
|
||||
$default_align = 'none';
|
||||
|
||||
|
||||
return '
|
||||
<table class="describe"><tbody>
|
||||
<tr>
|
||||
|
||||
@@ -132,7 +132,7 @@ function install_dashboard() {
|
||||
<?php _e('<strong>Tag:</strong> Searches for plugins tagged as such') ?><br />
|
||||
<?php _e('<strong>Author:</strong> Searches for plugins created by the Author, or which the Author contributed to.') ?></p>
|
||||
</div>
|
||||
|
||||
|
||||
<h4><?php _e('Install a plugin in .zip format') ?></h4>
|
||||
<p><?php _e('If you have a plugin in a .zip format, You may install it by uploading it here.') ?></p>
|
||||
<form method="post" enctype="multipart/form-data" action="<?php echo admin_url('plugin-install.php?tab=upload') ?>">
|
||||
@@ -140,7 +140,7 @@ function install_dashboard() {
|
||||
<input type="file" name="pluginzip" />
|
||||
<input type="submit" class="button" value="<?php _e('Install Now') ?>" />
|
||||
</form>
|
||||
|
||||
|
||||
<h4><?php _e('Popular tags') ?></h4>
|
||||
<p><?php _e('You may also browse based on the most popular tags in the Plugin Directory:') ?></p>
|
||||
<?php
|
||||
@@ -396,7 +396,7 @@ function install_plugin_information() {
|
||||
if( empty($section) || ! isset($api->sections[ $section ]) )
|
||||
$section = array_shift( $section_titles = array_keys((array)$api->sections) );
|
||||
|
||||
iframe_header( __('Plugin Install') );
|
||||
iframe_header( __('Plugin Install') );
|
||||
echo "<div id='$tab-header'>\n";
|
||||
echo "<ul id='sidemenu'>\n";
|
||||
foreach ( (array)$api->sections as $section_name => $content ) {
|
||||
@@ -505,9 +505,9 @@ function install_plugin_information() {
|
||||
</div>
|
||||
<div id="section-holder" class="wrap">
|
||||
<?php
|
||||
if ( version_compare($GLOBALS['wp_version'], $api->tested, '>') )
|
||||
if ( version_compare($GLOBALS['wp_version'], $api->tested, '>') )
|
||||
echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.') . '</p></div>';
|
||||
else if ( version_compare($GLOBALS['wp_version'], $api->requires, '<') )
|
||||
else if ( version_compare($GLOBALS['wp_version'], $api->requires, '<') )
|
||||
echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has not been marked as <strong>compatible</strong> with your version of WordPress.') . '</p></div>';
|
||||
foreach ( (array)$api->sections as $section_name => $content ) {
|
||||
$title = $section_name;
|
||||
@@ -549,11 +549,11 @@ function upload_plugin() {
|
||||
echo '<div class="wrap">';
|
||||
echo '<h2>', sprintf( __('Installing Plugin from file: %s'), basename($filename) ), '</h2>';
|
||||
|
||||
//Handle a newly uploaded file, Else assume it was
|
||||
//Handle a newly uploaded file, Else assume it was
|
||||
if ( !empty($_FILES) ) {
|
||||
$filename = wp_unique_filename( $uploads['basedir'], $filename );
|
||||
$local_file = $uploads['basedir'] . '/' . $filename;
|
||||
|
||||
|
||||
// Move the file to the uploads dir
|
||||
if ( false === @ move_uploaded_file( $_FILES['pluginzip']['tmp_name'], $local_file) )
|
||||
wp_die( sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path']));
|
||||
@@ -578,7 +578,7 @@ function install_plugin() {
|
||||
|
||||
check_admin_referer('install-plugin_' . $plugin);
|
||||
$api = plugins_api('plugin_information', array('slug' => $plugin, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth.
|
||||
|
||||
|
||||
if ( is_wp_error($api) )
|
||||
wp_die($api);
|
||||
|
||||
@@ -660,7 +660,7 @@ function do_plugin_install_local_package($package, $filename = '') {
|
||||
show_message( __('No plugin Specified') );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ( empty($filename) )
|
||||
$filename = basename($package);
|
||||
|
||||
|
||||
@@ -553,7 +553,7 @@ function add_menu_page( $page_title, $menu_title, $access_level, $file, $functio
|
||||
|
||||
if ( empty($icon_url) )
|
||||
$icon_url = 'images/generic.png';
|
||||
|
||||
|
||||
$menu[] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url );
|
||||
|
||||
return $hookname;
|
||||
@@ -641,7 +641,7 @@ function add_submenu_page( $parent, $page_title, $menu_title, $access_level, $fi
|
||||
/**
|
||||
* Add sub menu page to the tools main menu.
|
||||
*
|
||||
* @param string $page_title
|
||||
* @param string $page_title
|
||||
* @param unknown_type $menu_title
|
||||
* @param unknown_type $access_level
|
||||
* @param unknown_type $file
|
||||
|
||||
@@ -1044,13 +1044,13 @@ function wp_create_post_autosave( $post_id ) {
|
||||
*
|
||||
* @package WordPress
|
||||
* @since 2.7
|
||||
*
|
||||
*
|
||||
* @uses wp_write_post()
|
||||
* @uses edit_post()
|
||||
* @uses get_post()
|
||||
* @uses current_user_can()
|
||||
* @uses wp_create_post_autosave()
|
||||
*
|
||||
*
|
||||
* @return str URL to redirect to show the preview
|
||||
*/
|
||||
function post_preview() {
|
||||
@@ -1058,13 +1058,13 @@ function post_preview() {
|
||||
$post_ID = (int) $_POST['post_ID'];
|
||||
if ( $post_ID < 1 )
|
||||
wp_die( __('Preview not available. Please save as a draft first.') );
|
||||
|
||||
|
||||
if ( isset($_POST['catslist']) )
|
||||
$_POST['post_category'] = explode(",", $_POST['catslist']);
|
||||
|
||||
|
||||
if ( isset($_POST['tags_input']) )
|
||||
$_POST['tags_input'] = explode(",", $_POST['tags_input']);
|
||||
|
||||
|
||||
if ( $_POST['post_type'] == 'page' || empty($_POST['post_category']) )
|
||||
unset($_POST['post_category']);
|
||||
|
||||
@@ -1102,7 +1102,7 @@ function post_preview() {
|
||||
|
||||
/**
|
||||
* Adds the TinyMCE editor used on the Write and Edit screens.
|
||||
*
|
||||
*
|
||||
* Has option to output a trimmed down version used in Press This.
|
||||
*
|
||||
* @package WordPress
|
||||
|
||||
@@ -301,7 +301,7 @@ function populate_options() {
|
||||
add_option('widget_rss', array());
|
||||
add_option('update_core', array());
|
||||
add_option('dismissed_update_core', array());
|
||||
|
||||
|
||||
// Delete unused options
|
||||
$unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins');
|
||||
foreach ($unusedoptions as $option) :
|
||||
|
||||
@@ -911,7 +911,7 @@ function register_column_headers($screen, $columns) {
|
||||
*/
|
||||
function get_hidden_columns($page) {
|
||||
$page = str_replace('.php', '', $page);
|
||||
return (array) get_user_option( 'manage-' . $page . '-columns-hidden', 0, false );
|
||||
return (array) get_user_option( 'manage-' . $page . '-columns-hidden', 0, false );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1000,7 +1000,7 @@ function inline_edit_row( $type ) {
|
||||
</label>
|
||||
|
||||
<?php
|
||||
endif; // authors
|
||||
endif; // authors
|
||||
$authors_dropdown = ob_get_clean();
|
||||
?>
|
||||
|
||||
@@ -1335,7 +1335,7 @@ function _post_row($a_post, $pending_comments, $mode) {
|
||||
$m_time = $post->post_date;
|
||||
$time = get_post_time('G', true, $post);
|
||||
|
||||
$time_diff = time() - $time;
|
||||
$time_diff = time() - $time;
|
||||
|
||||
if ( ( 'future' == $post->post_status) ) {
|
||||
if ( $time_diff <= 0 ) {
|
||||
@@ -2316,7 +2316,7 @@ function _list_meta_row( $entry, &$count ) {
|
||||
$r .= "\n\t\t<input name='updatemeta' type='submit' tabindex='6' value='".attribute_escape(__( 'Update' ))."' class='add:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$update_nonce updatemeta' /></div>";
|
||||
$r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
|
||||
$r .= "</td>";
|
||||
|
||||
|
||||
$r .= "\n\t\t<td><label class='hidden' for='meta[{$entry['meta_id']}][value]'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta[{$entry['meta_id']}][value]' tabindex='6' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>\n\t</tr>";
|
||||
return $r;
|
||||
}
|
||||
@@ -2375,7 +2375,7 @@ function meta_form() {
|
||||
|
||||
<tr><td colspan="2" class="submit">
|
||||
<input type="submit" id="addmetasub" name="addmeta" class="add:the-list:newmeta" tabindex="9" value="<?php _e( 'Add Custom Field' ) ?>" />
|
||||
<?php wp_nonce_field( 'add-meta', '_ajax_nonce', false ); ?>
|
||||
<?php wp_nonce_field( 'add-meta', '_ajax_nonce', false ); ?>
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -3038,7 +3038,7 @@ function find_posts_div($found_action = '') {
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
/* <![CDATA[ */
|
||||
(function($){
|
||||
findPosts = {
|
||||
open : function(af_name, af_val) {
|
||||
@@ -3133,7 +3133,7 @@ function find_posts_div($found_action = '') {
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
/* ]]> */
|
||||
/* ]]> */
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
@@ -3160,7 +3160,7 @@ function the_post_password() {
|
||||
function favorite_actions() {
|
||||
$actions = array(
|
||||
'post-new.php' => array(__('New Post'), 'edit_posts'),
|
||||
'edit.php?post_status=draft' => array(__('Drafts'), 'edit_posts'),
|
||||
'edit.php?post_status=draft' => array(__('Drafts'), 'edit_posts'),
|
||||
'page-new.php' => array(__('New Page'), 'edit_pages'),
|
||||
'media-new.php' => array(__('Upload'), 'upload_files'),
|
||||
'edit-comments.php' => array(__('Comments'), 'moderate_comments')
|
||||
@@ -3325,10 +3325,10 @@ function screen_meta($screen) {
|
||||
<h5><?php _e('Show on screen') ?></h5>
|
||||
<form id="adv-settings" action="" method="get">
|
||||
<div class="metabox-prefs">
|
||||
<?php
|
||||
<?php
|
||||
if ( !meta_box_prefs($screen) && isset($column_screens) ) {
|
||||
manage_columns_prefs($screen);
|
||||
wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false );
|
||||
wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false );
|
||||
}
|
||||
?>
|
||||
<br class="clear" />
|
||||
@@ -3367,7 +3367,7 @@ function screen_meta($screen) {
|
||||
if ( !isset($_wp_contextual_help['options-general']) )
|
||||
$_wp_contextual_help['options-general'] = __('<a href="http://codex.wordpress.org/Settings_General_SubPanel" target="_blank">General Settings</a>');
|
||||
|
||||
$_wp_contextual_help = apply_filters('contextual_help_list', $_wp_contextual_help, $screen);
|
||||
$_wp_contextual_help = apply_filters('contextual_help_list', $_wp_contextual_help, $screen);
|
||||
?>
|
||||
<div id="contextual-help-wrap" class="hidden">
|
||||
<?php
|
||||
|
||||
@@ -292,7 +292,7 @@ function wp_update_theme($theme, $feedback = '') {
|
||||
return new WP_Error('up_to_date', __('The theme is at the latest version.'));
|
||||
|
||||
$r = $current->response[ $theme ];
|
||||
|
||||
|
||||
$themes = get_themes();
|
||||
foreach ( (array) $themes as $this_theme ) {
|
||||
if ( $this_theme['Stylesheet'] == $theme ) {
|
||||
@@ -457,12 +457,12 @@ function wp_update_core($current, $feedback = '') {
|
||||
$result = unzip_file($download_file, $working_dir);
|
||||
// Once extracted, delete the package
|
||||
unlink($download_file);
|
||||
|
||||
|
||||
if ( is_wp_error($result) ) {
|
||||
$wp_filesystem->delete($working_dir, true);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
// Copy update-core.php from the new version into place.
|
||||
if ( !$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true) ) {
|
||||
$wp_filesystem->delete($working_dir, true);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* WordPress Upgrade API
|
||||
*
|
||||
* Most of the functions are pluggable and can be overwritten
|
||||
* Most of the functions are pluggable and can be overwritten
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Administration
|
||||
|
||||
@@ -98,8 +98,8 @@ function edit_user( $user_id = 0 ) {
|
||||
else
|
||||
$user->rich_editing = 'true';
|
||||
|
||||
$user->comment_shortcuts = isset( $_POST['comment_shortcuts'] )? $_POST['comment_shortcuts'] : '';
|
||||
|
||||
$user->comment_shortcuts = isset( $_POST['comment_shortcuts'] )? $_POST['comment_shortcuts'] : '';
|
||||
|
||||
$user->use_ssl = 0;
|
||||
if ( !empty($_POST['use_ssl']) )
|
||||
$user->use_ssl = 1;
|
||||
|
||||
Reference in New Issue
Block a user