Strip trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@10150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
393bd6abf4
commit
e89192b1a8
|
@ -427,10 +427,10 @@ case 'get-tagcloud' :
|
|||
die('-1');
|
||||
|
||||
$tags = get_tags( array( 'number' => 45, 'orderby' => 'count', 'order' => 'DESC' ) );
|
||||
|
||||
|
||||
if ( empty( $tags ) )
|
||||
die( __('No tags found!') );
|
||||
|
||||
|
||||
foreach ( $tags as $key => $tag ) {
|
||||
$tags[ $key ]->link = '#';
|
||||
$tags[ $key ]->id = $tag->term_id;
|
||||
|
@ -440,9 +440,9 @@ case 'get-tagcloud' :
|
|||
|
||||
if ( empty($return) )
|
||||
die('0');
|
||||
|
||||
|
||||
echo $return;
|
||||
|
||||
|
||||
exit;
|
||||
break;
|
||||
case 'add-comment' :
|
||||
|
|
|
@ -22,7 +22,7 @@ if ( isset( $_POST['deletecomment'] ) )
|
|||
*
|
||||
* @param string $msg Error Message. Assumed to contain HTML and be sanitized.
|
||||
*/
|
||||
function comment_footer_die( $msg ) { //
|
||||
function comment_footer_die( $msg ) { //
|
||||
echo "<div class='wrap'><p>$msg</p></div>";
|
||||
include('admin-footer.php');
|
||||
die;
|
||||
|
|
|
@ -106,7 +106,7 @@ li.widget-list-control-item h4.widget-title a,
|
|||
#dragHelper li.widget-list-control-item h4.widget-title a,
|
||||
#draghelper li.widget-list-control-item h4.widget-title a:visited,
|
||||
.login #backtoblog a:hover,
|
||||
#plugin-information .action-button a,
|
||||
#plugin-information .action-button a,
|
||||
#plugin-information .action-button a:hover,
|
||||
#plugin-information .action-button a:visited {
|
||||
color: #fff;
|
||||
|
@ -342,7 +342,7 @@ a:focus {
|
|||
color: #d54e21;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:hover,
|
||||
#wphead #viewsite a:hover,
|
||||
#adminmenu a:hover,
|
||||
#adminmenu ul.wp-submenu a:hover,
|
||||
|
@ -625,17 +625,17 @@ li.widget-list-control-item h4,
|
|||
background-color: #ffffe0;
|
||||
}
|
||||
|
||||
#the-comment-list .approve a {
|
||||
color: #006505;
|
||||
}
|
||||
#the-comment-list .approve a {
|
||||
color: #006505;
|
||||
}
|
||||
|
||||
#the-comment-list .unapprove a {
|
||||
color: #d98500;
|
||||
}
|
||||
#the-comment-list .unapprove a {
|
||||
color: #d98500;
|
||||
}
|
||||
|
||||
#the-comment-list .delete a {
|
||||
color: #bc0b0b;
|
||||
}
|
||||
#the-comment-list .delete a {
|
||||
color: #bc0b0b;
|
||||
}
|
||||
|
||||
.plugins tr {
|
||||
background-color: #fff;
|
||||
|
|
|
@ -106,7 +106,7 @@ li.widget-list-control-item h4.widget-title a,
|
|||
#dragHelper li.widget-list-control-item h4.widget-title a,
|
||||
#draghelper li.widget-list-control-item h4.widget-title a:visited,
|
||||
.login #backtoblog a:hover,
|
||||
#plugin-information .action-button a,
|
||||
#plugin-information .action-button a,
|
||||
#plugin-information .action-button a:hover,
|
||||
#plugin-information .action-button a:visited {
|
||||
color: #fff;
|
||||
|
@ -342,7 +342,7 @@ a:focus {
|
|||
color: #d54e21;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:hover,
|
||||
#wphead #viewsite a:hover,
|
||||
#adminmenu a:hover,
|
||||
#adminmenu ul.wp-submenu a:hover,
|
||||
|
@ -625,17 +625,17 @@ li.widget-list-control-item h4,
|
|||
background-color: #ffffe0;
|
||||
}
|
||||
|
||||
#the-comment-list .approve a {
|
||||
color: #006505;
|
||||
}
|
||||
#the-comment-list .approve a {
|
||||
color: #006505;
|
||||
}
|
||||
|
||||
#the-comment-list .unapprove a {
|
||||
color: #d98500;
|
||||
}
|
||||
#the-comment-list .unapprove a {
|
||||
color: #d98500;
|
||||
}
|
||||
|
||||
#the-comment-list .delete a {
|
||||
color: #bc0b0b;
|
||||
}
|
||||
#the-comment-list .delete a {
|
||||
color: #bc0b0b;
|
||||
}
|
||||
|
||||
.plugins tr {
|
||||
background-color: #fff;
|
||||
|
|
|
@ -188,7 +188,7 @@ div.postbox div.inside {
|
|||
clear: right;
|
||||
position: relative;
|
||||
top: -5px;
|
||||
padding: 2px 11px;
|
||||
padding: 2px 11px;
|
||||
}
|
||||
|
||||
/* Recent Comments */
|
||||
|
|
|
@ -27,6 +27,6 @@
|
|||
width: 17px;
|
||||
height: 17px;
|
||||
margin: -8px 0 0 -8px;
|
||||
overflow: hidden;
|
||||
overflow: hidden;
|
||||
background: url(../images/marker.png) no-repeat;
|
||||
}
|
|
@ -72,7 +72,7 @@ table {
|
|||
#wpbody {
|
||||
clear: both;
|
||||
margin-left: 175px;
|
||||
}
|
||||
}
|
||||
|
||||
.folded #wpbody {
|
||||
margin-left: 60px;
|
||||
|
|
|
@ -50,7 +50,7 @@ div#dashboard-widgets {
|
|||
.widefat th input {
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
/* ---------- add by navid */
|
||||
/* ---------- add by navid */
|
||||
#TB_window {
|
||||
width: 670px;
|
||||
position: absolute;
|
||||
|
|
|
@ -88,6 +88,6 @@ button.dismiss {
|
|||
margin-right: 0;
|
||||
margin-left: 15px;
|
||||
}
|
||||
#gallery-settings .align .field label {
|
||||
#gallery-settings .align .field label {
|
||||
margin: 0 0 0 1.5em;
|
||||
}
|
||||
|
|
|
@ -146,24 +146,24 @@ class Custom_Image_Header {
|
|||
jQuery('#textcolor').val(color);
|
||||
farbtastic.setColor(color);
|
||||
}
|
||||
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#pickcolor').click(function() {
|
||||
jQuery('#colorPickerDiv').show();
|
||||
});
|
||||
|
||||
|
||||
jQuery('#hidetext').click(function() {
|
||||
toggle_text();
|
||||
});
|
||||
|
||||
|
||||
farbtastic = jQuery.farbtastic('#colorPickerDiv', function(color) { pickColor(color); });
|
||||
pickColor('#<?php echo get_theme_mod('header_textcolor', HEADER_TEXTCOLOR); ?>');
|
||||
|
||||
|
||||
<?php if ( 'blank' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) ) { ?>
|
||||
toggle_text();
|
||||
<?php } ?>
|
||||
});
|
||||
|
||||
|
||||
jQuery(document).mousedown(function(){
|
||||
// Make the picker disappear, since we're using it in an independant div
|
||||
hide_picker();
|
||||
|
|
|
@ -15,13 +15,13 @@ if ( have_posts() ) { ?>
|
|||
<?php print_column_headers('upload'); ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php print_column_headers('upload', false); ?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
|
||||
<tbody id="the-list" class="list:post">
|
||||
<?php
|
||||
add_filter('the_title','wp_specialchars');
|
||||
|
@ -207,4 +207,4 @@ foreach ($posts_columns as $column_name => $column_display_name ) {
|
|||
<?php
|
||||
} // end if ( have_posts() )
|
||||
?>
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ if ( ( isset( $_REQUEST['delete_all_spam'] ) || isset( $_REQUEST['delete_all_spa
|
|||
$delete_time = $wpdb->escape( $_REQUEST['pagegen_timestamp'] );
|
||||
$deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" );
|
||||
|
||||
$redirect_to = 'edit-comments.php?comment_status=spam&deleted=' . (int) $deleted_spam;
|
||||
$redirect_to = 'edit-comments.php?comment_status=spam&deleted=' . (int) $deleted_spam;
|
||||
if ( $post_id )
|
||||
$redirect_to = add_query_arg( 'p', absint( $post_id ), $redirect_to );
|
||||
wp_redirect( $redirect_to );
|
||||
|
|
|
@ -109,7 +109,7 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
|
|||
$url = get_comment_author_url();
|
||||
if ( ! empty( $url ) && 'http://' != $url ) {
|
||||
$link = "<a href='$url' rel='external nofollow' target='_blank'>" . __('visit site') . "</a>";
|
||||
printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) );
|
||||
printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) );
|
||||
} else {
|
||||
_e( 'URL:' );
|
||||
} ?></td>
|
||||
|
|
|
@ -333,7 +333,7 @@ function link_advanced_meta_box($link) {
|
|||
</table>
|
||||
<?php
|
||||
}
|
||||
add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', 'link', 'normal', 'core');
|
||||
add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', 'link', 'normal', 'core');
|
||||
|
||||
do_action('do_meta_boxes', 'link', 'normal', $link);
|
||||
do_action('do_meta_boxes', 'link', 'advanced', $link);
|
||||
|
@ -346,7 +346,7 @@ require_once ('admin-header.php');
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<?php if ( isset( $_GET['added'] ) ) : ?>
|
||||
<div id="message" class="updated fade"><p><?php _e('Link added.'); ?></p></div>
|
||||
|
@ -365,7 +365,7 @@ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
|
|||
<div id="poststuff" class="metabox-holder">
|
||||
|
||||
<div id="side-info-column" class="inner-sidebar">
|
||||
<?php
|
||||
<?php
|
||||
|
||||
do_action('submitlink_box');
|
||||
$side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
|
||||
|
@ -399,7 +399,7 @@ $side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
|
||||
do_meta_boxes('link', 'normal', $link);
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ if ( empty($pagenum) )
|
|||
$pagenum = 1;
|
||||
|
||||
$tagsperpage = apply_filters("tagsperpage",20);
|
||||
|
||||
|
||||
$page_links = paginate_links( array(
|
||||
'base' => add_query_arg( 'pagenum', '%#%' ),
|
||||
'format' => '',
|
||||
|
@ -239,9 +239,9 @@ if ( $page_links )
|
|||
|
||||
<div class="tagcloud">
|
||||
<h3><?php _e('Popular Tags'); ?></h3>
|
||||
<?php
|
||||
<?php
|
||||
if ( $can_manage )
|
||||
wp_tag_cloud(array('link' => 'edit'));
|
||||
wp_tag_cloud(array('link' => 'edit'));
|
||||
else
|
||||
wp_tag_cloud();
|
||||
?>
|
||||
|
|
|
@ -24,7 +24,7 @@ require_once ('admin-header.php');
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
|
||||
<p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.'); ?></p>
|
||||
|
|
|
@ -15,7 +15,7 @@ $parent_file = 'tools.php';
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<p><?php _e('If you have posts or comments in another system, WordPress can import those into this blog. To get started, choose a system to import from below:'); ?></p>
|
||||
|
||||
<?php
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* check_column('wp_links', 'link_description', 'mediumtext');
|
||||
* if (check_column($wpdb->comments, 'comment_author', 'tinytext'))
|
||||
* echo "ok\n";
|
||||
*
|
||||
*
|
||||
* $error_count = 0;
|
||||
* $tablename = $wpdb->links;
|
||||
* // check the column
|
||||
|
@ -25,7 +25,7 @@
|
|||
* $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
|
||||
* $q = $wpdb->query($ddl);
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (check_column($wpdb->links, 'link_description', 'varchar(255)')) {
|
||||
* $res .= $tablename . ' - ok <br />';
|
||||
* } else {
|
||||
|
|
|
@ -7,7 +7,7 @@ jQuery(function($) {
|
|||
var name = $("<span>" + $('name', r).text() + "</span>").html();
|
||||
var id = $('cat', r).attr('id');
|
||||
options[options.length] = new Option(name, id);
|
||||
|
||||
|
||||
addAfter2( r, settings );
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ jQuery(document).ready( function($) {
|
|||
$('form.validate').submit( function() { return wpAjax.validateForm( $(this) ); } );
|
||||
}
|
||||
|
||||
// Move .updated and .error alert boxes
|
||||
// Move .updated and .error alert boxes
|
||||
$('div.wrap h2 ~ div.updated, div.wrap h2 ~ div.error').addClass('below-h2');
|
||||
$('div.updated, div.error').not('.below-h2').insertAfter('div.wrap h2:first');
|
||||
|
||||
|
@ -156,7 +156,7 @@ jQuery(document).ready( function($) {
|
|||
$('#show-settings-link').css({'backgroundImage':'url("images/screen-options-right.gif")'});
|
||||
$('#contextual-help-link-wrap').removeClass('invisible');
|
||||
$(this).removeClass('screen-options-open');
|
||||
|
||||
|
||||
} else {
|
||||
$('#show-settings-link').css({'backgroundImage':'url("images/screen-options-right-up.gif")'});
|
||||
$(this).addClass('screen-options-open');
|
||||
|
@ -164,7 +164,7 @@ jQuery(document).ready( function($) {
|
|||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
// help tab
|
||||
$('#contextual-help-link').click(function () {
|
||||
if ( ! $('#contextual-help-wrap').hasClass('contextual-help-open') ) {
|
||||
|
@ -239,7 +239,7 @@ showNotice = {
|
|||
|
||||
return false;
|
||||
},
|
||||
|
||||
|
||||
note : function(text) {
|
||||
alert(text);
|
||||
}
|
||||
|
@ -248,10 +248,10 @@ showNotice = {
|
|||
(function($){
|
||||
// sidebar admin menu
|
||||
adminMenu = {
|
||||
|
||||
|
||||
init : function() {
|
||||
$('#adminmenu div.wp-menu-toggle').each( function() {
|
||||
if ( $(this).siblings('.wp-submenu').length )
|
||||
if ( $(this).siblings('.wp-submenu').length )
|
||||
$(this).click(function(){ adminMenu.toggle( $(this).siblings('.wp-submenu') ); });
|
||||
else
|
||||
$(this).hide();
|
||||
|
@ -282,7 +282,7 @@ adminMenu = {
|
|||
if ( $(e).hasClass('wp-has-current-submenu') ) return true; // leave the current parent open
|
||||
|
||||
if ( 'o' == v ) $(e).addClass('wp-menu-open');
|
||||
else if ( 'c' == v ) $(e).removeClass('wp-menu-open');
|
||||
else if ( 'c' == v ) $(e).removeClass('wp-menu-open');
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -297,7 +297,7 @@ adminMenu = {
|
|||
|
||||
return false;
|
||||
},
|
||||
|
||||
|
||||
fold : function(off) {
|
||||
if (off) {
|
||||
$('#wpcontent').removeClass('folded');
|
||||
|
@ -321,14 +321,14 @@ adminMenu = {
|
|||
sensitivity: 8,
|
||||
interval: 100
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
favorites : function() {
|
||||
$('#favorite-inside').width($('#favorite-actions').width()-4);
|
||||
$('#favorite-toggle, #favorite-inside').bind( 'mouseenter', function(){$('#favorite-inside').removeClass('slideUp').addClass('slideDown'); setTimeout(function(){if ( $('#favorite-inside').hasClass('slideDown') ) { $('#favorite-inside').slideDown(100); $('#favorite-first').addClass('slide-down'); }}, 200) } );
|
||||
|
||||
|
||||
$('#favorite-toggle, #favorite-inside').bind( 'mouseleave', function(){$('#favorite-inside').removeClass('slideDown').addClass('slideUp'); setTimeout(function(){if ( $('#favorite-inside').hasClass('slideUp') ) { $('#favorite-inside').slideUp(100, function(){ $('#favorite-first').removeClass('slide-down'); } ); }}, 300) } );
|
||||
}
|
||||
};
|
||||
|
@ -368,7 +368,7 @@ columns = {
|
|||
|
||||
jQuery(document).ready(function($){
|
||||
if ( 'undefined' != typeof google && google.gears ) return;
|
||||
|
||||
|
||||
var gf = false;
|
||||
if ( 'undefined' != typeof GearsFactory ) {
|
||||
gf = new GearsFactory();
|
||||
|
@ -390,6 +390,6 @@ jQuery(document).ready(function($){
|
|||
}
|
||||
if ( gf && gf.hasPermission )
|
||||
return;
|
||||
|
||||
|
||||
$('.turbo-nag').show();
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@ var theList; var theExtraList;
|
|||
setCommentsList = function() {
|
||||
var dimAfter = function( r, settings ) {
|
||||
var c = $('#' + settings.element);
|
||||
|
||||
|
||||
if ( c.is('.unapproved') )
|
||||
c.find('div.comment_status').html('0')
|
||||
else
|
||||
|
|
|
@ -21,7 +21,7 @@ switchEditors = {
|
|||
tinyMCE.execCommand("mceAddControl", false, "content");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
saveCallback : function(el, content, body) {
|
||||
|
||||
if ( tinyMCE.activeEditor.isHidden() )
|
||||
|
|
|
@ -25,7 +25,7 @@ jQuery._farbtastic = function (container, callback) {
|
|||
fb.radius = 84;
|
||||
fb.square = 100;
|
||||
fb.width = 194;
|
||||
|
||||
|
||||
// Fix background PNGs in IE6
|
||||
if (navigator.appVersion.match(/MSIE [0-6]\./)) {
|
||||
jQuery('*', e).each(function () {
|
||||
|
|
|
@ -49,10 +49,10 @@ inlineEditTax = {
|
|||
|
||||
var editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id);
|
||||
$('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length);
|
||||
|
||||
|
||||
if ( $(t.what+id).hasClass('alternate') )
|
||||
$(editRow).addClass('alternate');
|
||||
|
||||
|
||||
$(t.what+id).hide().after(editRow);
|
||||
|
||||
$(':input[name="name"]', editRow).val( $('.name', rowData).text() );
|
||||
|
@ -105,7 +105,7 @@ inlineEditTax = {
|
|||
// make ajax request
|
||||
$.post('admin-ajax.php', params,
|
||||
function(r) {
|
||||
|
||||
|
||||
$('table.widefat .inline-edit-save .waiting').hide();
|
||||
|
||||
if (r) {
|
||||
|
@ -115,7 +115,7 @@ inlineEditTax = {
|
|||
|
||||
var row = $(inlineEditTax.what+id);
|
||||
row.hide();
|
||||
|
||||
|
||||
row.find('.hide-if-no-js').removeClass('hide-if-no-js');
|
||||
inlineEditTax.addEvents(row);
|
||||
row.fadeIn();
|
||||
|
|
|
@ -12,9 +12,9 @@ function passwordStrength(password,username) {
|
|||
var symbolSize = 0;
|
||||
if (password.match(/[0-9]/)) symbolSize +=10;
|
||||
if (password.match(/[a-z]/)) symbolSize +=26;
|
||||
if (password.match(/[A-Z]/)) symbolSize +=26;
|
||||
if (password.match(/[A-Z]/)) symbolSize +=26;
|
||||
if (password.match(/[^a-zA-Z0-9]/)) symbolSize +=31;
|
||||
|
||||
|
||||
var natLog = Math.log( Math.pow(symbolSize,password.length) );
|
||||
var score = natLog / Math.LN2;
|
||||
if (score < 40 ) return badPass
|
||||
|
|
|
@ -97,7 +97,7 @@ function tag_press_key( e ) {
|
|||
|
||||
jQuery(document).ready( function($) {
|
||||
tagCloud.init();
|
||||
|
||||
|
||||
// close postboxes that should be closed
|
||||
jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
|
||||
|
||||
|
@ -450,6 +450,6 @@ jQuery(document).ready( function($) {
|
|||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ wpGears = {
|
|||
|
||||
getPermission : function() {
|
||||
var perm = true;
|
||||
|
||||
|
||||
if ( 'undefined' != typeof google && google.gears ) {
|
||||
if ( ! google.gears.factory.hasPermission )
|
||||
perm = google.gears.factory.getPermission( 'WordPress', 'images/logo.gif' );
|
||||
|
|
|
@ -41,7 +41,7 @@ if ( isset($_GET['inline']) ) {
|
|||
|
||||
wp_redirect( admin_url($location) );
|
||||
}
|
||||
|
||||
|
||||
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
|
||||
// Upload File button was clicked
|
||||
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
|
||||
|
@ -57,7 +57,7 @@ if ( isset($_GET['inline']) ) {
|
|||
require_once('admin-header.php'); ?>
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<form enctype="multipart/form-data" method="post" action="media-upload.php?inline=&upload-page-form=" class="media-upload-form type-form validate" id="file-form">
|
||||
|
||||
|
@ -93,15 +93,15 @@ if ( isset($_GET['inline']) ) {
|
|||
$type = strval($_GET['type']);
|
||||
else
|
||||
$type = apply_filters('media_upload_default_type', 'file');
|
||||
|
||||
|
||||
// tab: gallery, library, or type-specific
|
||||
if ( isset($_GET['tab']) )
|
||||
$tab = strval($_GET['tab']);
|
||||
else
|
||||
$tab = apply_filters('media_upload_default_tab', 'type');
|
||||
|
||||
|
||||
$body_id = 'media-upload';
|
||||
|
||||
|
||||
// let the action code decide how to handle the request
|
||||
if ( $tab == 'type' || $tab == 'type_url' )
|
||||
do_action("media_upload_$type");
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* 2: The URL of the item's file
|
||||
* 3: Class
|
||||
* 4: ID
|
||||
* 5: Icon for top level menu
|
||||
* 5: Icon for top level menu
|
||||
*
|
||||
* @global array $menu
|
||||
* @name $menu
|
||||
|
@ -65,7 +65,7 @@ if ( !empty($update_plugins->response) )
|
|||
|
||||
$menu[45] = array( sprintf( __('Plugins %s'), "<span class='update-plugins count-$update_count'><span class='plugin-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'activate_plugins', 'plugins.php', '', 'menu-top', 'menu-plugins', 'div' );
|
||||
$submenu['plugins.php'][5] = array( __('Installed'), 'activate_plugins', 'plugins.php' );
|
||||
$submenu['plugins.php'][10] = array(_c('Add New|plugin'), 'install_plugins', 'plugin-install.php');
|
||||
$submenu['plugins.php'][10] = array(_c('Add New|plugin'), 'install_plugins', 'plugin-install.php');
|
||||
$submenu['plugins.php'][15] = array( __('Editor'), 'edit_plugins', 'plugin-editor.php' );
|
||||
|
||||
if ( current_user_can('edit_users') )
|
||||
|
@ -104,7 +104,7 @@ $_wp_last_utility_menu = 60; // The index of the last top-level menu in the util
|
|||
$menu[79] = array( '', 'read', '', '', 'wp-menu-separator-last' );
|
||||
|
||||
// Back-compat for old top-levels
|
||||
$_wp_real_parent_file['post.php'] = 'edit.php';
|
||||
$_wp_real_parent_file['post.php'] = 'edit.php';
|
||||
$_wp_real_parent_file['post-new.php'] = 'edit.php';
|
||||
$_wp_real_parent_file['page-new.php'] = 'edit-pages.php';
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ include('admin-header.php');
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<form method="post" action="options.php">
|
||||
<?php settings_fields('discussion'); ?>
|
||||
|
@ -58,7 +58,7 @@ include('admin-header.php');
|
|||
<br />
|
||||
<label for="thread_comments">
|
||||
<input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> />
|
||||
<?php
|
||||
<?php
|
||||
|
||||
$maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 );
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ include('./admin-header.php');
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<form method="post" action="options.php">
|
||||
<?php settings_fields('general'); ?>
|
||||
|
|
|
@ -18,7 +18,7 @@ include('admin-header.php');
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<form action="options.php" method="post">
|
||||
<?php settings_fields('media'); ?>
|
||||
|
@ -49,15 +49,15 @@ include('admin-header.php');
|
|||
</fieldset></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Large size') ?></th>
|
||||
<td><fieldset><legend class="hidden"><?php _e('Large size') ?></legend>
|
||||
<label for="large_size_w"><?php _e('Max Width'); ?></label>
|
||||
<input name="large_size_w" type="text" id="large_size_w" value="<?php form_option('large_size_w'); ?>" class="small-text" />
|
||||
<label for="large_size_h"><?php _e('Max Height'); ?></label>
|
||||
<input name="large_size_h" type="text" id="large_size_h" value="<?php form_option('large_size_h'); ?>" class="small-text" />
|
||||
</fieldset></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Large size') ?></th>
|
||||
<td><fieldset><legend class="hidden"><?php _e('Large size') ?></legend>
|
||||
<label for="large_size_w"><?php _e('Max Width'); ?></label>
|
||||
<input name="large_size_w" type="text" id="large_size_w" value="<?php form_option('large_size_w'); ?>" class="small-text" />
|
||||
<label for="large_size_h"><?php _e('Max Height'); ?></label>
|
||||
<input name="large_size_h" type="text" id="large_size_h" value="<?php form_option('large_size_h'); ?>" class="small-text" />
|
||||
</fieldset></td>
|
||||
</tr>
|
||||
|
||||
<?php do_settings_fields('media', 'default'); ?>
|
||||
</table>
|
||||
|
|
|
@ -18,7 +18,7 @@ include('admin-header.php');
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<form method="post" action="options.php">
|
||||
<?php settings_fields('misc'); ?>
|
||||
|
|
|
@ -124,7 +124,7 @@ else
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<form name="form" action="options-permalink.php" method="post">
|
||||
<?php wp_nonce_field('update-permalink') ?>
|
||||
|
|
|
@ -17,7 +17,7 @@ include('./admin-header.php');
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<form method="post" action="options.php">
|
||||
<?php settings_fields('privacy'); ?>
|
||||
|
|
|
@ -17,7 +17,7 @@ include('admin-header.php');
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<form name="form1" method="post" action="options.php">
|
||||
<?php settings_fields('reading'); ?>
|
||||
|
|
|
@ -17,7 +17,7 @@ include('admin-header.php');
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<form method="post" action="options.php">
|
||||
<?php settings_fields('writing'); ?>
|
||||
|
|
|
@ -31,7 +31,7 @@ $whitelist_options = array(
|
|||
'writing' => array( 'default_post_edit_rows', 'use_smilies', 'ping_sites', 'mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'enable_app', 'enable_xmlrpc' ),
|
||||
'options' => array( '' ) );
|
||||
if ( !defined( 'WP_SITEURL' ) ) $whitelist_options['general'][] = 'siteurl';
|
||||
if ( !defined( 'WP_HOME' ) ) $whitelist_options['general'][] = 'home';
|
||||
if ( !defined( 'WP_HOME' ) ) $whitelist_options['general'][] = 'home';
|
||||
|
||||
$whitelist_options = apply_filters( 'whitelist_options', $whitelist_options );
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ default:
|
|||
<?php endif; ?>
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<div class="tablenav">
|
||||
<div class="alignleft">
|
||||
|
|
|
@ -53,7 +53,7 @@ include('admin-header.php');
|
|||
?>
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<ul class="subsubsub">
|
||||
<?php
|
||||
|
|
|
@ -202,7 +202,7 @@ if ( !empty($invalid) )
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<p><?php _e('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.'); ?></p>
|
||||
<?php
|
||||
|
@ -257,7 +257,7 @@ function print_plugins_table($plugins, $context = '') {
|
|||
<th scope="col" class="action-links"><?php _e('Action'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th scope="col" class="check-column"><input type="checkbox" /></th>
|
||||
|
@ -267,7 +267,7 @@ function print_plugins_table($plugins, $context = '') {
|
|||
<th scope="col" class="action-links"><?php _e('Action'); ?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
|
||||
<tbody class="plugins">
|
||||
<?php
|
||||
|
||||
|
@ -334,7 +334,7 @@ function print_plugin_actions($context) {
|
|||
<?php if( 'recent' == $context ) : ?>
|
||||
<input type="submit" name="clear-recent-list" value="<?php _e('Clear List') ?>" class="button-secondary" />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -100,7 +100,7 @@ $desc_header = ( $description != $file_show ) ? "$description</strong> (%s)" : "
|
|||
?>
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<div class="bordertitle">
|
||||
<form id="themeselector" action="theme-editor.php" method="post">
|
||||
<strong><label for="theme"><?php _e('Select theme to edit:'); ?> </label></strong>
|
||||
|
@ -141,11 +141,11 @@ if ($allowed_files) :
|
|||
$template_show = basename($template_file);
|
||||
$filedesc = ( $description != $template_file ) ? "$description <span class='nonessential'>($template_show)</span>" : "$description";
|
||||
$filedesc = ( $template_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($template_show)</span></span>" : $filedesc;
|
||||
|
||||
|
||||
// If we have two files of the same name prefer the one in the Template Directory
|
||||
// This means that we display the correct files for child themes which overload Templates as well as Styles
|
||||
if( array_key_exists($description, $template_mapping ) ) {
|
||||
if ( false !== strpos( $template_file, $template_dir ) ) {
|
||||
if ( false !== strpos( $template_file, $template_dir ) ) {
|
||||
$template_mapping[ $description ] = array( $template_file, $filedesc );
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -101,7 +101,7 @@ function theme_update_available( $theme ) {
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<h3><?php _e('Current Theme'); ?></h3>
|
||||
<div id="current-theme">
|
||||
|
|
|
@ -81,7 +81,7 @@ if ( ! $is_opera ) {
|
|||
<div class="tool-box">
|
||||
<h3 class="title"><?php _e('Press This') ?></h3>
|
||||
<p><?php _e('Press This is a bookmarklet: a little app that runs in your browser and lets you grab bits of the web.');?></p>
|
||||
|
||||
|
||||
<p><?php _e('Use Press This to clip text, images and videos from any web page. Then edit and add more straight from Press This before you save or publish it in a post on your blog.'); ?></p>
|
||||
<p><?php _e('Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut.') ?></p>
|
||||
<p class="pressthis"><a href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>" title="<?php echo attribute_escape(__('Press This')) ?>"><?php _e('Press This') ?></a></p>
|
||||
|
|
|
@ -49,18 +49,18 @@ function list_core_update( $update ) {
|
|||
echo '<input id="undismiss" class="button" type="submit" value="' . attribute_escape(__('Bring back this update')) . '" name="undismiss" />';
|
||||
echo '</p>';
|
||||
echo '</form>';
|
||||
|
||||
|
||||
}
|
||||
|
||||
function dismissed_updates() {
|
||||
$dismissed = get_core_updates( array( 'dismissed' => true, 'available' => false ) );
|
||||
if ( $dismissed ) {
|
||||
|
||||
|
||||
$show_text = js_escape(__('Show hidden updates'));
|
||||
$hide_text = js_escape(__('Hide hidden updates'));
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
jQuery(function($) {
|
||||
$('dismissed-updates').show();
|
||||
$('#show-dismissed').toggle(function(){$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')});
|
||||
|
@ -76,7 +76,7 @@ function dismissed_updates() {
|
|||
echo '</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -99,9 +99,9 @@ function core_upgrade_preamble() {
|
|||
echo '</h3>';
|
||||
} else {
|
||||
echo '<div class="updated fade"><p>';
|
||||
_e('<strong>Important:</strong> before upgrading, please <a href="http://codex.wordpress.org/WordPress_Backups">backup your database and files</a>.');
|
||||
_e('<strong>Important:</strong> before upgrading, please <a href="http://codex.wordpress.org/WordPress_Backups">backup your database and files</a>.');
|
||||
echo '</p></div>';
|
||||
|
||||
|
||||
echo '<h3 class="response">';
|
||||
_e( 'There is a new version of WordPress available for upgrade' );
|
||||
echo '</h3>';
|
||||
|
@ -131,17 +131,17 @@ function core_upgrade_preamble() {
|
|||
*/
|
||||
function do_core_upgrade() {
|
||||
global $wp_filesystem;
|
||||
|
||||
|
||||
$url = wp_nonce_url('update-core.php?action=do-core-upgrade', 'upgrade-core');
|
||||
if ( false === ($credentials = request_filesystem_credentials($url)) )
|
||||
return;
|
||||
|
||||
|
||||
$version = isset( $_POST['version'] )? $_POST['version'] : false;
|
||||
$locale = isset( $_POST['locale'] )? $_POST['locale'] : 'en_US';
|
||||
$update = find_core_update( $version, $locale );
|
||||
if ( !$update )
|
||||
return;
|
||||
|
||||
|
||||
|
||||
if ( ! WP_Filesystem($credentials) ) {
|
||||
request_filesystem_credentials($url, '', true); //Failed to connect, Error and request again
|
||||
|
@ -192,7 +192,7 @@ function do_undismiss_core_update() {
|
|||
}
|
||||
|
||||
$action = isset($_GET['action']) ? $_GET['action'] : 'upgrade-core';
|
||||
|
||||
|
||||
if ( 'upgrade-core' == $action ) {
|
||||
$title = __('Upgrade WordPress');
|
||||
$parent_file = 'tools.php';
|
||||
|
|
|
@ -126,7 +126,7 @@ if ( isset($_GET['action']) ) {
|
|||
$plugin = isset($_GET['plugin']) ? trim($_GET['plugin']) : '';
|
||||
$theme = isset($_REQUEST['theme']) ? urldecode($_REQUEST['theme']) : '';
|
||||
$action = isset($_GET['action']) ? $_GET['action'] : '';
|
||||
|
||||
|
||||
if ( 'upgrade-plugin' == $action ) {
|
||||
check_admin_referer('upgrade-plugin_' . $plugin);
|
||||
$title = __('Upgrade Plugin');
|
||||
|
@ -153,7 +153,7 @@ if ( isset($_GET['action']) ) {
|
|||
include(WP_PLUGIN_DIR . '/' . $plugin);
|
||||
}
|
||||
iframe_footer();
|
||||
} elseif ( 'upgrade-theme' == $action ) {
|
||||
} elseif ( 'upgrade-theme' == $action ) {
|
||||
check_admin_referer('upgrade-theme_' . $theme);
|
||||
$title = __('Upgrade Theme');
|
||||
$parent_file = 'themes.php';
|
||||
|
|
|
@ -62,7 +62,7 @@ if ( isset($_GET['find_detached'] ) ) {
|
|||
if ( false !== strpos($referer, 'upload.php') )
|
||||
$location = $referer;
|
||||
}
|
||||
|
||||
|
||||
$location = add_query_arg( array( 'detached' => 1, 'attached' => $attached ) , $location );
|
||||
wp_redirect($location);
|
||||
exit;
|
||||
|
@ -172,7 +172,7 @@ if ( isset($_GET['s']) && $_GET['s'] )
|
|||
<?php
|
||||
if ( isset($message) ) { ?>
|
||||
<div id="message" class="updated fade"><p><?php echo $message; ?></p></div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ function profile_js ( ) {
|
|||
?>
|
||||
<script type="text/javascript">
|
||||
(function($){
|
||||
|
||||
|
||||
function check_pass_strength () {
|
||||
|
||||
var pass = $('#pass1').val();
|
||||
|
@ -177,7 +177,7 @@ include ('admin-header.php');
|
|||
|
||||
<div class="wrap" id="profile-page">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<form id="your-profile" action="" method="post">
|
||||
<?php wp_nonce_field('update-user_' . $user_id) ?>
|
||||
|
|
|
@ -235,7 +235,7 @@ require_once( 'admin-header.php' ); ?>
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
|
||||
<form id="widgets-filter" action="" method="get">
|
||||
|
||||
|
|
|
@ -816,7 +816,7 @@ div.comment-item:hover .row-actions {
|
|||
#adminmenu .wp-submenu li.current a:hover {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
#adminmenu a.menu-top,
|
||||
#adminmenu .wp-submenu-head {
|
||||
font: normal 13px/18px Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
|
||||
|
@ -962,9 +962,9 @@ div.comment-item:hover .row-actions {
|
|||
cursor: w-resize;
|
||||
}
|
||||
|
||||
.folded #adminmenu li.wp-menu-separator {
|
||||
cursor: e-resize;
|
||||
}
|
||||
.folded #adminmenu li.wp-menu-separator {
|
||||
cursor: e-resize;
|
||||
}
|
||||
|
||||
#adminmenu .wp-menu-separator-last {
|
||||
height: 10px;
|
||||
|
@ -1604,7 +1604,7 @@ table.form-table td .updated {
|
|||
#poststuff #titlewrap {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#titlediv #title {
|
||||
|
@ -2059,7 +2059,7 @@ fieldset {
|
|||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#jj, #hh, #mn {
|
||||
width: 2em;
|
||||
|
|
|
@ -97,7 +97,7 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
|
|||
$target = ' target="' . $target . '"';
|
||||
|
||||
$output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';
|
||||
|
||||
|
||||
$output .= $link_before;
|
||||
|
||||
if ( $bookmark->link_image != null && $show_images ) {
|
||||
|
@ -107,12 +107,12 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
|
|||
$output .= "<img src=\"" . get_option('siteurl') . "$bookmark->link_image\" $alt $title />";
|
||||
|
||||
if ($show_name) $output .= $name;
|
||||
} else {
|
||||
$output .= $name;
|
||||
} else {
|
||||
$output .= $name;
|
||||
}
|
||||
|
||||
$output .= $link_after;
|
||||
|
||||
|
||||
$output .= '</a>';
|
||||
|
||||
if ( $show_updated && $bookmark->recently_updated )
|
||||
|
|
|
@ -33,7 +33,7 @@ function get_bookmark($bookmark, $output = OBJECT, $filter = 'raw') {
|
|||
$_bookmark = & $GLOBALS['link'];
|
||||
} elseif ( ! $_bookmark = wp_cache_get($bookmark, 'bookmark') ) {
|
||||
$_bookmark = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->links WHERE link_id = %d LIMIT 1", $bookmark));
|
||||
$_bookmark->link_category = array_unique( wp_get_object_terms($_bookmark->link_id, 'link_category', 'fields=ids') );
|
||||
$_bookmark->link_category = array_unique( wp_get_object_terms($_bookmark->link_id, 'link_category', 'fields=ids') );
|
||||
wp_cache_add($_bookmark->link_id, $_bookmark, 'bookmark');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -292,7 +292,7 @@ class WP_Role {
|
|||
* @access public
|
||||
*
|
||||
* @param string $cap Capability name.
|
||||
* @param bool $grant Whether role has capability privilege.
|
||||
* @param bool $grant Whether role has capability privilege.
|
||||
*/
|
||||
function add_cap( $cap, $grant = true ) {
|
||||
global $wp_roles;
|
||||
|
|
|
@ -304,7 +304,7 @@ function in_category( $category ) {
|
|||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -432,7 +432,7 @@ function wp_dropdown_categories( $args = '' ) {
|
|||
* 'orderby' (string) default is 'ID' - What column to use for ordering the
|
||||
* categories.
|
||||
* 'order' (string) default is 'ASC' - What direction to order categories.
|
||||
* 'show_last_update' (bool|int) default is 0 - See {@link
|
||||
* 'show_last_update' (bool|int) default is 0 - See {@link
|
||||
* walk_category_dropdown_tree()}
|
||||
* 'show_count' (bool|int) default is 0 - Whether to show how many posts are
|
||||
* in the category.
|
||||
|
@ -615,8 +615,8 @@ function default_topic_count_text( $count ) {
|
|||
*
|
||||
* The 'topic_count_text_callback' argument is a function, which given the count
|
||||
* of the posts with that tag returns a text for the tooltip of the tag link.
|
||||
* @see default_topic_count_text
|
||||
*
|
||||
* @see default_topic_count_text
|
||||
*
|
||||
*
|
||||
* @todo Complete functionality.
|
||||
* @since 2.3.0
|
||||
|
@ -632,16 +632,16 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
|
|||
'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC',
|
||||
'topic_count_text_callback' => 'default_topic_count_text',
|
||||
);
|
||||
|
||||
|
||||
if ( !isset( $args['topic_count_text_callback'] ) && isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) {
|
||||
$body = 'return sprintf (
|
||||
$body = 'return sprintf (
|
||||
__ngettext('.var_export($args['single_text'], true).', '.var_export($args['multiple_text'], true).', $count),
|
||||
number_format_i18n( $count ));';
|
||||
$args['topic_count_text_callback'] = create_function('$count', $body);
|
||||
}
|
||||
|
||||
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
|
||||
|
||||
extract( $args );
|
||||
|
||||
if ( empty( $tags ) )
|
||||
|
|
|
@ -40,7 +40,7 @@ function &get_categories( $args = '' ) {
|
|||
$defaults = array( 'type' => 'category' );
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
|
||||
$taxonomy = apply_filters( 'get_categories_taxonomy', 'category', $args );
|
||||
$taxonomy = apply_filters( 'get_categories_taxonomy', 'category', $args );
|
||||
if ( 'link' == $args['type'] )
|
||||
$taxonomy = 'link_category';
|
||||
$categories = (array) get_terms( $taxonomy, $args );
|
||||
|
|
|
@ -731,7 +731,7 @@ class Walker {
|
|||
var $db_fields;
|
||||
|
||||
/**
|
||||
* Max number of pages walked by the paged walker
|
||||
* Max number of pages walked by the paged walker
|
||||
*
|
||||
* @since 2.7.0
|
||||
* @var int
|
||||
|
@ -913,8 +913,8 @@ class Walker {
|
|||
*/
|
||||
if ( empty($top_level_elements) ) {
|
||||
|
||||
$first = array_slice( $elements, 0, 1 );
|
||||
$root = $first[0];
|
||||
$first = array_slice( $elements, 0, 1 );
|
||||
$root = $first[0];
|
||||
|
||||
$top_level_elements = array();
|
||||
$children_elements = array();
|
||||
|
|
|
@ -796,7 +796,7 @@ function wp_comment_form_unfiltered_html_nonce() {
|
|||
* @uses $withcomments Will not try to get the comments if the post has none.
|
||||
*
|
||||
* @param string $file Optional, default '/comments.php'. The file to load
|
||||
* @param bool $separate_comments Optional, whether to separate the comments by comment type. Default is false.
|
||||
* @param bool $separate_comments Optional, whether to separate the comments by comment type. Default is false.
|
||||
* @return null Returns null if no comments appear
|
||||
*/
|
||||
function comments_template( $file = '/comments.php', $separate_comments = false ) {
|
||||
|
@ -985,7 +985,7 @@ function get_comment_reply_link($args = array(), $comment = null, $post = null)
|
|||
|
||||
if ( get_option('comment_registration') && !$user_ID )
|
||||
$link = '<a rel="nofollow" href="' . site_url('wp-login.php?redirect_to=' . get_permalink()) . '">' . $login_text . '</a>';
|
||||
else
|
||||
else
|
||||
$link = "<a rel='nofollow' href='" . wp_specialchars( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\")'>$reply_text</a>";
|
||||
|
||||
return apply_filters('comment_reply_link', $before . $link . $after, $args, $comment, $post);
|
||||
|
@ -1010,13 +1010,13 @@ function comment_reply_link($args = array(), $comment = null, $post = null) {
|
|||
* Retrieve HTML content for cancel comment reply link.
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
*
|
||||
* @param string $text Optional. Text to display for cancel reply link.
|
||||
*/
|
||||
function get_cancel_comment_reply_link($text = '') {
|
||||
if ( empty($text) )
|
||||
$text = __('Click here to cancel reply.');
|
||||
|
||||
|
||||
$style = isset($_GET['replytocom']) ? '' : ' style="display:none;"';
|
||||
$link = wp_specialchars( remove_query_arg('replytocom') ) . '#respond';
|
||||
return apply_filters('cancel_comment_reply_link', '<a rel="nofollow" id="cancel-comment-reply-link" href="' . $link . '"' . $style . '>' . $text . '</a>', $link, $text);
|
||||
|
|
|
@ -1496,7 +1496,7 @@ function trackback($trackback_url, $title, $excerpt, $ID) {
|
|||
);
|
||||
|
||||
$response = wp_remote_post($trackback_url, $options);
|
||||
|
||||
|
||||
if ( is_wp_error( $response ) )
|
||||
return;
|
||||
|
||||
|
|
|
@ -401,11 +401,11 @@ function rss_enclosure() {
|
|||
if ($key == 'enclosure') {
|
||||
foreach ( (array) $val as $enc ) {
|
||||
$enclosure = split("\n", $enc);
|
||||
|
||||
|
||||
//only get the the first element eg, audio/mpeg from 'audio/mpeg mpga mp2 mp3'
|
||||
$t = split('[ \t]', trim($enclosure[2]) );
|
||||
$type = $t[0];
|
||||
|
||||
$t = split('[ \t]', trim($enclosure[2]) );
|
||||
$type = $t[0];
|
||||
|
||||
echo apply_filters('rss_enclosure', '<enclosure url="' . trim(htmlspecialchars($enclosure[0])) . '" length="' . trim($enclosure[1]) . '" type="' . $type . '" />' . "\n");
|
||||
}
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ function prep_atom_text_construct($data) {
|
|||
function self_link() {
|
||||
$host = @parse_url(get_option('home'));
|
||||
$host = $host['host'];
|
||||
echo clean_url(
|
||||
echo clean_url(
|
||||
'http'
|
||||
. ( (isset($_SERVER['https']) && $_SERVER['https'] == 'on') ? 's' : '' ) . '://'
|
||||
. $host
|
||||
|
|
|
@ -535,7 +535,7 @@ function sanitize_title_with_dashes($title) {
|
|||
* @since 2.5.1
|
||||
*
|
||||
* @param string $orderby Order by string to be checked.
|
||||
* @return string|false Returns the order by clause if it is a match, false otherwise.
|
||||
* @return string|false Returns the order by clause if it is a match, false otherwise.
|
||||
*/
|
||||
function sanitize_sql_orderby( $orderby ){
|
||||
preg_match('/^\s*([a-z0-9_]+(\s+(ASC|DESC))?(\s*,\s*|\s*$))+|^\s*RAND\(\s*\)\s*$/i', $orderby, $obmatches);
|
||||
|
@ -881,7 +881,7 @@ function untrailingslashit($string) {
|
|||
* @since 0.71
|
||||
*
|
||||
* @param string $gpc The string returned from HTTP request data.
|
||||
* @return string Returns a string escaped with slashes.
|
||||
* @return string Returns a string escaped with slashes.
|
||||
*/
|
||||
function addslashes_gpc($gpc) {
|
||||
global $wpdb;
|
||||
|
@ -912,8 +912,8 @@ function stripslashes_deep($value) {
|
|||
/**
|
||||
* Navigates through an array and encodes the values to be used in a URL.
|
||||
*
|
||||
* Uses a callback to pass the value of the array back to the function as a
|
||||
* string.
|
||||
* Uses a callback to pass the value of the array back to the function as a
|
||||
* string.
|
||||
*
|
||||
* @since 2.2.0
|
||||
*
|
||||
|
@ -1195,7 +1195,7 @@ function get_date_from_gmt($string) {
|
|||
* @since 1.5.0
|
||||
*
|
||||
* @param string $timezone Either 'Z' for 0 offset or '±hhmm'.
|
||||
* @return int|float The offset in seconds.
|
||||
* @return int|float The offset in seconds.
|
||||
*/
|
||||
function iso8601_timezone_to_offset($timezone) {
|
||||
// $timezone is either 'Z' or '[+|-]hhmm'
|
||||
|
@ -1689,7 +1689,7 @@ function clean_url( $url, $protocols = null, $context = 'display' ) {
|
|||
// Replace ampersands and single quotes only when displaying.
|
||||
if ( 'display' == $context ) {
|
||||
$url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url);
|
||||
$url = str_replace( "'", ''', $url );
|
||||
$url = str_replace( "'", ''', $url );
|
||||
}
|
||||
|
||||
if ( !is_array($protocols) )
|
||||
|
@ -1805,7 +1805,7 @@ function wp_make_link_relative( $link ) {
|
|||
* Sanitises various option values based on the nature of the option.
|
||||
*
|
||||
* This is basically a switch statement which will pass $value through a number
|
||||
* of functions depending on the $option.
|
||||
* of functions depending on the $option.
|
||||
*
|
||||
* @since 2.0.5
|
||||
*
|
||||
|
|
|
@ -425,7 +425,7 @@ function form_option( $option ) {
|
|||
*
|
||||
* This is different from wp_load_alloptions() in that this function does not
|
||||
* cache its results and will retrieve all options from the database every time
|
||||
*
|
||||
*
|
||||
* it is called.
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
@ -1750,7 +1750,7 @@ function wp_mkdir_p( $target ) {
|
|||
// If the above failed, attempt to create the parent node, then try again.
|
||||
if ( ( $target != '/' ) && ( wp_mkdir_p( dirname( $target ) ) ) )
|
||||
return wp_mkdir_p( $target );
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2889,11 +2889,11 @@ function wp_suspend_cache_invalidation($suspend = true) {
|
|||
|
||||
/**
|
||||
* Copy an object.
|
||||
*
|
||||
*
|
||||
* Returns a cloned copy of an object.
|
||||
*
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
*
|
||||
* @param object $object The object to clone
|
||||
* @return object The cloned object
|
||||
*/
|
||||
|
|
|
@ -111,7 +111,7 @@ function get_search_form() {
|
|||
$form = '<form method="get" id="searchform" action="' . get_option('home') . '/" >
|
||||
<label class="hidden" for="s">' . __('Search for:') . '</label>
|
||||
<div><input type="text" value="' . attribute_escape(apply_filters('the_search_query', get_search_query())) . '" name="s" id="s" />
|
||||
<input type="submit" id="searchsubmit" value="'.attribute_escape(__('Search')).'" />
|
||||
<input type="submit" id="searchsubmit" value="'.attribute_escape(__('Search')).'" />
|
||||
</div>
|
||||
</form>';
|
||||
|
||||
|
@ -144,13 +144,13 @@ function wp_loginout() {
|
|||
* @since 2.7
|
||||
* @uses wp_nonce_url() To protect against CSRF
|
||||
* @uses site_url() To generate the log in URL
|
||||
*
|
||||
*
|
||||
* @param string $redirect Path to redirect to on logout.
|
||||
*/
|
||||
function wp_logout_url($redirect = '') {
|
||||
if ( strlen($redirect) )
|
||||
$redirect = "&redirect_to=$redirect";
|
||||
|
||||
|
||||
return wp_nonce_url( site_url("wp-login.php?action=logout$redirect", 'login'), 'log-out' );
|
||||
}
|
||||
|
||||
|
@ -161,13 +161,13 @@ function wp_logout_url($redirect = '') {
|
|||
*
|
||||
* @since 2.7
|
||||
* @uses site_url() To generate the log in URL
|
||||
*
|
||||
*
|
||||
* @param string $redirect Path to redirect to on login.
|
||||
*/
|
||||
function wp_login_url($redirect = '') {
|
||||
if ( strlen($redirect) )
|
||||
$redirect = "?redirect_to=$redirect";
|
||||
|
||||
|
||||
return site_url("wp-login.php$redirect", 'login');
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ function wp_login_url($redirect = '') {
|
|||
*
|
||||
* Display a link which allows the user to navigate to the registration page if
|
||||
* not logged in and registration is enabled or to the dashboard if logged in.
|
||||
*
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @uses apply_filters() Calls 'register' hook on register / admin link content.
|
||||
*
|
||||
|
@ -448,9 +448,9 @@ function wp_title($sep = '»', $display = true, $seplocation = '') {
|
|||
}
|
||||
|
||||
if ( is_404() ) {
|
||||
$title = __('Page not found');
|
||||
$title = __('Page not found');
|
||||
}
|
||||
|
||||
|
||||
$prefix = '';
|
||||
if ( !empty($title) )
|
||||
$prefix = " $sep ";
|
||||
|
@ -872,7 +872,7 @@ function wp_get_archives($args = '') {
|
|||
if ( $echo )
|
||||
echo $output;
|
||||
else
|
||||
return $output;
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1093,7 +1093,7 @@ function get_calendar($initial = true) {
|
|||
|
||||
/**
|
||||
* Purge the cached results of get_calendar.
|
||||
*
|
||||
*
|
||||
* @see get_calendar
|
||||
* @since 2.1.0
|
||||
*/
|
||||
|
@ -1488,7 +1488,7 @@ function the_editor($content, $id = 'content', $prev_id = 'title', $media_button
|
|||
|
||||
$richedit = user_can_richedit();
|
||||
$rows = "rows='$rows'";
|
||||
|
||||
|
||||
if ( $richedit || $media_buttons ) { ?>
|
||||
<div id="editor-toolbar">
|
||||
<?php if ( $richedit ) {
|
||||
|
@ -1563,7 +1563,7 @@ function get_search_query() {
|
|||
|
||||
/**
|
||||
* Display the contents of the search query variable.
|
||||
*
|
||||
*
|
||||
* The search query string is passed through {@link attribute_escape()}
|
||||
* to ensure that it is safe for placing in an html attribute.
|
||||
*
|
||||
|
@ -1822,8 +1822,8 @@ function wp_admin_css( $file = 'wp-admin', $force_echo = false ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Enqueues the default ThickBox js and css.
|
||||
*
|
||||
* Enqueues the default ThickBox js and css.
|
||||
*
|
||||
* If any of the settings need to be changed, this can be done with another js
|
||||
* file similar to media-upload.js and theme-preview.js. That file should
|
||||
* require array('thickbox') to ensure it is loaded after.
|
||||
|
|
|
@ -153,7 +153,7 @@ class WP_Http {
|
|||
foreach ( array('streams', 'fsockopen', 'exthttp') as $transport ) {
|
||||
if ( isset($working_transport[$transport]) )
|
||||
$nonblocking_transport[] = &$working_transport[$transport];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($args['blocking']) && !$args['blocking'] )
|
||||
|
@ -222,7 +222,7 @@ class WP_Http {
|
|||
|
||||
$r = wp_parse_args( $args, $defaults );
|
||||
$r = apply_filters( 'http_request_args', $r );
|
||||
|
||||
|
||||
if ( is_null( $r['headers'] ) )
|
||||
$r['headers'] = array();
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@ function edInsertImage(myField) {
|
|||
}
|
||||
|
||||
|
||||
// Allow multiple instances.
|
||||
// Allow multiple instances.
|
||||
// Name = unique value, id = textarea id, container = container div.
|
||||
// Can disable some buttons by passing comma delimited string as 4th param.
|
||||
var QTags = function(name, id, container, disabled) {
|
||||
|
@ -399,7 +399,7 @@ var QTags = function(name, id, container, disabled) {
|
|||
t.Links = [];
|
||||
t.OpenTags = [];
|
||||
t.Canvas = document.getElementById(id);
|
||||
|
||||
|
||||
if ( ! t.Canvas || ! cont )
|
||||
return;
|
||||
|
||||
|
|
|
@ -597,7 +597,7 @@ function wp_kses_hair($attr, $allowed_protocols) {
|
|||
# "value"
|
||||
{
|
||||
$thisval = $match[1];
|
||||
if ( in_array($attrname, $uris) )
|
||||
if ( in_array($attrname, $uris) )
|
||||
$thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
|
||||
|
||||
if(FALSE === array_key_exists($attrname, $attrarr)) {
|
||||
|
@ -613,7 +613,7 @@ function wp_kses_hair($attr, $allowed_protocols) {
|
|||
# 'value'
|
||||
{
|
||||
$thisval = $match[1];
|
||||
if ( in_array($attrname, $uris) )
|
||||
if ( in_array($attrname, $uris) )
|
||||
$thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
|
||||
|
||||
if(FALSE === array_key_exists($attrname, $attrarr)) {
|
||||
|
@ -629,7 +629,7 @@ function wp_kses_hair($attr, $allowed_protocols) {
|
|||
# value
|
||||
{
|
||||
$thisval = $match[1];
|
||||
if ( in_array($attrname, $uris) )
|
||||
if ( in_array($attrname, $uris) )
|
||||
$thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
|
||||
|
||||
if(FALSE === array_key_exists($attrname, $attrarr)) {
|
||||
|
|
|
@ -957,7 +957,7 @@ function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_cate
|
|||
|
||||
$title = apply_filters('the_title', $title, $post);
|
||||
$date = mysql2date(get_option('date_format'), $post->post_date);
|
||||
|
||||
|
||||
$string = '<a href="'.get_permalink($post).'">';
|
||||
$link = str_replace('%title', $title, $link);
|
||||
$link = str_replace('%date', $date, $link);
|
||||
|
|
|
@ -69,7 +69,7 @@ function image_constrain_size_for_editor($width, $height, $size = 'medium') {
|
|||
}
|
||||
|
||||
list( $max_width, $max_height ) = apply_filters( 'editor_max_image_size', array( $max_width, $max_height ), $size );
|
||||
|
||||
|
||||
return wp_constrain_dimensions( $width, $height, $max_width, $max_height );
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ function image_downsize($id, $size = 'medium') {
|
|||
$width = $meta['width'];
|
||||
$height = $meta['height'];
|
||||
}
|
||||
|
||||
|
||||
if ( $img_url) {
|
||||
// we have the actual image size, but might need to further constrain it if content_width is narrower
|
||||
list( $width, $height ) = image_constrain_size_for_editor( $width, $height, $size );
|
||||
|
@ -430,7 +430,7 @@ function image_make_intermediate_size($file, $width, $height, $crop=false) {
|
|||
* will be used. If there is no direct match, then the nearest image size larger
|
||||
* than the specified size will be used. If nothing is found, then the function
|
||||
* will break out and return false.
|
||||
*
|
||||
*
|
||||
* The metadata 'sizes' is used for compatible sizes that can be used for the
|
||||
* parameter $size value.
|
||||
*
|
||||
|
|
|
@ -659,7 +659,7 @@ function wp_set_auth_cookie($user_id, $remember = false, $secure = '') {
|
|||
setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, $cookie_domain, $secure);
|
||||
setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, $cookie_domain);
|
||||
if ( COOKIEPATH != SITECOOKIEPATH )
|
||||
setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, $cookie_domain);
|
||||
setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, $cookie_domain);
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
@ -1446,7 +1446,7 @@ function wp_rand( $min = 0, $max = 0 ) {
|
|||
if ( $max != 0 )
|
||||
$value = $min + (($max - $min + 1) * ($value / (4294967295 + 1)));
|
||||
|
||||
return abs(intval($value));
|
||||
return abs(intval($value));
|
||||
}
|
||||
endif;
|
||||
|
||||
|
|
|
@ -700,7 +700,7 @@ function wp_page_menu( $args = array() ) {
|
|||
$menu = '<ul>' . $menu . '</ul>';
|
||||
|
||||
$menu = '<div class="' . $args['menu_class'] . '">' . $menu . "</div>\n";
|
||||
$menu = apply_filters( 'wp_page_menu', $menu, $args );
|
||||
$menu = apply_filters( 'wp_page_menu', $menu, $args );
|
||||
if ( $args['echo'] )
|
||||
echo $menu;
|
||||
else
|
||||
|
|
|
@ -203,7 +203,7 @@ function get_extended($post) {
|
|||
*
|
||||
* @param int|object $post Post ID or post object.
|
||||
* @param string $output Optional, default is Object. Either OBJECT, ARRAY_A, or ARRAY_N.
|
||||
* @param string $filter Optional, default is raw.
|
||||
* @param string $filter Optional, default is raw.
|
||||
* @return mixed Post data
|
||||
*/
|
||||
function &get_post(&$post, $output = OBJECT, $filter = 'raw') {
|
||||
|
@ -2161,10 +2161,10 @@ function &get_pages($args = '') {
|
|||
$where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_value = %s", $meta_value);
|
||||
|
||||
}
|
||||
|
||||
if ( $parent >= 0 )
|
||||
$where .= $wpdb->prepare(' AND post_parent = %d ', $parent);
|
||||
|
||||
|
||||
if ( $parent >= 0 )
|
||||
$where .= $wpdb->prepare(' AND post_parent = %d ', $parent);
|
||||
|
||||
$query = "SELECT * FROM $wpdb->posts $join WHERE (post_type = 'page' AND post_status = 'publish') $where ";
|
||||
$query .= $author_query;
|
||||
$query .= " ORDER BY " . $sort_column . " " . $sort_order ;
|
||||
|
@ -2184,7 +2184,7 @@ function &get_pages($args = '') {
|
|||
|
||||
if ( !empty($exclude_tree) ) {
|
||||
$exclude = array();
|
||||
|
||||
|
||||
$exclude = (int) $exclude_tree;
|
||||
$children = get_page_children($exclude, $pages);
|
||||
$excludes = array();
|
||||
|
@ -2379,12 +2379,12 @@ function wp_insert_attachment($object, $file = false, $parent = 0) {
|
|||
$wpdb->update( $wpdb->posts, $data, array( 'ID' => $post_ID ) );
|
||||
} else {
|
||||
// If there is a suggested ID, use it if not already present
|
||||
if ( !empty($import_id) ) {
|
||||
$import_id = (int) $import_id;
|
||||
if ( ! $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE ID = %d", $import_id) ) ) {
|
||||
$data['ID'] = $import_id;
|
||||
}
|
||||
}
|
||||
if ( !empty($import_id) ) {
|
||||
$import_id = (int) $import_id;
|
||||
if ( ! $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE ID = %d", $import_id) ) ) {
|
||||
$data['ID'] = $import_id;
|
||||
}
|
||||
}
|
||||
|
||||
$wpdb->insert( $wpdb->posts, $data );
|
||||
$post_ID = (int) $wpdb->insert_id;
|
||||
|
|
|
@ -182,7 +182,7 @@ function is_author ($author = '') {
|
|||
* @since 1.5.0
|
||||
* @uses $wp_query
|
||||
*
|
||||
* @param string|array $category Optional.
|
||||
* @param string|array $category Optional.
|
||||
* @return bool
|
||||
*/
|
||||
function is_category ($category = '') {
|
||||
|
|
|
@ -572,7 +572,7 @@ class WP_Rewrite {
|
|||
var $extra_permastructs = array();
|
||||
|
||||
/**
|
||||
* Endpoints permalinks
|
||||
* Endpoints permalinks
|
||||
*
|
||||
* @since unknown
|
||||
* @access private
|
||||
|
|
|
@ -556,7 +556,7 @@ function _fetch_remote_file ($url, $headers = "" ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Retrieve
|
||||
* Retrieve
|
||||
*
|
||||
* @since unknown
|
||||
* @package External
|
||||
|
|
|
@ -236,7 +236,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
) );
|
||||
$scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20081127' );
|
||||
$scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20081125' );
|
||||
|
||||
|
||||
$scripts->add( 'admin-widgets', '/wp-admin/js/widgets.js', array( 'interface' ), '20081120' );
|
||||
$scripts->localize( 'admin-widgets', 'widgetsL10n', array(
|
||||
'add' => __('Add'),
|
||||
|
|
|
@ -529,27 +529,27 @@ function get_term_to_edit( $id, $taxonomy ) {
|
|||
*
|
||||
* hide_empty - Default is true. Will not return empty terms, which means
|
||||
* terms whose count is 0 according to the given taxonomy.
|
||||
*
|
||||
*
|
||||
* exclude - Default is an empty string. A comma- or space-delimited string
|
||||
* of term ids to exclude from the return array. If 'include' is non-empty,
|
||||
* of term ids to exclude from the return array. If 'include' is non-empty,
|
||||
* 'exclude' is ignored.
|
||||
*
|
||||
* include - Default is an empty string. A comma- or space-delimited string
|
||||
* of term ids to include in the return array.
|
||||
*
|
||||
*
|
||||
* number - The maximum number of terms to return. Default is empty.
|
||||
*
|
||||
*
|
||||
* offset - The number by which to offset the terms query.
|
||||
*
|
||||
* fields - Default is 'all', which returns an array of term objects.
|
||||
* fields - Default is 'all', which returns an array of term objects.
|
||||
* If 'fields' is 'ids' or 'names', returns an array of
|
||||
* integers or strings, respectively.
|
||||
*
|
||||
* slug - Returns terms whose "slug" matches this value. Default is empty string.
|
||||
*
|
||||
*
|
||||
* hierarchical - Whether to include terms that have non-empty descendants
|
||||
* (even if 'hide_empty' is set to true).
|
||||
*
|
||||
*
|
||||
* search - Returned terms' names will contain the value of 'search',
|
||||
* case-insensitive. Default is an empty string.
|
||||
*
|
||||
|
@ -563,14 +563,14 @@ function get_term_to_edit( $id, $taxonomy ) {
|
|||
* returns terms regardless of ancestry or whether the terms are empty.
|
||||
*
|
||||
* The 'child_of' argument, when used, should be set to the integer of a term ID. Its default
|
||||
* is 0. If set to a non-zero value, all returned terms will be descendants
|
||||
* of that term according to the given taxonomy. Hence 'child_of' is set to 0
|
||||
* if more than one taxonomy is passed in $taxonomies, because multiple taxonomies
|
||||
* is 0. If set to a non-zero value, all returned terms will be descendants
|
||||
* of that term according to the given taxonomy. Hence 'child_of' is set to 0
|
||||
* if more than one taxonomy is passed in $taxonomies, because multiple taxonomies
|
||||
* make term ancestry ambiguous.
|
||||
*
|
||||
* The 'parent' argument, when used, should be set to the integer of a term ID. Its default is
|
||||
* the empty string '', which has a different meaning from the integer 0.
|
||||
* If set to an integer value, all returned terms will have as an immediate
|
||||
* If set to an integer value, all returned terms will have as an immediate
|
||||
* ancestor the term whose ID is specified by that integer according to the given taxonomy.
|
||||
* The 'parent' argument is different from 'child_of' in that a term X is considered a 'parent'
|
||||
* of term Y only if term X is the father of term Y, not its grandfather or great-grandfather, etc.
|
||||
|
@ -781,7 +781,7 @@ function &get_terms($taxonomies, $args = '') {
|
|||
}
|
||||
}
|
||||
reset ( $terms );
|
||||
|
||||
|
||||
$_terms = array();
|
||||
if ( 'ids' == $fields ) {
|
||||
while ( $term = array_shift($terms) )
|
||||
|
@ -1952,7 +1952,7 @@ function _get_term_hierarchy($taxonomy) {
|
|||
* @param int $term_id The ancestor term: all returned terms should be descendants of $term_id.
|
||||
* @param array $terms The set of terms---either an array of term objects or term IDs---from which those that are descendants of $term_id will be chosen.
|
||||
* @param string $taxonomy The taxonomy which determines the hierarchy of the terms.
|
||||
* @return array The subset of $terms that are descendants of $term_id.
|
||||
* @return array The subset of $terms that are descendants of $term_id.
|
||||
*/
|
||||
function &_get_term_children($term_id, $terms, $taxonomy) {
|
||||
$empty_array = array();
|
||||
|
@ -2036,7 +2036,7 @@ function _pad_term_counts(&$terms, $taxonomy) {
|
|||
$id = $term_ids[$row->term_taxonomy_id];
|
||||
$term_items[$id][$row->object_id] = isset($term_items[$id][$row->object_id]) ? ++$term_items[$id][$row->object_id] : 1;
|
||||
}
|
||||
|
||||
|
||||
// Touch every ancestor's lookup row for each post in each term
|
||||
foreach ( $term_ids as $term_id ) {
|
||||
$child = $term_id;
|
||||
|
|
|
@ -54,7 +54,7 @@ function get_stylesheet_directory_uri() {
|
|||
/**
|
||||
* Retrieve URI of current theme stylesheet.
|
||||
*
|
||||
* The stylesheet file name is 'style.css' which is appended to {@link
|
||||
* The stylesheet file name is 'style.css' which is appended to {@link
|
||||
* get_stylesheet_directory_uri() stylesheet directory URI} path.
|
||||
*
|
||||
* @since 1.5.0
|
||||
|
@ -771,7 +771,7 @@ function get_comments_popup_template() {
|
|||
|
||||
/**
|
||||
* Retrieve the name of the highest priority template file that exists.
|
||||
*
|
||||
*
|
||||
* Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which
|
||||
* inherit from a parent theme can just overload one file.
|
||||
*
|
||||
|
|
|
@ -185,7 +185,7 @@ function wp_update_plugins() {
|
|||
/**
|
||||
* Check theme versions against the latest versions hosted on WordPress.org.
|
||||
*
|
||||
* A list of all themes installed in sent to WP. Checks against the
|
||||
* A list of all themes installed in sent to WP. Checks against the
|
||||
* WordPress server at api.wordpress.org. Will only check if WordPress isn't
|
||||
* installing.
|
||||
*
|
||||
|
|
|
@ -429,7 +429,7 @@ function setup_userdata($user_id = '') {
|
|||
* <li>order - Default is 'ASC'. Can also be 'DESC'.</li>
|
||||
* <li>include - User IDs to include.</li>
|
||||
* <li>exclude - User IDs to exclude.</li>
|
||||
* <li>multi - Default is 'false'. Whether to skip the ID attribute on the 'select' element.</li>
|
||||
* <li>multi - Default is 'false'. Whether to skip the ID attribute on the 'select' element.</li>
|
||||
* <li>show - Default is 'display_name'. User table column to display. If the selected item is empty then the user_login will be displayed in parentesis</li>
|
||||
* <li>echo - Default is '1'. Whether to display or retrieve content.</li>
|
||||
* <li>selected - Which User ID is selected.</li>
|
||||
|
|
|
@ -769,7 +769,7 @@ function wp_widget_search($args) {
|
|||
|
||||
// Use current theme search form if it exists
|
||||
get_search_form();
|
||||
|
||||
|
||||
echo $after_widget;
|
||||
}
|
||||
|
||||
|
@ -1615,9 +1615,9 @@ function wp_widget_rss_output( $rss, $args = array() ) {
|
|||
}
|
||||
|
||||
if ( $link == '' ) {
|
||||
echo "<li>$title{$date}{$summary}{$author}</li>";
|
||||
echo "<li>$title{$date}{$summary}{$author}</li>";
|
||||
} else {
|
||||
echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>";
|
||||
echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>";
|
||||
}
|
||||
}
|
||||
echo '</ul>';
|
||||
|
|
|
@ -163,7 +163,7 @@ for ( $i = 1; $i <= $count; $i++ ) {
|
|||
if ( function_exists('iconv') && ! empty( $charset ) ) {
|
||||
$content = iconv($charset, get_option('blog_charset'), $content);
|
||||
}
|
||||
|
||||
|
||||
// Captures any text in the body after $phone_delim as the body
|
||||
$content = explode($phone_delim, $content);
|
||||
$content = empty( $content[1] ) ? $content[0] : $content[1];
|
||||
|
|
|
@ -137,7 +137,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||
'wp.getPageList' => 'this:wp_getPageList',
|
||||
'wp.getAuthors' => 'this:wp_getAuthors',
|
||||
'wp.getCategories' => 'this:mw_getCategories', // Alias
|
||||
'wp.getTags' => 'this:wp_getTags',
|
||||
'wp.getTags' => 'this:wp_getTags',
|
||||
'wp.newCategory' => 'this:wp_newCategory',
|
||||
'wp.deleteCategory' => 'this:wp_deleteCategory',
|
||||
'wp.suggestCategories' => 'this:wp_suggestCategories',
|
||||
|
@ -2578,7 +2578,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||
if( $postdata['post_status'] === 'future' ) {
|
||||
$postdata['post_status'] = 'publish';
|
||||
}
|
||||
|
||||
|
||||
$enclosure = array();
|
||||
foreach ( (array) get_post_custom($post_ID) as $key => $val) {
|
||||
if ($key == 'enclosure') {
|
||||
|
@ -2616,9 +2616,9 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||
'post_status' => $postdata['post_status'],
|
||||
'custom_fields' => $this->get_custom_fields($post_ID)
|
||||
);
|
||||
|
||||
|
||||
if (!empty($enclosure)) $resp['enclosure'] = $enclosure;
|
||||
|
||||
|
||||
return $resp;
|
||||
} else {
|
||||
return new IXR_Error(404, __('Sorry, no such post.'));
|
||||
|
|
Loading…
Reference in New Issue