Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9bc63e25d | ||
|
|
f5df7e19ad | ||
|
|
85989342d4 | ||
|
|
0bd3d8b59a | ||
|
|
6ee338a0de | ||
|
|
b1aebce7b1 | ||
|
|
b52a2fbc28 | ||
|
|
f09dba5b92 | ||
|
|
40f55dade7 | ||
|
|
edd1b41c66 | ||
|
|
52a69faf18 | ||
|
|
7508d49161 | ||
|
|
867060f129 | ||
|
|
f67788b1ce | ||
|
|
60191c0968 | ||
|
|
1233c52237 | ||
|
|
c54f9db604 | ||
|
|
ca938c9cf1 | ||
|
|
2ed7bbe423 | ||
|
|
1edcc2cbe6 | ||
|
|
6012f513f7 | ||
|
|
1ae0697d9d | ||
|
|
9f844ee12c | ||
|
|
fbd8f0c492 | ||
|
|
87f7d0ba44 | ||
|
|
1fbdf326c7 | ||
|
|
2e6dc03e9e | ||
|
|
91a458d380 | ||
|
|
52e5983584 | ||
|
|
898b5ba6ab | ||
|
|
05a220225c | ||
|
|
20f83b7a00 |
@@ -8,7 +8,7 @@
|
||||
<body>
|
||||
<h1 id="logo">
|
||||
<a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
|
||||
<br /> Version 3.4
|
||||
<br /> Version 3.4.1
|
||||
</h1>
|
||||
<p style="text-align: center">Semantic Personal Publishing Platform</p>
|
||||
|
||||
|
||||
@@ -33,6 +33,14 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<div class="changelog point-releases">
|
||||
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 1 ); ?></h3>
|
||||
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 21 ), '3.4.1', number_format_i18n( 21 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.4.1' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="changelog">
|
||||
<h3><?php _e( 'Live Theme Previews' ); ?></h3>
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1968,13 +1968,7 @@ html.wp-toolbar {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.postbox-container .meta-box-sortables:empty {
|
||||
min-height: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.metabox-holder .postbox-container .empty-container,
|
||||
#post-body.columns-2 #side-sortables:empty {
|
||||
.metabox-holder .postbox-container .empty-container {
|
||||
border: 3px dashed #CCCCCC;
|
||||
height: 250px;
|
||||
}
|
||||
@@ -2045,7 +2039,6 @@ html.wp-toolbar {
|
||||
width: 50.5%;
|
||||
}
|
||||
|
||||
#dashboard-widgets.metabox-holder .postbox-container .empty-container,
|
||||
#dashboard-widgets #postbox-container-3 .empty-container,
|
||||
#dashboard-widgets #postbox-container-4 .empty-container {
|
||||
border: 0 none;
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
* @since 3.4.0
|
||||
*/
|
||||
|
||||
define( 'IFRAME_REQUEST', true );
|
||||
|
||||
require_once( './admin.php' );
|
||||
if ( ! current_user_can( 'edit_theme_options' ) )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
@@ -65,7 +67,6 @@ do_action( 'customize_controls_print_scripts' );
|
||||
<body class="<?php echo esc_attr( $body_class ); ?>">
|
||||
<div class="wp-full-overlay expanded">
|
||||
<form id="customize-controls" class="wrap wp-full-overlay-sidebar">
|
||||
<?php wp_nonce_field( 'customize_controls-' . $wp_customize->get_stylesheet() ); ?>
|
||||
<div id="customize-header-actions" class="wp-full-overlay-header">
|
||||
<?php
|
||||
$save_text = $wp_customize->is_theme_active() ? __( 'Save & Publish' ) : __( 'Save & Activate' );
|
||||
@@ -175,6 +176,10 @@ do_action( 'customize_controls_print_scripts' );
|
||||
),
|
||||
'settings' => array(),
|
||||
'controls' => array(),
|
||||
'nonce' => array(
|
||||
'save' => wp_create_nonce( 'save-customize_' . $wp_customize->get_stylesheet() ),
|
||||
'preview' => wp_create_nonce( 'preview-customize_' . $wp_customize->get_stylesheet() )
|
||||
),
|
||||
);
|
||||
|
||||
foreach ( $wp_customize->settings() as $id => $setting ) {
|
||||
|
||||
@@ -483,17 +483,17 @@ function post_comment_meta_box($post) {
|
||||
if ( 1 > $total ) {
|
||||
echo '<p id="no-comments">' . __('No comments yet.') . '</p>';
|
||||
} else {
|
||||
$hidden = get_hidden_meta_boxes('post');
|
||||
$hidden = get_hidden_meta_boxes( get_current_screen() );
|
||||
if ( ! in_array('commentsdiv', $hidden) ) {
|
||||
?>
|
||||
<script type="text/javascript">jQuery(document).ready(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<p class="hide-if-no-js hidden" id="show-comments"><a href="#commentstatusdiv" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p>
|
||||
<?php
|
||||
?>
|
||||
<p class="hide-if-no-js" id="show-comments"><a href="#commentstatusdiv" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
wp_comment_trashnotice();
|
||||
}
|
||||
|
||||
@@ -521,6 +521,7 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen
|
||||
if ( is_multisite() && ( $network_wide || is_network_only_plugin($plugin) ) ) {
|
||||
$network_wide = true;
|
||||
$current = get_site_option( 'active_sitewide_plugins', array() );
|
||||
$_GET['networkwide'] = 1; // Back compat for plugins looking for this value.
|
||||
} else {
|
||||
$current = get_option( 'active_plugins', array() );
|
||||
}
|
||||
|
||||
@@ -477,7 +477,7 @@ function update_core($from, $to) {
|
||||
$mysql_version = $wpdb->db_version();
|
||||
$required_php_version = '5.2.4';
|
||||
$required_mysql_version = '5.0';
|
||||
$wp_version = '3.4';
|
||||
$wp_version = '3.4.1';
|
||||
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
|
||||
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
|
||||
$mysql_compat = true;
|
||||
|
||||
@@ -264,7 +264,7 @@ function wp_theme_update_row( $theme_key, $theme ) {
|
||||
$themes_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array());
|
||||
$theme_name = wp_kses( $theme['Name'], $themes_allowedtags );
|
||||
|
||||
$details_url = self_admin_url("theme-install.php?tab=theme-information&theme=$theme_key&TB_iframe=true&width=600&height=400");
|
||||
$details_url = add_query_arg( array( 'TB_iframe' => 'true', 'width' => 1024, 'height' => 800 ), $current->response[ $theme_key ]['url'] );
|
||||
|
||||
$wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ $(document).ready( function() {
|
||||
m.addClass('sub-open');
|
||||
},
|
||||
out: function(){
|
||||
$(this).find('.wp-submenu').removeClass('sub-open');
|
||||
$(this).find('.wp-submenu').removeClass('sub-open').css('margin-top', '');
|
||||
},
|
||||
timeout: 200,
|
||||
sensitivity: 7,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -294,7 +294,8 @@
|
||||
// This is the promise object.
|
||||
deferred.promise( this );
|
||||
|
||||
this.previewer = params.previewer;
|
||||
this.container = params.container;
|
||||
this.signature = params.signature;
|
||||
|
||||
$.extend( params, { channel: api.PreviewFrame.uuid() });
|
||||
|
||||
@@ -338,7 +339,7 @@
|
||||
|
||||
this.request.done( function( response ) {
|
||||
var location = self.request.getResponseHeader('Location'),
|
||||
signature = 'WP_CUSTOMIZER_SIGNATURE',
|
||||
signature = self.signature,
|
||||
index;
|
||||
|
||||
// Check if the location response header differs from the current URL.
|
||||
@@ -371,7 +372,7 @@
|
||||
response = response.slice( 0, index ) + response.slice( index + signature.length );
|
||||
|
||||
// Create the iframe and inject the html content.
|
||||
self.iframe = $('<iframe />').appendTo( self.previewer.container );
|
||||
self.iframe = $('<iframe />').appendTo( self.container );
|
||||
|
||||
// Bind load event after the iframe has been added to the page;
|
||||
// otherwise it will fire when injected into the DOM.
|
||||
@@ -416,7 +417,7 @@
|
||||
reject();
|
||||
|
||||
iframe = $('<iframe src="' + self.previewUrl() + '" />').hide();
|
||||
iframe.appendTo( self.previewer.container );
|
||||
iframe.appendTo( self.container );
|
||||
iframe.load( function() {
|
||||
self.triedLogin = true;
|
||||
|
||||
@@ -497,6 +498,7 @@
|
||||
|
||||
this.container = api.ensure( params.container );
|
||||
this.allowedUrls = params.allowedUrls;
|
||||
this.signature = params.signature;
|
||||
|
||||
params.url = window.location.href;
|
||||
|
||||
@@ -570,7 +572,8 @@
|
||||
url: this.url(),
|
||||
previewUrl: this.previewUrl(),
|
||||
query: this.query() || {},
|
||||
previewer: this
|
||||
container: this.container,
|
||||
signature: this.signature
|
||||
});
|
||||
|
||||
this.loading.done( function() {
|
||||
@@ -583,6 +586,8 @@
|
||||
|
||||
self.targetWindow( this.targetWindow() );
|
||||
self.channel( this.channel() );
|
||||
|
||||
self.send( 'active' );
|
||||
});
|
||||
|
||||
this.send( 'sync', {
|
||||
@@ -683,23 +688,26 @@
|
||||
container: '#customize-preview',
|
||||
form: '#customize-controls',
|
||||
previewUrl: api.settings.url.preview,
|
||||
allowedUrls: api.settings.url.allowed
|
||||
allowedUrls: api.settings.url.allowed,
|
||||
signature: 'WP_CUSTOMIZER_SIGNATURE'
|
||||
}, {
|
||||
|
||||
nonce: api.settings.nonce,
|
||||
|
||||
query: function() {
|
||||
return {
|
||||
wp_customize: 'on',
|
||||
theme: api.settings.theme.stylesheet,
|
||||
customized: JSON.stringify( api.get() )
|
||||
customized: JSON.stringify( api.get() ),
|
||||
nonce: this.nonce.preview
|
||||
};
|
||||
},
|
||||
|
||||
nonce: $('#_wpnonce').val(),
|
||||
|
||||
save: function() {
|
||||
var self = this,
|
||||
query = $.extend( this.query(), {
|
||||
action: 'customize_save',
|
||||
nonce: this.nonce
|
||||
nonce: this.nonce.save
|
||||
}),
|
||||
request = $.post( api.settings.url.ajax, query );
|
||||
|
||||
@@ -733,6 +741,11 @@
|
||||
}
|
||||
});
|
||||
|
||||
// Refresh the nonces if the preview sends updated nonces over.
|
||||
previewer.bind( 'nonce', function( nonce ) {
|
||||
$.extend( this.nonce, nonce );
|
||||
});
|
||||
|
||||
$.each( api.settings.settings, function( id, data ) {
|
||||
api.create( id, id, data.value, {
|
||||
transport: data.transport,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -51,6 +51,11 @@ function is_lighttpd_before_150() {}
|
||||
*/
|
||||
function add_action() {}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
function did_action() {}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) {
|
||||
$theme = wp_get_theme( $_GET['stylesheet'] );
|
||||
if ( ! $theme->exists() || ! $theme->is_allowed() )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
switch_theme($_GET['template'], $_GET['stylesheet']);
|
||||
switch_theme( $theme->get_template(), $theme->get_stylesheet() );
|
||||
wp_redirect( admin_url('themes.php?activated=true') );
|
||||
exit;
|
||||
} elseif ( 'delete' == $_GET['action'] ) {
|
||||
@@ -64,6 +64,8 @@ if ( current_user_can( 'install_themes' ) ) {
|
||||
) );
|
||||
}
|
||||
|
||||
add_thickbox();
|
||||
|
||||
endif; // switch_themes
|
||||
|
||||
if ( current_user_can( 'edit_theme_options' ) ) {
|
||||
|
||||
@@ -100,7 +100,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||
}
|
||||
|
||||
if ( ! $redirect_url ) {
|
||||
if ( $redirect_url = redirect_guess_404_permalink( $requested_url ) ) {
|
||||
if ( $redirect_url = redirect_guess_404_permalink() ) {
|
||||
$redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'page', 'feed', 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ), $redirect_url );
|
||||
}
|
||||
}
|
||||
@@ -461,31 +461,16 @@ function _remove_qs_args_if_not_in_url( $query_string, Array $args_to_check, $ur
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to guess the correct URL from the current URL (that produced a 404) or
|
||||
* the current query variables.
|
||||
* Attempts to guess the correct URL based on query vars
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @uses $wpdb
|
||||
*
|
||||
* @param string $current_url Optional. The URL that has 404'd.
|
||||
* @return bool|string The correct URL if one is found. False on failure.
|
||||
*/
|
||||
function redirect_guess_404_permalink( $current_url = '' ) {
|
||||
function redirect_guess_404_permalink() {
|
||||
global $wpdb, $wp_rewrite;
|
||||
|
||||
if ( ! empty( $current_url ) )
|
||||
$parsed_url = @parse_url( $current_url );
|
||||
|
||||
// Attempt to redirect bare category slugs if the permalink structure starts
|
||||
// with the %category% tag.
|
||||
if ( isset( $parsed_url['path'] )
|
||||
&& preg_match( '#^[^%]+%category%#', $wp_rewrite->permalink_structure )
|
||||
&& $cat = get_category_by_path( $parsed_url['path'] )
|
||||
) {
|
||||
if ( ! is_wp_error( $cat ) )
|
||||
return get_term_link( $cat );
|
||||
}
|
||||
|
||||
if ( get_query_var('name') ) {
|
||||
$where = $wpdb->prepare("post_name LIKE %s", like_escape( get_query_var('name') ) . '%');
|
||||
|
||||
|
||||
@@ -1130,6 +1130,8 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
// Disallow unfiltered_html for all users, even admins and super admins.
|
||||
if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML )
|
||||
$caps[] = 'do_not_allow';
|
||||
elseif ( is_multisite() && ! is_super_admin( $user_id ) )
|
||||
$caps[] = $cap;
|
||||
else
|
||||
$caps[] = $cap;
|
||||
break;
|
||||
|
||||
@@ -760,13 +760,13 @@ class PHPMailer {
|
||||
} else {
|
||||
if ($this->SingleTo === true && count($toArr) > 1) {
|
||||
foreach ($toArr as $key => $val) {
|
||||
$rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
|
||||
$rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header);
|
||||
// implement call back function if it exists
|
||||
$isSent = ($rt == 1) ? 1 : 0;
|
||||
$this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body);
|
||||
}
|
||||
} else {
|
||||
$rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
|
||||
$rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header);
|
||||
// implement call back function if it exists
|
||||
$isSent = ($rt == 1) ? 1 : 0;
|
||||
$this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body);
|
||||
|
||||
@@ -17,6 +17,8 @@ final class WP_Customize_Manager {
|
||||
protected $sections = array();
|
||||
protected $controls = array();
|
||||
|
||||
protected $nonce_tick;
|
||||
|
||||
protected $customized;
|
||||
|
||||
private $_post_values;
|
||||
@@ -308,6 +310,8 @@ final class WP_Customize_Manager {
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public function customize_preview_init() {
|
||||
$this->nonce_tick = check_ajax_referer( 'preview-customize_' . $this->get_stylesheet(), 'nonce' );
|
||||
|
||||
$this->prepare_controls();
|
||||
|
||||
wp_enqueue_script( 'customize-preview' );
|
||||
@@ -362,6 +366,13 @@ final class WP_Customize_Manager {
|
||||
'channel' => esc_js( $_POST['customize_messenger_channel'] ),
|
||||
);
|
||||
|
||||
if ( 2 == $this->nonce_tick ) {
|
||||
$settings['nonce'] = array(
|
||||
'save' => wp_create_nonce( 'save-customize_' . $this->get_stylesheet() ),
|
||||
'preview' => wp_create_nonce( 'preview-customize_' . $this->get_stylesheet() )
|
||||
);
|
||||
}
|
||||
|
||||
foreach ( $this->settings as $id => $setting ) {
|
||||
$settings['values'][ $id ] = $setting->js_value();
|
||||
}
|
||||
@@ -468,7 +479,7 @@ final class WP_Customize_Manager {
|
||||
if ( ! $this->is_preview() )
|
||||
die;
|
||||
|
||||
check_ajax_referer( 'customize_controls-' . $this->get_stylesheet(), 'nonce' );
|
||||
check_ajax_referer( 'save-customize_' . $this->get_stylesheet(), 'nonce' );
|
||||
|
||||
// Do we have to switch themes?
|
||||
if ( ! $this->is_theme_active() ) {
|
||||
|
||||
@@ -337,7 +337,6 @@ final class _WP_Editors {
|
||||
foreach ( $editor_styles as $key => $file ) {
|
||||
if ( $file && file_exists( "$template_dir/$file" ) ) {
|
||||
$mce_css[] = "$template_uri/$file";
|
||||
$editor_styles[$key] = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -930,10 +930,9 @@ final class WP_Theme implements ArrayAccess {
|
||||
$files = (array) $this->get_files( 'php', 1 );
|
||||
|
||||
foreach ( $files as $file => $full_path ) {
|
||||
$headers = get_file_data( $full_path, array( 'Template Name' => 'Template Name' ) );
|
||||
if ( empty( $headers['Template Name'] ) )
|
||||
if ( ! preg_match( '|Template Name:(.*)$|mi', file_get_contents( $full_path ), $header ) )
|
||||
continue;
|
||||
$page_templates[ $file ] = $headers['Template Name'];
|
||||
$page_templates[ $file ] = _cleanup_header_comment( $header[1] );
|
||||
}
|
||||
|
||||
$this->cache_add( 'page_templates', $page_templates );
|
||||
|
||||
@@ -1337,7 +1337,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
return new IXR_Error( 404, __( 'Invalid post ID.' ) );
|
||||
|
||||
$post_type = get_post_type_object( $post['post_type'] );
|
||||
if ( ! current_user_can( $post_type->cap->edit_posts, $post_id ) )
|
||||
if ( ! current_user_can( $post_type->cap->edit_post, $post_id ) )
|
||||
return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
|
||||
|
||||
return $this->_prepare_post( $post, $fields );
|
||||
@@ -1394,13 +1394,15 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$post_type = get_post_type_object( $filter['post_type'] );
|
||||
if ( ! ( (bool) $post_type ) )
|
||||
return new IXR_Error( 403, __( 'The post type specified is not valid' ) );
|
||||
|
||||
if ( ! current_user_can( $post_type->cap->edit_posts ) )
|
||||
return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts in this post type' ));
|
||||
|
||||
$query['post_type'] = $filter['post_type'];
|
||||
} else {
|
||||
$post_type = get_post_type_object( 'post' );
|
||||
}
|
||||
|
||||
if ( ! current_user_can( $post_type->cap->edit_posts ) )
|
||||
return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts in this post type' ));
|
||||
|
||||
$query['post_type'] = $post_type->name;
|
||||
|
||||
if ( isset( $filter['post_status'] ) )
|
||||
$query['post_status'] = $filter['post_status'];
|
||||
|
||||
@@ -1427,7 +1429,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
|
||||
foreach ( $posts_list as $post ) {
|
||||
$post_type = get_post_type_object( $post['post_type'] );
|
||||
if ( ! current_user_can( $post_type->cap->edit_posts, $post['ID'] ) )
|
||||
if ( ! current_user_can( $post_type->cap->edit_post, $post['ID'] ) )
|
||||
continue;
|
||||
|
||||
$struct[] = $this->_prepare_post( $post, $fields );
|
||||
|
||||
@@ -31,10 +31,8 @@ class WP_Scripts extends WP_Dependencies {
|
||||
var $default_dirs;
|
||||
|
||||
function __construct() {
|
||||
if ( ! function_exists( 'did_action' ) || did_action( 'init' ) )
|
||||
$this->init();
|
||||
else
|
||||
add_action( 'init', array( $this, 'init' ), 0 );
|
||||
$this->init();
|
||||
add_action( 'init', array( $this, 'init' ), 0 );
|
||||
}
|
||||
|
||||
function init() {
|
||||
|
||||
@@ -1835,99 +1835,19 @@ function get_allowed_mime_types() {
|
||||
/**
|
||||
* Retrieve nonce action "Are you sure" message.
|
||||
*
|
||||
* The action is split by verb and noun. The action format is as follows:
|
||||
* verb-action_extra. The verb is before the first dash and has the format of
|
||||
* letters and no spaces and numbers. The noun is after the dash and before the
|
||||
* underscore, if an underscore exists. The noun is also only letters.
|
||||
* Deprecated in 3.4.1 and 3.5.0. Backported to 3.3.3.
|
||||
*
|
||||
* The filter will be called for any action, which is not defined by WordPress.
|
||||
* You may use the filter for your plugin to explain nonce actions to the user,
|
||||
* when they get the "Are you sure?" message. The filter is in the format of
|
||||
* 'explain_nonce_$verb-$noun' with the $verb replaced by the found verb and the
|
||||
* $noun replaced by the found noun. The two parameters that are given to the
|
||||
* hook are the localized "Are you sure you want to do this?" message with the
|
||||
* extra text (the text after the underscore).
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Security
|
||||
* @since 2.0.4
|
||||
* @deprecated 3.4.1
|
||||
* @deprecated Use wp_nonce_ays()
|
||||
* @see wp_nonce_ays()
|
||||
*
|
||||
* @param string $action Nonce action.
|
||||
* @return string Are you sure message.
|
||||
*/
|
||||
function wp_explain_nonce( $action ) {
|
||||
if ( $action !== -1 && preg_match( '/([a-z]+)-([a-z]+)(_(.+))?/', $action, $matches ) ) {
|
||||
$verb = $matches[1];
|
||||
$noun = $matches[2];
|
||||
|
||||
$trans = array();
|
||||
$trans['update']['attachment'] = array( __( 'Your attempt to edit this attachment: “%s” has failed.' ), 'get_the_title' );
|
||||
|
||||
$trans['add']['category'] = array( __( 'Your attempt to add this category has failed.' ), false );
|
||||
$trans['delete']['category'] = array( __( 'Your attempt to delete this category: “%s” has failed.' ), 'get_cat_name' );
|
||||
$trans['update']['category'] = array( __( 'Your attempt to edit this category: “%s” has failed.' ), 'get_cat_name' );
|
||||
|
||||
$trans['delete']['comment'] = array( __( 'Your attempt to delete this comment: “%s” has failed.' ), 'use_id' );
|
||||
$trans['unapprove']['comment'] = array( __( 'Your attempt to unapprove this comment: “%s” has failed.' ), 'use_id' );
|
||||
$trans['approve']['comment'] = array( __( 'Your attempt to approve this comment: “%s” has failed.' ), 'use_id' );
|
||||
$trans['update']['comment'] = array( __( 'Your attempt to edit this comment: “%s” has failed.' ), 'use_id' );
|
||||
$trans['bulk']['comments'] = array( __( 'Your attempt to bulk modify comments has failed.' ), false );
|
||||
$trans['moderate']['comments'] = array( __( 'Your attempt to moderate comments has failed.' ), false );
|
||||
|
||||
$trans['add']['bookmark'] = array( __( 'Your attempt to add this link has failed.' ), false );
|
||||
$trans['delete']['bookmark'] = array( __( 'Your attempt to delete this link: “%s” has failed.' ), 'use_id' );
|
||||
$trans['update']['bookmark'] = array( __( 'Your attempt to edit this link: “%s” has failed.' ), 'use_id' );
|
||||
$trans['bulk']['bookmarks'] = array( __( 'Your attempt to bulk modify links has failed.' ), false );
|
||||
|
||||
$trans['add']['page'] = array( __( 'Your attempt to add this page has failed.' ), false );
|
||||
$trans['delete']['page'] = array( __( 'Your attempt to delete this page: “%s” has failed.' ), 'get_the_title' );
|
||||
$trans['update']['page'] = array( __( 'Your attempt to edit this page: “%s” has failed.' ), 'get_the_title' );
|
||||
|
||||
$trans['edit']['plugin'] = array( __( 'Your attempt to edit this plugin file: “%s” has failed.' ), 'use_id' );
|
||||
$trans['activate']['plugin'] = array( __( 'Your attempt to activate this plugin: “%s” has failed.' ), 'use_id' );
|
||||
$trans['deactivate']['plugin'] = array( __( 'Your attempt to deactivate this plugin: “%s” has failed.' ), 'use_id' );
|
||||
$trans['upgrade']['plugin'] = array( __( 'Your attempt to update this plugin: “%s” has failed.' ), 'use_id' );
|
||||
|
||||
$trans['add']['post'] = array( __( 'Your attempt to add this post has failed.' ), false );
|
||||
$trans['delete']['post'] = array( __( 'Your attempt to delete this post: “%s” has failed.' ), 'get_the_title' );
|
||||
$trans['update']['post'] = array( __( 'Your attempt to edit this post: “%s” has failed.' ), 'get_the_title' );
|
||||
|
||||
$trans['add']['user'] = array( __( 'Your attempt to add this user has failed.' ), false );
|
||||
$trans['delete']['users'] = array( __( 'Your attempt to delete users has failed.' ), false );
|
||||
$trans['bulk']['users'] = array( __( 'Your attempt to bulk modify users has failed.' ), false );
|
||||
$trans['update']['user'] = array( __( 'Your attempt to edit this user: “%s” has failed.' ), 'get_the_author_meta', 'display_name' );
|
||||
$trans['update']['profile'] = array( __( 'Your attempt to modify the profile for: “%s” has failed.' ), 'get_the_author_meta', 'display_name' );
|
||||
|
||||
$trans['update']['options'] = array( __( 'Your attempt to edit your settings has failed.' ), false );
|
||||
$trans['update']['permalink'] = array( __( 'Your attempt to change your permalink structure to: %s has failed.' ), 'use_id' );
|
||||
$trans['edit']['file'] = array( __( 'Your attempt to edit this file: “%s” has failed.' ), 'use_id' );
|
||||
$trans['edit']['theme'] = array( __( 'Your attempt to edit this theme file: “%s” has failed.' ), 'use_id' );
|
||||
$trans['switch']['theme'] = array( __( 'Your attempt to switch to this theme: “%s” has failed.' ), 'use_id' );
|
||||
|
||||
$trans['log']['out'] = array( sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'sitename' ) ), false );
|
||||
|
||||
if ( isset( $trans[$verb][$noun] ) ) {
|
||||
if ( !empty( $trans[$verb][$noun][1] ) ) {
|
||||
$lookup = $trans[$verb][$noun][1];
|
||||
if ( isset($trans[$verb][$noun][2]) )
|
||||
$lookup_value = $trans[$verb][$noun][2];
|
||||
$object = $matches[4];
|
||||
if ( 'use_id' != $lookup ) {
|
||||
if ( isset( $lookup_value ) )
|
||||
$object = call_user_func( $lookup, $lookup_value, $object );
|
||||
else
|
||||
$object = call_user_func( $lookup, $object );
|
||||
}
|
||||
return sprintf( $trans[$verb][$noun][0], esc_html($object) );
|
||||
} else {
|
||||
return $trans[$verb][$noun][0];
|
||||
}
|
||||
}
|
||||
|
||||
return apply_filters( 'explain_nonce_' . $verb . '-' . $noun, __( 'Are you sure you want to do this?' ), isset($matches[4]) ? $matches[4] : '' );
|
||||
} else {
|
||||
return apply_filters( 'explain_nonce_' . $action, __( 'Are you sure you want to do this?' ) );
|
||||
}
|
||||
_deprecated_function( __FUNCTION__, '3.4.1', 'wp_nonce_ays()' );
|
||||
return __( 'Are you sure you want to do this?' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1944,11 +1864,14 @@ function wp_explain_nonce( $action ) {
|
||||
*/
|
||||
function wp_nonce_ays( $action ) {
|
||||
$title = __( 'WordPress Failure Notice' );
|
||||
$html = esc_html( wp_explain_nonce( $action ) );
|
||||
if ( 'log-out' == $action )
|
||||
$html .= "</p><p>" . sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() );
|
||||
elseif ( wp_get_referer() )
|
||||
$html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>";
|
||||
if ( 'log-out' == $action ) {
|
||||
$html = sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ) . '</p><p>';
|
||||
$html .= sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() );
|
||||
} else {
|
||||
$html = __( 'Are you sure you want to do this?' );
|
||||
if ( wp_get_referer() )
|
||||
$html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>";
|
||||
}
|
||||
|
||||
wp_die( $html, $title, array('response' => 403) );
|
||||
}
|
||||
@@ -3622,7 +3545,11 @@ function wp_allowed_protocols() {
|
||||
* @return string|array Either a string containing a reversed comma separated trace or an array of individual calls.
|
||||
*/
|
||||
function wp_debug_backtrace_summary( $ignore_class = null, $skip_frames = 0, $pretty = true ) {
|
||||
$trace = debug_backtrace( false );
|
||||
if ( version_compare( PHP_VERSION, '5.2.5', '>=' ) )
|
||||
$trace = debug_backtrace( false );
|
||||
else
|
||||
$trace = debug_backtrace();
|
||||
|
||||
$caller = array();
|
||||
$check_class = ! is_null( $ignore_class );
|
||||
$skip_frames++; // skip this function
|
||||
@@ -3690,7 +3617,7 @@ function _device_can_upload() {
|
||||
if ( strpos($ua, 'iPhone') !== false
|
||||
|| strpos($ua, 'iPad') !== false
|
||||
|| strpos($ua, 'iPod') !== false ) {
|
||||
return false;
|
||||
return preg_match( '#OS ([\d_]+) like Mac OS X#', $ua, $version ) && version_compare( $version[1], '6', '>=' );
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,12 @@
|
||||
preview.trigger( event, args );
|
||||
});
|
||||
preview.send( 'synced' );
|
||||
})
|
||||
});
|
||||
|
||||
preview.bind( 'active', function() {
|
||||
if ( api.settings.nonce )
|
||||
preview.send( 'nonce', api.settings.nonce );
|
||||
});
|
||||
|
||||
preview.send( 'ready' );
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
(function(b,d){var c=wp.customize,a;a=function(g,e,f){var h;return function(){var i=arguments;f=f||this;clearTimeout(h);h=setTimeout(function(){h=null;g.apply(f,i)},e)}};c.Preview=c.Messenger.extend({initialize:function(g,f){var e=this;c.Messenger.prototype.initialize.call(this,g,f);this.body=d(document.body);this.body.on("click.preview","a",function(h){h.preventDefault();e.send("scroll",0);e.send("url",d(this).prop("href"))});this.body.on("submit.preview","form",function(h){h.preventDefault()});this.window=d(window);this.window.on("scroll.preview",a(function(){e.send("scroll",e.window.scrollTop())},200));this.bind("scroll",function(h){e.window.scrollTop(h)})}});d(function(){c.settings=window._wpCustomizeSettings;if(!c.settings){return}var f,e;f=new c.Preview({url:window.location.href,channel:c.settings.channel});f.bind("settings",function(g){d.each(g,function(i,h){if(c.has(i)){c(i).set(h)}else{c.create(i,h)}})});f.trigger("settings",c.settings.values);f.bind("setting",function(g){var h;g=g.slice();if(h=c(g.shift())){h.set.apply(h,g)}});f.bind("sync",function(g){d.each(g,function(i,h){f.trigger(i,h)});f.send("synced")});f.send("ready");e=d.map(["color","image","position_x","repeat","attachment"],function(g){return"background_"+g});c.when.apply(c,e).done(function(j,i,m,h,l){var n=d(document.body),o=d("head"),g=d("#custom-background-css"),k;if(n.hasClass("custom-background")&&!g.length){return}k=function(){var p="";n.toggleClass("custom-background",!!(j()||i()));if(j()){p+="background-color: "+j()+";"}if(i()){p+='background-image: url("'+i()+'");';p+="background-position: top "+m()+";";p+="background-repeat: "+h()+";";p+="background-position: top "+l()+";"}g.remove();g=d('<style type="text/css" id="custom-background-css">body.custom-background { '+p+" }</style>").appendTo(o)};d.each(arguments,function(){this.bind(k)})})})})(wp,jQuery);
|
||||
(function(b,d){var c=wp.customize,a;a=function(g,e,f){var h;return function(){var i=arguments;f=f||this;clearTimeout(h);h=setTimeout(function(){h=null;g.apply(f,i)},e)}};c.Preview=c.Messenger.extend({initialize:function(g,f){var e=this;c.Messenger.prototype.initialize.call(this,g,f);this.body=d(document.body);this.body.on("click.preview","a",function(h){h.preventDefault();e.send("scroll",0);e.send("url",d(this).prop("href"))});this.body.on("submit.preview","form",function(h){h.preventDefault()});this.window=d(window);this.window.on("scroll.preview",a(function(){e.send("scroll",e.window.scrollTop())},200));this.bind("scroll",function(h){e.window.scrollTop(h)})}});d(function(){c.settings=window._wpCustomizeSettings;if(!c.settings){return}var f,e;f=new c.Preview({url:window.location.href,channel:c.settings.channel});f.bind("settings",function(g){d.each(g,function(i,h){if(c.has(i)){c(i).set(h)}else{c.create(i,h)}})});f.trigger("settings",c.settings.values);f.bind("setting",function(g){var h;g=g.slice();if(h=c(g.shift())){h.set.apply(h,g)}});f.bind("sync",function(g){d.each(g,function(i,h){f.trigger(i,h)});f.send("synced")});f.bind("active",function(){if(c.settings.nonce){f.send("nonce",c.settings.nonce)}});f.send("ready");e=d.map(["color","image","position_x","repeat","attachment"],function(g){return"background_"+g});c.when.apply(c,e).done(function(j,i,m,h,l){var n=d(document.body),o=d("head"),g=d("#custom-background-css"),k;if(n.hasClass("custom-background")&&!g.length){return}k=function(){var p="";n.toggleClass("custom-background",!!(j()||i()));if(j()){p+="background-color: "+j()+";"}if(i()){p+='background-image: url("'+i()+'");';p+="background-position: top "+m()+";";p+="background-repeat: "+h()+";";p+="background-position: top "+l()+";"}g.remove();g=d('<style type="text/css" id="custom-background-css">body.custom-background { '+p+" }</style>").appendTo(o)};d.each(arguments,function(){this.bind(k)})})})})(wp,jQuery);
|
||||
@@ -392,7 +392,7 @@ function load_default_textdomain() {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( is_admin() )
|
||||
if ( is_admin() || ( defined( 'WP_REPAIRING' ) && WP_REPAIRING ) )
|
||||
load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" );
|
||||
|
||||
if ( is_network_admin() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) )
|
||||
|
||||
@@ -1220,7 +1220,7 @@ function get_the_password_form() {
|
||||
$output = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" method="post">
|
||||
<p>' . __("This post is password protected. To view it please enter your password below:") . '</p>
|
||||
<p><label for="' . $label . '">' . __("Password:") . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__("Submit") . '" /></p>
|
||||
</form>
|
||||
</form>
|
||||
';
|
||||
return apply_filters('the_password_form', $output);
|
||||
}
|
||||
|
||||
@@ -1537,7 +1537,7 @@ class WP_Rewrite {
|
||||
$registration_pages['.*wp-register.php$'] = $this->index . '?register=true'; // Deprecated
|
||||
|
||||
// Post
|
||||
$post_rewrite = $this->generate_rewrite_rules( $this->permalink_structure, EP_PERMALINK, false, true, false, false );
|
||||
$post_rewrite = $this->generate_rewrite_rules( $this->permalink_structure, EP_PERMALINK, false );
|
||||
$post_rewrite = apply_filters('post_rewrite_rules', $post_rewrite);
|
||||
|
||||
// Date
|
||||
|
||||
@@ -62,14 +62,14 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js" );
|
||||
|
||||
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 );
|
||||
$scripts->localize( 'common', 'commonL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array(
|
||||
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete.")
|
||||
) );
|
||||
|
||||
$scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", array(), '1.6.1', 1 );
|
||||
|
||||
$scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", array(), false, 1 );
|
||||
$scripts->localize( 'quicktags', 'quicktagsL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'quicktags', 'quicktagsL10n', array(
|
||||
'wordLookup' => __('Enter a word to look up:'),
|
||||
'dictionaryLookup' => esc_attr(__('Dictionary lookup')),
|
||||
'lookup' => esc_attr(__('lookup')),
|
||||
@@ -93,13 +93,13 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'prototype', '/wp-includes/js/prototype.js', array(), '1.6.1');
|
||||
|
||||
$scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 );
|
||||
$scripts->localize( 'wp-ajax-response', 'wpAjax', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array(
|
||||
'noPerm' => __('You do not have permission to do that.'),
|
||||
'broken' => __('An unidentified error has occurred.')
|
||||
) );
|
||||
|
||||
$scripts->add( 'wp-pointer', "/wp-includes/js/wp-pointer$suffix.js", array( 'jquery-ui-widget', 'jquery-ui-position' ), '20111129a', 1 );
|
||||
$scripts->localize( 'wp-pointer', 'wpPointerL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'wp-pointer', 'wpPointerL10n', array(
|
||||
'dismiss' => __('Dismiss'),
|
||||
) );
|
||||
|
||||
@@ -170,7 +170,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'jquery-touch-punch', "/wp-includes/js/jquery/jquery.ui.touch-punch.js", array('jquery-ui-widget', 'jquery-ui-mouse'), '0.2.2', 1 );
|
||||
|
||||
$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20111117', 1 );
|
||||
$scripts->localize( 'thickbox', 'thickboxL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'thickbox', 'thickboxL10n', array(
|
||||
'next' => __('Next >'),
|
||||
'prev' => __('< Prev'),
|
||||
'image' => __('Image'),
|
||||
@@ -227,10 +227,10 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'plupload-all', false, array('plupload', 'plupload-html5', 'plupload-flash', 'plupload-silverlight', 'plupload-html4'), '1.5.4' );
|
||||
|
||||
$scripts->add( 'plupload-handlers', "/wp-includes/js/plupload/handlers$suffix.js", array('plupload-all', 'jquery') );
|
||||
$scripts->localize( 'plupload-handlers', 'pluploadL10n', $uploader_l10n );
|
||||
did_action( 'init' ) && $scripts->localize( 'plupload-handlers', 'pluploadL10n', $uploader_l10n );
|
||||
|
||||
$scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array('plupload-all', 'jquery', 'json2') );
|
||||
$scripts->localize( 'wp-plupload', 'pluploadL10n', $uploader_l10n );
|
||||
did_action( 'init' ) && $scripts->localize( 'wp-plupload', 'pluploadL10n', $uploader_l10n );
|
||||
|
||||
// keep 'swfupload' for back-compat.
|
||||
$scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', array(), '2201-20110113');
|
||||
@@ -246,7 +246,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
}
|
||||
|
||||
$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110524');
|
||||
$scripts->localize( 'swfupload-handlers', 'swfuploadL10n', $uploader_l10n );
|
||||
did_action( 'init' ) && $scripts->localize( 'swfupload-handlers', 'swfuploadL10n', $uploader_l10n );
|
||||
|
||||
$scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js" );
|
||||
|
||||
@@ -255,7 +255,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array('jquery'), '0.9.8', 1 );
|
||||
|
||||
$scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array('jquery'), false, 1 );
|
||||
$scripts->localize( 'password-strength-meter', 'pwsL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'password-strength-meter', 'pwsL10n', array(
|
||||
'empty' => __('Strength indicator'),
|
||||
'short' => __('Very weak'),
|
||||
'bad' => __('Weak'),
|
||||
@@ -272,7 +272,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1 );
|
||||
|
||||
$scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wpdialogs' ), false, 1 );
|
||||
$scripts->localize( 'wplink', 'wpLinkL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'wplink', 'wpLinkL10n', array(
|
||||
'title' => __('Insert/edit link'),
|
||||
'update' => __('Update'),
|
||||
'save' => __('Add Link'),
|
||||
@@ -285,7 +285,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'wpdialogs-popup', "/wp-includes/js/tinymce/plugins/wpdialogs/js/popup$suffix.js", array( 'wpdialogs' ), false, 1 );
|
||||
|
||||
$scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( 'jquery' ), false, 1 );
|
||||
$scripts->localize( 'word-count', 'wordCountL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'word-count', 'wordCountL10n', array(
|
||||
/* translators: If your word count is based on single characters (East Asian characters),
|
||||
enter 'characters'. Otherwise, enter 'words'. Do not translate into your own language. */
|
||||
'type' => 'characters' == _x( 'words', 'word count: words or characters?' ) ? 'c' : 'w',
|
||||
@@ -299,7 +299,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'customize-loader', "/wp-includes/js/customize-loader$suffix.js", array( 'customize-base' ), false, 1 );
|
||||
$scripts->add( 'customize-preview', "/wp-includes/js/customize-preview$suffix.js", array( 'customize-base' ), false, 1 );
|
||||
$scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base' ), false, 1 );
|
||||
$scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', array(
|
||||
'activate' => __( 'Save & Activate' ),
|
||||
'save' => __( 'Save & Publish' ),
|
||||
'saved' => __( 'Saved' ),
|
||||
@@ -311,7 +311,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
if ( is_admin() ) {
|
||||
$scripts->add( 'ajaxcat', "/wp-admin/js/cat$suffix.js", array( 'wp-lists' ) );
|
||||
$scripts->add_data( 'ajaxcat', 'group', 1 );
|
||||
$scripts->localize( 'ajaxcat', 'catL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'ajaxcat', 'catL10n', array(
|
||||
'add' => esc_attr(__('Add')),
|
||||
'how' => __('Separate multiple categories with commas.')
|
||||
) );
|
||||
@@ -319,7 +319,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'admin-categories', "/wp-admin/js/categories$suffix.js", array('wp-lists'), false, 1 );
|
||||
|
||||
$scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array('jquery', 'wp-ajax-response'), false, 1 );
|
||||
$scripts->localize( 'admin-tags', 'tagsl10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
|
||||
'noPerm' => __('You do not have permission to do that.'),
|
||||
'broken' => __('An unidentified error has occurred.')
|
||||
));
|
||||
@@ -327,7 +327,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'admin-custom-fields', "/wp-admin/js/custom-fields$suffix.js", array('wp-lists'), false, 1 );
|
||||
|
||||
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'quicktags', 'jquery-query'), false, 1 );
|
||||
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
|
||||
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
|
||||
'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']),
|
||||
'replyApprove' => __( 'Approve and Reply' ),
|
||||
@@ -339,7 +339,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), false, 1 );
|
||||
|
||||
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), false, 1 );
|
||||
$scripts->localize( 'post', 'postL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'post', 'postL10n', array(
|
||||
'ok' => __('OK'),
|
||||
'cancel' => __('Cancel'),
|
||||
'publishOn' => __('Publish on:'),
|
||||
@@ -365,7 +365,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
|
||||
$scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array('jquery') );
|
||||
$scripts->add_data( 'comment', 'group', 1 );
|
||||
$scripts->localize( 'comment', 'commentL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'comment', 'commentL10n', array(
|
||||
'submittedOn' => __('Submitted on:')
|
||||
) );
|
||||
|
||||
@@ -379,7 +379,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), false, 1 );
|
||||
|
||||
$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), false, 1 );
|
||||
$scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
|
||||
'error' => __('Error while saving the changes.'),
|
||||
'ntdeltitle' => __('Remove From Bulk Edit'),
|
||||
'notitle' => __('(no title)'),
|
||||
@@ -387,12 +387,12 @@ function wp_default_scripts( &$scripts ) {
|
||||
) );
|
||||
|
||||
$scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery' ), false, 1 );
|
||||
$scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array(
|
||||
'error' => __('Error while saving the changes.')
|
||||
) );
|
||||
|
||||
$scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'thickbox' ), false, 1 );
|
||||
$scripts->localize( 'plugin-install', 'plugininstallL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'plugin-install', 'plugininstallL10n', array(
|
||||
'plugin_information' => __('Plugin Information:'),
|
||||
'ays' => __('Are you sure you want to install this plugin?')
|
||||
) );
|
||||
@@ -406,12 +406,12 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery-ui-draggable' ), false, 1 );
|
||||
|
||||
$scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array('jquery', 'json2', 'imgareaselect'), false, 1 );
|
||||
$scripts->localize( 'image-edit', 'imageEditL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'image-edit', 'imageEditL10n', array(
|
||||
'error' => __( 'Could not load the preview image. Please reload the page and try again.' )
|
||||
));
|
||||
|
||||
$scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), false, 1 );
|
||||
$scripts->localize( 'set-post-thumbnail', 'setPostThumbnailL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'set-post-thumbnail', 'setPostThumbnailL10n', array(
|
||||
'setThumbnail' => __( 'Use as featured image' ),
|
||||
'saving' => __( 'Saving...' ),
|
||||
'error' => __( 'Could not set that as the thumbnail image. Try a different attachment.' ),
|
||||
@@ -420,7 +420,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
|
||||
// Navigation Menus
|
||||
$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array('jquery-ui-sortable') );
|
||||
$scripts->localize( 'nav-menu', 'navMenuL10n', array(
|
||||
did_action( 'init' ) && $scripts->localize( 'nav-menu', 'navMenuL10n', array(
|
||||
'noResultsFound' => _x('No results found.', 'search results'),
|
||||
'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ),
|
||||
'saveAlert' => __('The changes you made will be lost if you navigate away from this page.')
|
||||
|
||||
@@ -381,7 +381,7 @@ function search_theme_directories( $force = false ) {
|
||||
if ( ! $sub_dirs )
|
||||
return false;
|
||||
foreach ( $sub_dirs as $sub_dir ) {
|
||||
if ( ! is_dir( $theme_root . '/' . $dir ) || $dir[0] == '.' || $dir == 'CVS' )
|
||||
if ( ! is_dir( $theme_root . '/' . $dir . '/' . $sub_dir ) || $dir[0] == '.' || $dir == 'CVS' )
|
||||
continue;
|
||||
if ( ! file_exists( $theme_root . '/' . $dir . '/' . $sub_dir . '/style.css' ) )
|
||||
continue;
|
||||
|
||||
@@ -58,6 +58,7 @@ function wp_version_check() {
|
||||
$multisite_enabled = 1;
|
||||
} else {
|
||||
$user_count = count_users( );
|
||||
$user_count = $user_count['total_users'];
|
||||
$multisite_enabled = 0;
|
||||
$num_blogs = 1;
|
||||
$wp_install = home_url( '/' );
|
||||
@@ -70,7 +71,7 @@ function wp_version_check() {
|
||||
'mysql' => $mysql_version,
|
||||
'local_package' => isset( $wp_local_package ) ? $wp_local_package : '',
|
||||
'blogs' => $num_blogs,
|
||||
'users' => $user_count['total_users'],
|
||||
'users' => $user_count,
|
||||
'multisite_enabled' => $multisite_enabled
|
||||
);
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '3.4';
|
||||
$wp_version = '3.4.1';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
*
|
||||
* @global int $wp_db_version
|
||||
*/
|
||||
$wp_db_version = 20596;
|
||||
$wp_db_version = 21115;
|
||||
|
||||
/**
|
||||
* Holds the TinyMCE version
|
||||
|
||||
30
wp-login.php
30
wp-login.php
@@ -39,7 +39,7 @@ if ( force_ssl_admin() && !is_ssl() ) {
|
||||
* @param WP_Error $wp_error Optional. WordPress Error Object
|
||||
*/
|
||||
function login_header($title = 'Log In', $message = '', $wp_error = '') {
|
||||
global $error, $interim_login, $current_site, $customize_login;
|
||||
global $error, $interim_login, $current_site;
|
||||
|
||||
// Don't index any of these forms
|
||||
add_action( 'login_head', 'wp_no_robots' );
|
||||
@@ -68,9 +68,6 @@ function login_header($title = 'Log In', $message = '', $wp_error = '') {
|
||||
<meta name="viewport" content="width=320; initial-scale=0.9; maximum-scale=1.0; user-scalable=0;" /><?php
|
||||
}
|
||||
|
||||
if ( $customize_login )
|
||||
wp_enqueue_script( 'customize-base' );
|
||||
|
||||
do_action( 'login_enqueue_scripts' );
|
||||
do_action( 'login_head' );
|
||||
|
||||
@@ -568,6 +565,8 @@ default:
|
||||
$secure_cookie = '';
|
||||
$interim_login = isset($_REQUEST['interim-login']);
|
||||
$customize_login = isset( $_REQUEST['customize-login'] );
|
||||
if ( $customize_login )
|
||||
wp_enqueue_script( 'customize-base' );
|
||||
|
||||
// If the user wants ssl but the session is not ssl, force a secure cookie.
|
||||
if ( !empty($_POST['log']) && !force_ssl_admin() ) {
|
||||
@@ -604,21 +603,18 @@ default:
|
||||
if ( !is_wp_error($user) && !$reauth ) {
|
||||
if ( $interim_login ) {
|
||||
$message = '<p class="message">' . __('You have logged in successfully.') . '</p>';
|
||||
login_header( '', $message );
|
||||
login_header( '', $message ); ?>
|
||||
|
||||
if ( ! $customize_login ) : ?>
|
||||
<script type="text/javascript">setTimeout( function(){window.close()}, 8000);</script>
|
||||
<p class="alignright">
|
||||
<input type="button" class="button-primary" value="<?php esc_attr_e('Close'); ?>" onclick="window.close()" /></p>
|
||||
<?php endif;
|
||||
|
||||
?></div><?php
|
||||
|
||||
do_action('login_footer');
|
||||
|
||||
if ( $customize_login ) : ?>
|
||||
<?php if ( ! $customize_login ) : ?>
|
||||
<script type="text/javascript">setTimeout( function(){window.close()}, 8000);</script>
|
||||
<p class="alignright">
|
||||
<input type="button" class="button-primary" value="<?php esc_attr_e('Close'); ?>" onclick="window.close()" /></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php do_action( 'login_footer' ); ?>
|
||||
<?php if ( $customize_login ) : ?>
|
||||
<script type="text/javascript">setTimeout( function(){ new wp.customize.Messenger({ url: '<?php echo wp_customize_url(); ?>', channel: 'login' }).send('login') }, 1000 );</script>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</body></html>
|
||||
<?php exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user