Compare commits
169 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b66e43c69 | ||
|
|
1bacd1446a | ||
|
|
abc5355d75 | ||
|
|
d289821488 | ||
|
|
d7a3ab3937 | ||
|
|
fea2ba3cd6 | ||
|
|
4c7427aa06 | ||
|
|
1c099d1604 | ||
|
|
e0fa795d49 | ||
|
|
6ebc722218 | ||
|
|
5ca57c3ba6 | ||
|
|
138f753da7 | ||
|
|
251c570d28 | ||
|
|
51d665a4a5 | ||
|
|
c17ad2c252 | ||
|
|
94e8b0b76b | ||
|
|
c33acf1903 | ||
|
|
ef17e2b3b8 | ||
|
|
f08a1c1302 | ||
|
|
ed63f9e30d | ||
|
|
2a4ac1ce68 | ||
|
|
5db18ede70 | ||
|
|
1ff333ca3b | ||
|
|
f2daa0b4e6 | ||
|
|
c046ee1abd | ||
|
|
5a48d3af8b | ||
|
|
41a7a8e581 | ||
|
|
c54c0ddbf4 | ||
|
|
8c5cdf2b39 | ||
|
|
6e7503eedc | ||
|
|
bcbb4f7808 | ||
|
|
4f99911c22 | ||
|
|
c656a7d373 | ||
|
|
5798a9e9ae | ||
|
|
1a13b0102b | ||
|
|
c1af867a7c | ||
|
|
5a4e8a9b94 | ||
|
|
bf1163226c | ||
|
|
cf43545c07 | ||
|
|
daf7cc8b30 | ||
|
|
ce6ffb6d25 | ||
|
|
cf61ff994d | ||
|
|
8b0e75a650 | ||
|
|
969ac61dc4 | ||
|
|
ed0c328547 | ||
|
|
22068f006c | ||
|
|
78c7ec883d | ||
|
|
551d27db59 | ||
|
|
98161af28f | ||
|
|
9c29274681 | ||
|
|
e8617fb3a5 | ||
|
|
8dc1cd00a1 | ||
|
|
8d5d807270 | ||
|
|
2fabb6d0e2 | ||
|
|
ce78b2a4fb | ||
|
|
22f3d4e600 | ||
|
|
4733856aee | ||
|
|
77b60a60a0 | ||
|
|
441a970ecd | ||
|
|
e684cc66cd | ||
|
|
acd952f9c7 | ||
|
|
f12b16a291 | ||
|
|
7e0de7a0e3 | ||
|
|
f5fff9f3f9 | ||
|
|
bacf919c26 | ||
|
|
600e9f1b49 | ||
|
|
e07088f06e | ||
|
|
f2f9b5e493 | ||
|
|
687f87a4e6 | ||
|
|
81a5ef373a | ||
|
|
5c4b703f38 | ||
|
|
43c3b11cee | ||
|
|
98c13fefb2 | ||
|
|
299bfe429c | ||
|
|
70a97d6789 | ||
|
|
0e1bc61b1f | ||
|
|
b67b8d56d9 | ||
|
|
e61cac5d13 | ||
|
|
fe1162e5f1 | ||
|
|
baf66f786a | ||
|
|
88e92019c3 | ||
|
|
df08ef2450 | ||
|
|
c3794cc9b3 | ||
|
|
18f8236b61 | ||
|
|
9cbfb359cb | ||
|
|
74ecd3d1f3 | ||
|
|
db42241c13 | ||
|
|
b6f03a6084 | ||
|
|
efc07abeb3 | ||
|
|
116a5c2fa7 | ||
|
|
5694c55375 | ||
|
|
3855756ad2 | ||
|
|
ebbfc7179c | ||
|
|
53cecfcd72 | ||
|
|
9a487ee432 | ||
|
|
f5f0032925 | ||
|
|
4d089ce55b | ||
|
|
38430b0533 | ||
|
|
74d49a9288 | ||
|
|
17b03600af | ||
|
|
1e85e502a0 | ||
|
|
e860e24b6e | ||
|
|
927e102a78 | ||
|
|
1df764bd45 | ||
|
|
b9f38d1aa8 | ||
|
|
bc85c9c739 | ||
|
|
f09c426ddd | ||
|
|
d873404562 | ||
|
|
9214ae47a6 | ||
|
|
0c064f4ed8 | ||
|
|
b6151949af | ||
|
|
0d0310bcd6 | ||
|
|
b39313803a | ||
|
|
d6980d1c0d | ||
|
|
575e4ef0db | ||
|
|
6ddc8affb1 | ||
|
|
c53ae0299a | ||
|
|
33c1c022e3 | ||
|
|
1b8d23ca29 | ||
|
|
97095d54c3 | ||
|
|
a624b1c967 | ||
|
|
3fd7c7eba1 | ||
|
|
873999207d | ||
|
|
96a453bca5 | ||
|
|
854cbe7cf1 | ||
|
|
73d78fbe90 | ||
|
|
a560559c37 | ||
|
|
9c4763f8c4 | ||
|
|
329a17f59a | ||
|
|
58e1032e13 | ||
|
|
d0b90431df | ||
|
|
8742490da7 | ||
|
|
9652a4916b | ||
|
|
9a51ff0799 | ||
|
|
4d1a6af1ba | ||
|
|
05eb0237ce | ||
|
|
a1e4485b61 | ||
|
|
6818f62d6a | ||
|
|
73f3896134 | ||
|
|
7fec14f382 | ||
|
|
ae8722f109 | ||
|
|
444cb81b45 | ||
|
|
dd5cb26de2 | ||
|
|
88c32598af | ||
|
|
902420b294 | ||
|
|
9c0dfce2ac | ||
|
|
8631cb86cf | ||
|
|
1bbe957cc3 | ||
|
|
c63e673361 | ||
|
|
14fa6a89ca | ||
|
|
dcf9711226 | ||
|
|
c959c32860 | ||
|
|
f6cbf30494 | ||
|
|
621f4f97e5 | ||
|
|
b5de2df420 | ||
|
|
0a65e04101 | ||
|
|
4ca40b65ec | ||
|
|
9501efd09f | ||
|
|
6ece312820 | ||
|
|
6b9501b9c7 | ||
|
|
a72eb16e91 | ||
|
|
1a6b25088a | ||
|
|
b4cc5d511b | ||
|
|
7eccc12e97 | ||
|
|
cf2852b778 | ||
|
|
15bf460317 | ||
|
|
beded541a7 | ||
|
|
8664f9f88b | ||
|
|
b42ec35de7 |
@@ -1,6 +1,6 @@
|
||||
WordPress - Web publishing software
|
||||
|
||||
Copyright 2011-2016 by the contributors
|
||||
Copyright 2011-2018 by the contributors
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<body>
|
||||
<h1 id="logo">
|
||||
<a href="https://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
|
||||
<br /> Version 4.6
|
||||
</h1>
|
||||
<p style="text-align: center">Semantic Personal Publishing Platform</p>
|
||||
|
||||
|
||||
114
wp-activate.php
114
wp-activate.php
@@ -18,6 +18,50 @@ if ( !is_multisite() ) {
|
||||
die();
|
||||
}
|
||||
|
||||
$valid_error_codes = array( 'already_active', 'blog_taken' );
|
||||
|
||||
list( $activate_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
|
||||
$activate_cookie = 'wp-activate-' . COOKIEHASH;
|
||||
|
||||
$key = '';
|
||||
$result = null;
|
||||
|
||||
if ( isset( $_GET['key'] ) && isset( $_POST['key'] ) && $_GET['key'] !== $_POST['key'] ) {
|
||||
wp_die( __( 'A key value mismatch has been detected. Please follow the link provided in your activation email.' ), __( 'An error occurred during the activation' ), 400 );
|
||||
} elseif ( ! empty( $_GET['key'] ) ) {
|
||||
$key = $_GET['key'];
|
||||
} elseif ( ! empty( $_POST['key'] ) ) {
|
||||
$key = $_POST['key'];
|
||||
}
|
||||
|
||||
if ( $key ) {
|
||||
$redirect_url = remove_query_arg( 'key' );
|
||||
|
||||
if ( $redirect_url !== remove_query_arg( false ) ) {
|
||||
setcookie( $activate_cookie, $key, 0, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
|
||||
wp_safe_redirect( $redirect_url );
|
||||
exit;
|
||||
} else {
|
||||
$result = wpmu_activate_signup( $key );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $result === null && isset( $_COOKIE[ $activate_cookie ] ) ) {
|
||||
$key = $_COOKIE[ $activate_cookie ];
|
||||
$result = wpmu_activate_signup( $key );
|
||||
setcookie( $activate_cookie, ' ', time() - YEAR_IN_SECONDS, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
|
||||
}
|
||||
|
||||
if ( $result === null || ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) {
|
||||
status_header( 404 );
|
||||
} elseif ( is_wp_error( $result ) ) {
|
||||
$error_code = $result->get_error_code();
|
||||
|
||||
if ( ! in_array( $error_code, $valid_error_codes ) ) {
|
||||
status_header( 400 );
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_object( $wp_object_cache ) )
|
||||
$wp_object_cache->cache_enabled = false;
|
||||
|
||||
@@ -67,13 +111,14 @@ function wpmu_activate_stylesheet() {
|
||||
<?php
|
||||
}
|
||||
add_action( 'wp_head', 'wpmu_activate_stylesheet' );
|
||||
add_action( 'wp_head', 'wp_sensitive_page_meta' );
|
||||
|
||||
get_header( 'wp-activate' );
|
||||
?>
|
||||
|
||||
<div id="signup-content" class="widecolumn">
|
||||
<div class="wp-activate-container">
|
||||
<?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
|
||||
<?php if ( ! $key ) { ?>
|
||||
|
||||
<h2><?php _e('Activation Key Required') ?></h2>
|
||||
<form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>">
|
||||
@@ -87,43 +132,40 @@ get_header( 'wp-activate' );
|
||||
</form>
|
||||
|
||||
<?php } else {
|
||||
|
||||
$key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
|
||||
$result = wpmu_activate_signup( $key );
|
||||
if ( is_wp_error($result) ) {
|
||||
if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
|
||||
$signup = $result->get_error_data();
|
||||
?>
|
||||
<h2><?php _e('Your account is now active!'); ?></h2>
|
||||
<?php
|
||||
echo '<p class="lead-in">';
|
||||
if ( $signup->domain . $signup->path == '' ) {
|
||||
printf(
|
||||
/* translators: 1: login URL, 2: username, 3: user email, 4: lost password URL */
|
||||
__( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
|
||||
network_site_url( 'wp-login.php', 'login' ),
|
||||
$signup->user_login,
|
||||
$signup->user_email,
|
||||
wp_lostpassword_url()
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
/* translators: 1: site URL, 2: site domain, 3: username, 4: user email, 5: lost password URL */
|
||||
__( 'Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of “%3$s”. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.' ),
|
||||
'http://' . $signup->domain,
|
||||
$signup->domain,
|
||||
$signup->user_login,
|
||||
$signup->user_email,
|
||||
wp_lostpassword_url()
|
||||
);
|
||||
}
|
||||
echo '</p>';
|
||||
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes ) ) {
|
||||
$signup = $result->get_error_data();
|
||||
?>
|
||||
<h2><?php _e('Your account is now active!'); ?></h2>
|
||||
<?php
|
||||
echo '<p class="lead-in">';
|
||||
if ( $signup->domain . $signup->path == '' ) {
|
||||
printf(
|
||||
/* translators: 1: login URL, 2: username, 3: user email, 4: lost password URL */
|
||||
__( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
|
||||
network_site_url( 'wp-login.php', 'login' ),
|
||||
$signup->user_login,
|
||||
$signup->user_email,
|
||||
wp_lostpassword_url()
|
||||
);
|
||||
} else {
|
||||
?>
|
||||
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
|
||||
<p><?php echo $result->get_error_message(); ?></p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: site URL, 2: site domain, 3: username, 4: user email, 5: lost password URL */
|
||||
__( 'Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of “%3$s”. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.' ),
|
||||
'http://' . $signup->domain,
|
||||
$signup->domain,
|
||||
$signup->user_login,
|
||||
$signup->user_email,
|
||||
wp_lostpassword_url()
|
||||
);
|
||||
}
|
||||
echo '</p>';
|
||||
} elseif ( $result === null || is_wp_error( $result ) ) {
|
||||
?>
|
||||
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
|
||||
<?php if ( is_wp_error( $result ) ) : ?>
|
||||
<p><?php echo $result->get_error_message(); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
} else {
|
||||
$url = isset( $result['blog_id'] ) ? get_blogaddress_by_id( (int) $result['blog_id'] ) : '';
|
||||
$user = get_userdata( (int) $result['user_id'] );
|
||||
|
||||
@@ -9,11 +9,31 @@
|
||||
/** WordPress Administration Bootstrap */
|
||||
require_once( dirname( __FILE__ ) . '/admin.php' );
|
||||
|
||||
if ( current_user_can( 'customize' ) ) {
|
||||
wp_enqueue_script( 'customize-loader' );
|
||||
if ( ! wp_is_mobile() ) {
|
||||
wp_enqueue_style( 'wp-mediaelement' );
|
||||
wp_enqueue_script( 'wp-mediaelement' );
|
||||
wp_localize_script( 'mediaelement', '_wpmejsSettings', array(
|
||||
'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ),
|
||||
'pauseOtherPlayers' => '',
|
||||
) );
|
||||
}
|
||||
|
||||
$video_url = 'https://videopress.com/embed/scFdjVo6?hd=true';
|
||||
/**
|
||||
* Replaces the height and width attributes with values for full size.
|
||||
*
|
||||
* wp_video_shortcode() limits the width to 640px.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @ignore
|
||||
*
|
||||
* @param $output Video shortcode HTML output.
|
||||
* @return string Filtered HTML content to display video.
|
||||
*/
|
||||
function _wp_override_admin_video_width_limit( $output ) {
|
||||
return str_replace( array( '640', '384' ), array( '1050', '630' ), $output );
|
||||
}
|
||||
|
||||
$video_url = 'https://videopress.com/embed/GbdhpGF3?hd=true';
|
||||
$locale = str_replace( '_', '-', get_locale() );
|
||||
list( $locale ) = explode( '-', $locale );
|
||||
if ( 'en' !== $locale ) {
|
||||
@@ -29,7 +49,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<div class="wrap about-wrap">
|
||||
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
|
||||
|
||||
<div class="about-text"><?php printf( __( 'Thank you for updating! WordPress %s streamlines your workflow, whether you’re writing or building your site.' ), $display_version ); ?></div>
|
||||
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version. WordPress %s changes a lot behind the scenes to make your WordPress experience even better!' ), $display_version ); ?></p>
|
||||
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
|
||||
|
||||
<h2 class="nav-tab-wrapper wp-clearfix">
|
||||
@@ -38,63 +58,255 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
|
||||
</h2>
|
||||
|
||||
<div class="headline-feature feature-video" style="background-color:#191E23;">
|
||||
<div class="changelog point-releases">
|
||||
<h3><?php _e( 'Maintenance and Security Releases' ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress version number */
|
||||
__( '<strong>Version %s</strong> addressed some security issues.' ),
|
||||
'4.6.20'
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: HelpHub URL */
|
||||
__( 'For more information, see <a href="%s">the release notes</a>.' ),
|
||||
sprintf(
|
||||
/* translators: %s: WordPress version */
|
||||
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
|
||||
sanitize_title( '4.6.20' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress version number */
|
||||
__( '<strong>Version %s</strong> addressed some security issues.' ),
|
||||
'4.6.19'
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: HelpHub URL */
|
||||
__( 'For more information, see <a href="%s">the release notes</a>.' ),
|
||||
sprintf(
|
||||
/* translators: %s: WordPress version */
|
||||
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
|
||||
sanitize_title( '4.6.19' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress version number */
|
||||
__( '<strong>Version %s</strong> addressed some security issues.' ),
|
||||
'4.6.18'
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: HelpHub URL */
|
||||
__( 'For more information, see <a href="%s">the release notes</a>.' ),
|
||||
sprintf(
|
||||
/* translators: %s: WordPress version */
|
||||
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
|
||||
sanitize_title( '4.6.18' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress version number */
|
||||
__( '<strong>Version %s</strong> addressed one security issue.' ),
|
||||
'4.6.17'
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: HelpHub URL */
|
||||
__( 'For more information, see <a href="%s">the release notes</a>.' ),
|
||||
sprintf(
|
||||
/* translators: %s: WordPress version */
|
||||
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
|
||||
sanitize_title( '4.6.17' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress version number */
|
||||
__( '<strong>Version %s</strong> addressed some security issues.' ),
|
||||
'4.6.16'
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: HelpHub URL */
|
||||
__( 'For more information, see <a href="%s">the release notes</a>.' ),
|
||||
sprintf(
|
||||
/* translators: %s: WordPress version */
|
||||
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
|
||||
sanitize_title( '4.6.16' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress version number */
|
||||
__( '<strong>Version %s</strong> addressed some security issues.' ),
|
||||
'4.6.15'
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: HelpHub URL */
|
||||
__( 'For more information, see <a href="%s">the release notes</a>.' ),
|
||||
sprintf(
|
||||
/* translators: %s: WordPress version */
|
||||
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
|
||||
sanitize_title( '4.6.15' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress version number */
|
||||
__( '<strong>Version %s</strong> addressed some security issues.' ),
|
||||
'4.6.14'
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: HelpHub URL */
|
||||
__( 'For more information, see <a href="%s">the release notes</a>.' ),
|
||||
sprintf(
|
||||
/* translators: %s: WordPress version */
|
||||
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
|
||||
sanitize_title( '4.6.14' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: %s: WordPress version number */
|
||||
printf( __( '<strong>Version %s</strong> addressed some security issues.' ), '4.6.13' );
|
||||
?>
|
||||
<?php
|
||||
/* translators: %s: Codex URL */
|
||||
printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.13' );
|
||||
?>
|
||||
</p>
|
||||
<p><?php printf( __( '<strong>Version %s</strong> addressed one security issue.' ), '4.6.12' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.12' ); ?>
|
||||
</p>
|
||||
<p><?php printf( __( '<strong>Version %s</strong> addressed some security issues.' ), '4.6.11' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.11' ); ?>
|
||||
</p>
|
||||
<p><?php printf( __( '<strong>Version %s</strong> addressed one security issue.' ), '4.6.10' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.10' ); ?>
|
||||
</p>
|
||||
<p><?php printf( __( '<strong>Version %s</strong> addressed some security issues.' ), '4.6.9' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.9' ); ?>
|
||||
</p>
|
||||
<p><?php printf( __( '<strong>Version %s</strong> addressed one security issue.' ), '4.6.8' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.8' ); ?>
|
||||
</p>
|
||||
<p><?php printf( __( '<strong>Version %s</strong> addressed some security issues.' ), '4.6.7' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.7' ); ?>
|
||||
</p>
|
||||
<p><?php printf( __( '<strong>Version %s</strong> addressed some security issues.' ), '4.6.6' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.6' ); ?>
|
||||
</p>
|
||||
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed %2$s bugs.', 1 ), '4.6.5', number_format_i18n( 1 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.5' ); ?>
|
||||
</p>
|
||||
<p><?php printf( __( '<strong>Version %s</strong> addressed some security issues.' ), '4.6.4' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.4' ); ?>
|
||||
</p>
|
||||
<p><?php printf( __( '<strong>Version %s</strong> addressed some security issues.' ), '4.6.3' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.3' ); ?>
|
||||
</p>
|
||||
<p><?php printf( __( '<strong>Version %s</strong> addressed some security issues.' ), '4.6.2' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.2' ); ?>
|
||||
</p>
|
||||
<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.', 15 ), '4.6.1', number_format_i18n( 15 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.6.1' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="headline-feature feature-video">
|
||||
<iframe width="1050" height="591" src="<?php echo esc_url( $video_url ); ?>" frameborder="0" allowfullscreen></iframe>
|
||||
<script src="https://videopress.com/videopress-iframe.js"></script>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="feature-section two-col">
|
||||
<h2><?php _e( 'Editing Improvements' ); ?></h2>
|
||||
<div class="col">
|
||||
<img src="https://s.w.org/images/core/4.5/link-edit-560.png" alt="" srcset="https://s.w.org/images/core/4.5/link-edit-1000.png 1000w, https://s.w.org/images/core/4.5/link-edit-800.png 800w, https://s.w.org/images/core/4.5/link-edit-680.png 680w, https://s.w.org/images/core/4.5/link-edit-560.png 560w, https://s.w.org/images/core/4.5/link-edit-400.png 400w, https://s.w.org/images/core/4.5/link-edit-280.png 280w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
|
||||
<h3><?php _e( 'Inline Linking' ); ?></h3>
|
||||
<p><?php _e( 'Stay focused on your writing with a less distracting interface that keeps you in place and allows you to easily link to your content.' ); ?></p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<img src="https://s.w.org/images/core/4.5/formatting-560.png" alt="" srcset="https://s.w.org/images/core/4.5/formatting-1000.png 1000w, https://s.w.org/images/core/4.5/formatting-800.png 800w, https://s.w.org/images/core/4.5/formatting-680.png 680w, https://s.w.org/images/core/4.5/formatting-560.png 560w, https://s.w.org/images/core/4.5/formatting-400.png 400w, https://s.w.org/images/core/4.5/formatting-280.png 280w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
|
||||
<h3><?php _e( 'Formatting Shortcuts' ); ?></h3>
|
||||
<p><?php _e( 'Do you enjoy using formatting shortcuts for lists and headings? Now they’re even more useful, with horizontal lines and <code><code></code>.' ); ?></p>
|
||||
</div>
|
||||
<div class="streamlined-updates feature-section one-col">
|
||||
<h2><?php _e( 'Streamlined Updates' ); ?></h2>
|
||||
<p><?php _e( 'Don’t lose your place: stay on the same page while you update, install, and delete your plugins and themes.' ); ?></p>
|
||||
<?php
|
||||
if ( ! wp_is_mobile() ) {
|
||||
add_filter( 'wp_video_shortcode', '_wp_override_admin_video_width_limit' );
|
||||
echo wp_video_shortcode( array(
|
||||
'mp4' => 'https://s.w.org/images/core/4.6/streamlined-updates.mp4',
|
||||
'webm' => 'https://s.w.org/images/core/4.6/streamlined-updates.webm',
|
||||
'poster' => 'https://s.w.org/images/core/4.6/streamlined-updates-2000.png?v1',
|
||||
'loop' => true,
|
||||
'autoplay' => true,
|
||||
'width' => 1050,
|
||||
'height' => 630,
|
||||
'class' => 'wp-video-shortcode feature-video',
|
||||
) );
|
||||
remove_filter( 'wp_video_shortcode', '_wp_override_admin_video_width_limit' );
|
||||
} else {
|
||||
echo '<img src="https://s.w.org/images/core/4.6/streamlined-updates-1057.png?v1" alt="" srcset="https://s.w.org/images/core/4.6/streamlined-updates-1664.png?v1 1664w, https://s.w.org/images/core/4.6/streamlined-updates-200.png?v1 200w, https://s.w.org/images/core/4.6/streamlined-updates-1057.png?v1 1057w, https://s.w.org/images/core/4.6/streamlined-updates-2000.png?v1 2000w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 782px) calc(100vw - 70px), (max-width: 959px) calc(100vw - 116px), (max-width: 1290px) calc(100vw - 240px), 1050px" />';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="native-fonts feature-section one-col">
|
||||
<h2><?php _e( 'Native Fonts' ); ?></h2>
|
||||
<p><?php _e( 'The WordPress dashboard now takes advantage of the fonts you already have, making it load faster and letting you feel more at home on whatever device you use.' ); ?></p>
|
||||
<img src="https://s.w.org/images/core/4.6/native-fonts-992.png?v1" alt="" srcset="https://cldup.com/Hqmo5VLb-E.png?v1 922w, https://s.w.org/images/core/4.6/native-fonts-200.png?v1 200w,https://s.w.org/images/core/4.6/native-fonts-371.png?v1 371w,https://s.w.org/images/core/4.6/native-fonts-510.png?v1 510w, https://s.w.org/images/core/4.6/native-fonts-560.png?v1 560w, https://s.w.org/images/core/4.6/native-fonts-781.png?v1 781w, https://s.w.org/images/core/4.6/native-fonts-2000.png?v1 2000w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 782px) calc(100vw - 70px), (max-width: 959px) calc(100vw - 116px), (max-width: 1290px) calc(100vw - 240px), 1050px"/>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="feature-section two-col">
|
||||
<h2><?php _e( 'Customization Improvements' ); ?></h2>
|
||||
<h2><?php _e( 'Editor Improvements' ); ?></h2>
|
||||
<div class="col">
|
||||
<img src="https://s.w.org/images/core/4.5/preview-icons-560.png" alt="" srcset="https://s.w.org/images/core/4.5/preview-icons-1000.png 1000w, https://s.w.org/images/core/4.5/preview-icons-800.png 800w, https://s.w.org/images/core/4.5/preview-icons-680.png 680w, https://s.w.org/images/core/4.5/preview-icons-560.png 560w, https://s.w.org/images/core/4.5/preview-icons-400.png 400w, https://s.w.org/images/core/4.5/preview-icons-280.png 280w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
|
||||
<h3><?php _e( 'Live Responsive Previews' ); ?></h3>
|
||||
<p><?php _e( 'Make sure your site looks great on all screens!' ); ?>
|
||||
<?php
|
||||
if ( current_user_can( 'customize' ) ) {
|
||||
$customize_url = admin_url( 'customize.php' );
|
||||
printf(
|
||||
/* translators: %s: URL to customizer */
|
||||
__( 'Preview mobile, tablet, and desktop views directly in the <a href="%s" class="load-customize">customizer</a>.' ),
|
||||
esc_url( $customize_url )
|
||||
);
|
||||
} else {
|
||||
_e( 'Preview mobile, tablet, and desktop views directly in the customizer.' );
|
||||
}
|
||||
<img src="https://s.w.org/images/core/4.6/inline-link-checker-608.png?v1" alt="" srcset="https://s.w.org/images/core/4.6/inline-link-checker-789.png?v1 789w, https://s.w.org/images/core/4.6/inline-link-checker-200.png?v1 200w, https://s.w.org/images/core/4.6/inline-link-checker-384.png?v1 384w, https://s.w.org/images/core/4.6/inline-link-checker-608.png?v1 608w, https://s.w.org/images/core/4.6/inline-link-checker-992.png?v1 992w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
|
||||
<h3><?php _e( 'Inline Link Checker' ); ?></h3>
|
||||
<p><?php
|
||||
printf(
|
||||
/* translators: %s: Home URL appended with 'wordpress.org' */
|
||||
__( 'Ever accidentally made a link to %s? Now WordPress automatically checks to make sure you didn’t.' ),
|
||||
home_url( 'wordpress.org' )
|
||||
);
|
||||
?></p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<img src="https://s.w.org/images/core/4.5/custom-logos-560.png" alt="" srcset="https://s.w.org/images/core/4.5/custom-logos-1000.png 1000w, https://s.w.org/images/core/4.5/custom-logos-800.png 800w, https://s.w.org/images/core/4.5/custom-logos-680.png 680w, https://s.w.org/images/core/4.5/custom-logos-560.png 560w, https://s.w.org/images/core/4.5/custom-logos-400.png 400w, https://s.w.org/images/core/4.5/custom-logos-280.png 280w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
|
||||
<h3><?php _e( 'Custom Logos' ); ?></h3>
|
||||
<p><?php _e( 'Themes can now support logos for your business or brand.' ); ?>
|
||||
<?php
|
||||
if ( current_theme_supports( 'custom-logo' ) && current_user_can( 'customize' ) ) {
|
||||
printf(
|
||||
/* translators: %s: URL to Site Identity section of the customizer */
|
||||
__( 'Your theme supports custom logos! Try it out right now in the <a href="%s" class="load-customize">Site Identity</a> section of the customizer.' ),
|
||||
esc_url( add_query_arg( array( 'autofocus' => array( 'section' => 'title_tagline' ) ), $customize_url ) )
|
||||
);
|
||||
} else {
|
||||
_e( 'The Twenty Fifteen and Twenty Sixteen themes have been updated to support custom logos, which can be found in the Site Identity section of the customizer.' );
|
||||
}
|
||||
?></p>
|
||||
<img src="https://s.w.org/images/core/4.6/content-recovery-561.png?v1" alt="" srcset="https://s.w.org/images/core/4.6/content-recovery-701.png?v1 701w, https://s.w.org/images/core/4.6/content-recovery-200.png?v1 200w, https://s.w.org/images/core/4.6/content-recovery-400.png?v1 400w, https://s.w.org/images/core/4.6/content-recovery-561.png?v1 561w, https://s.w.org/images/core/4.6/content-recovery-992.png?v1 992w" sizes="(max-width: 500px) calc(100vw - 40px), (max-width: 781px) calc((100vw - 70px) * .466), (max-width: 959px) calc((100vw - 116px) * .469), (max-width: 1290px) calc((100vw - 240px) * .472), 496px"/>
|
||||
<h3><?php _e( 'Content Recovery' ); ?></h3>
|
||||
<p><?php _e( 'As you type, WordPress saves your content to the browser. Recovering saved content is even easier with WordPress 4.6.' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -105,80 +317,86 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
|
||||
<div class="under-the-hood three-col">
|
||||
<div class="col">
|
||||
<h3><?php _e( 'Selective Refresh' ); ?></h3>
|
||||
<h3><?php _e( 'Resource Hints' ); ?></h3>
|
||||
<p><?php
|
||||
printf(
|
||||
/* translators: %s: URL to the development post of the new feature */
|
||||
__( 'The customizer now supports a <a href="%s">comprehensive framework</a> for rendering parts of the preview without rewriting your PHP code in JavaScript.' ),
|
||||
'https://make.wordpress.org/core/2016/02/16/selective-refresh-in-the-customizer/'
|
||||
/* translators: %s: https://make.wordpress.org/core/2016/07/06/resource-hints-in-4-6/ */
|
||||
__( '<a href="%s">Resource hints help browsers</a> decide which resources to fetch and preprocess. WordPress 4.6 adds them automatically for your styles and scripts making your site even faster.' ),
|
||||
'https://make.wordpress.org/core/2016/07/06/resource-hints-in-4-6/'
|
||||
);
|
||||
if ( current_user_can( 'customize' ) && current_user_can( 'edit_theme_options' ) ) {
|
||||
if ( current_theme_supports( 'menus' ) && ! current_theme_supports( 'customize-selective-refresh-widgets' ) ) {
|
||||
printf(
|
||||
/* translators: %s: URL to Menus section of the customizer */
|
||||
' ' . __( 'See it in action with <a href="%s" class="load-customize">Menus</a>.' ),
|
||||
esc_url( add_query_arg( array( 'autofocus' => array( 'panel' => 'nav_menus' ) ), $customize_url ) )
|
||||
);
|
||||
} elseif ( current_theme_supports( 'customize-selective-refresh-widgets' ) ) { // If widgets are supported, menus are also because of the menus widget.
|
||||
printf(
|
||||
/* translators: 1: URL to Menus section of the customizer, 2: URL to Widgets section of the customizer */
|
||||
' ' . __( 'See it in action with <a href="%1$s" class="load-customize">Menus</a> or <a href="%2$s" class="load-customize">Widgets</a>.' ),
|
||||
esc_url( add_query_arg( array( 'autofocus' => array( 'panel' => 'nav_menus' ) ), $customize_url ) ),
|
||||
esc_url( add_query_arg( array( 'autofocus' => array( 'panel' => 'widgets' ) ), $customize_url ) )
|
||||
);
|
||||
}
|
||||
}
|
||||
?></p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3><?php _e( 'Smart Image Resizing' ); ?></h3>
|
||||
<h3><?php _e( 'Robust Requests' ); ?></h3>
|
||||
<p><?php _e( 'The HTTP API now leverages the Requests library, improving HTTP standard support and adding case-insensitive headers, parallel HTTP requests, and support for Internationalized Domain Names.' ); ?></p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3><?php
|
||||
/* translators: 1: WP_Term_Query, 2: WP_Post_Type */
|
||||
printf( __( '%1$s and %2$s' ), '<code>WP_Term_Query</code>', '<code>WP_Post_Type</code>' );
|
||||
?></h3>
|
||||
<p><?php
|
||||
printf(
|
||||
/* translators: %s: URL to the development post of the new feature */
|
||||
__( 'Generated images now load up to 50% faster with no noticeable quality loss. <a href="%s">It’s really cool</a>.' ),
|
||||
'https://make.wordpress.org/core/2016/03/12/performance-improvements-for-images-in-wordpress-4-5/'
|
||||
/* translators: 1: WP_Term_Query, 2: WP_Post_Type */
|
||||
__( 'A new %1$s class adds flexibility to query term information while a new %2$s object makes interacting with post types more predictable.' ),
|
||||
'<code>WP_Term_Query</code>',
|
||||
'<code>WP_Post_Type</code>'
|
||||
);
|
||||
?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="under-the-hood three-col">
|
||||
<div class="col">
|
||||
<h3><?php _e( 'Meta Registration API' ); ?></h3>
|
||||
<p><?php
|
||||
printf(
|
||||
/* translators: %s: https://make.wordpress.org/core/2016/07/08/enhancing-register_meta-in-4-6/ */
|
||||
__( 'The Meta Registration API <a href="%s">has been expanded</a> to support types, descriptions, and REST API visibility.' ),
|
||||
'https://make.wordpress.org/core/2016/07/08/enhancing-register_meta-in-4-6/'
|
||||
);
|
||||
?></p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3><?php _e( 'Translations On Demand' ); ?></h3>
|
||||
<p><?php _e( 'WordPress will install and use the newest language packs for your plugins and themes as soon as they’re available from <a href="https://translate.wordpress.org/">WordPress.org’s community of translators</a>.' ); ?></p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3><?php _e( 'JavaScript Library Updates' ); ?></h3>
|
||||
<p><?php _e( 'jQuery 1.12.3, jQuery Migrate 1.4.0, Backbone 1.2.3, and Underscore 1.8.3 are bundled.' ); ?></p>
|
||||
<p><?php _e( 'Masonry 3.3.2, imagesLoaded 3.2.0, MediaElement.js 2.22.0, TinyMCE 4.4.1, and Backbone.js 1.3.3 are bundled.' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="under-the-hood two-col">
|
||||
<div class="col">
|
||||
<h3><?php _e( 'Script Loader Improvements' ); ?></h3>
|
||||
<p><?php
|
||||
printf(
|
||||
/* translators: %s: wp_add_inline_script() */
|
||||
__( 'Better support has been added for script header/footer dependencies. New %s enables adding extra code to registered scripts.' ),
|
||||
'<code><a href="https://make.wordpress.org/core/2016/03/08/enhanced-script-loader-in-wordpress-4-5/">wp_add_inline_script()</a></code>'
|
||||
);
|
||||
?></p>
|
||||
<h3><?php _e( 'Customizer APIs for Setting Validation and Notifications' ); ?></h3>
|
||||
<p><?php _e( 'Settings now have an <a href="https://make.wordpress.org/core/2016/07/05/customizer-apis-in-4-6-for-setting-validation-and-notifications/">API for enforcing validation constraints</a>. Likewise, customizer controls now support notifications, which are used to display validation errors instead of failing silently.' ); ?></p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3><?php _e( 'Better Embed Templates' ); ?></h3>
|
||||
<h3><?php _e( 'Multisite, now faster than ever' ); ?></h3>
|
||||
<p><?php
|
||||
printf(
|
||||
/* translators: %s: URL to the development post of the new feature */
|
||||
__( 'Embed templates have been split into parts and can be <a href="%s">directly overridden by themes</a> via the template hierarchy.' ),
|
||||
'https://make.wordpress.org/core/2016/03/11/embeds-changes-in-wordpress-4-5/'
|
||||
/* translators: 1: WP_Site_Query, 2: WP_Network_Query */
|
||||
__( 'Cached and comprehensive site queries improve your network admin experience. The addition of %1$s and %2$s help craft advanced queries with less effort.' ),
|
||||
'<code>WP_Site_Query</code>',
|
||||
'<code>WP_Network_Query</code>'
|
||||
);
|
||||
?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="return-to-dashboard">
|
||||
<?php if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : ?>
|
||||
<a href="<?php echo esc_url( self_admin_url( 'update-core.php' ) ); ?>">
|
||||
<?php is_multisite() ? _e( 'Return to Updates' ) : _e( 'Return to Dashboard → Updates' ); ?>
|
||||
</a> |
|
||||
<?php endif; ?>
|
||||
<a href="<?php echo esc_url( self_admin_url() ); ?>"><?php is_blog_admin() ? _e( 'Go to Dashboard → Home' ) : _e( 'Go to Dashboard' ); ?></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="return-to-dashboard">
|
||||
<?php if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : ?>
|
||||
<a href="<?php echo esc_url( self_admin_url( 'update-core.php' ) ); ?>">
|
||||
<?php is_multisite() ? _e( 'Return to Updates' ) : _e( 'Return to Dashboard → Updates' ); ?>
|
||||
</a> |
|
||||
<?php endif; ?>
|
||||
<a href="<?php echo esc_url( self_admin_url() ); ?>"><?php is_blog_admin() ? _e( 'Go to Dashboard → Home' ) : _e( 'Go to Dashboard' ); ?></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
|
||||
|
||||
@@ -70,13 +70,13 @@ wp_enqueue_script( 'svg-painter' );
|
||||
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
|
||||
pagenow = '<?php echo $current_screen->id; ?>',
|
||||
typenow = '<?php echo $current_screen->post_type; ?>',
|
||||
adminpage = '<?php echo $admin_body_class; ?>',
|
||||
thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
|
||||
decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
|
||||
addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(document).ready(func);else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||
var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>',
|
||||
pagenow = '<?php echo esc_js( $current_screen->id ); ?>',
|
||||
typenow = '<?php echo esc_js( $current_screen->post_type ); ?>',
|
||||
adminpage = '<?php echo esc_js( $admin_body_class ); ?>',
|
||||
thousandsSeparator = '<?php echo esc_js( $wp_locale->number_format['thousands_sep'] ); ?>',
|
||||
decimalPoint = '<?php echo esc_js( $wp_locale->number_format['decimal_point'] ); ?>',
|
||||
isRtl = <?php echo (int) is_rtl(); ?>;
|
||||
</script>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
|
||||
@@ -32,7 +32,7 @@ if ( ! ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['actio
|
||||
|
||||
require_once( ABSPATH . 'wp-admin/admin.php' );
|
||||
|
||||
header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
|
||||
header( 'Content-Type: text/plain; charset=' . get_option( 'blog_charset' ) );
|
||||
|
||||
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
|
||||
include( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
|
||||
|
||||
@@ -20,7 +20,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
|
||||
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
|
||||
|
||||
<div class="about-text"><?php printf( __( 'Thank you for updating! WordPress %s streamlines your workflow, whether you’re writing or building your site.' ), $display_version ); ?></div>
|
||||
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version. WordPress %s changes a lot behind the scenes to make your WordPress experience even better!' ), $display_version ); ?></p>
|
||||
|
||||
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
|
||||
|
||||
|
||||
@@ -88,10 +88,16 @@
|
||||
/* 1.1 - Typography */
|
||||
|
||||
.about-wrap p {
|
||||
line-height: 1.6em;
|
||||
line-height: 1.5;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.about-wrap .feature-section p {
|
||||
max-width: 38em;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.about-wrap h1 {
|
||||
margin: 0.2em 0 0 200px;
|
||||
padding: 0;
|
||||
@@ -109,17 +115,10 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.about-wrap .changelog h2,
|
||||
.about-wrap h3 {
|
||||
margin: 1.25em 0 .6em;
|
||||
font-size: 1.25em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.about-wrap .changelog h2 {
|
||||
margin-top: 40px;
|
||||
font-weight: 600;
|
||||
text-align: right;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.about-wrap h4 {
|
||||
@@ -194,10 +193,19 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.about-wrap .under-the-hood:nth-of-type(2n) {
|
||||
.about-wrap .under-the-hood:nth-of-type(2n),
|
||||
.about-wrap .under-the-hood:nth-of-type(3n) {
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
.about-wrap .feature-video .mejs-controls {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.about-wrap .feature-video .mejs-overlay-loading span {
|
||||
background: transparent; /* Hide loading.gif */
|
||||
}
|
||||
|
||||
/* 1.3 - Point Releases */
|
||||
|
||||
.about-wrap .point-releases {
|
||||
@@ -258,6 +266,11 @@
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.about-wrap .streamlined-updates p,
|
||||
.about-wrap .native-fonts p {
|
||||
margin-bottom: 3em;
|
||||
}
|
||||
|
||||
/* 2.2 - Structure */
|
||||
|
||||
.about-wrap .headline-feature.feature-video {
|
||||
@@ -471,11 +484,13 @@
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.about-wrap .under-the-hood:nth-of-type(2n) {
|
||||
.about-wrap .under-the-hood:nth-of-type(2n),
|
||||
.about-wrap .under-the-hood:nth-of-type(3n) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.about-wrap .under-the-hood:nth-of-type(2n) h4 {
|
||||
.about-wrap .under-the-hood:nth-of-type(2n) h3,
|
||||
.about-wrap .under-the-hood:nth-of-type(3n) h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
2
wp-admin/css/about-rtl.min.css
vendored
2
wp-admin/css/about-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -88,10 +88,16 @@
|
||||
/* 1.1 - Typography */
|
||||
|
||||
.about-wrap p {
|
||||
line-height: 1.6em;
|
||||
line-height: 1.5;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.about-wrap .feature-section p {
|
||||
max-width: 38em;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.about-wrap h1 {
|
||||
margin: 0.2em 200px 0 0;
|
||||
padding: 0;
|
||||
@@ -109,17 +115,10 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.about-wrap .changelog h2,
|
||||
.about-wrap h3 {
|
||||
margin: 1.25em 0 .6em;
|
||||
font-size: 1.25em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.about-wrap .changelog h2 {
|
||||
margin-top: 40px;
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.about-wrap h4 {
|
||||
@@ -194,10 +193,19 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.about-wrap .under-the-hood:nth-of-type(2n) {
|
||||
.about-wrap .under-the-hood:nth-of-type(2n),
|
||||
.about-wrap .under-the-hood:nth-of-type(3n) {
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
.about-wrap .feature-video .mejs-controls {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.about-wrap .feature-video .mejs-overlay-loading span {
|
||||
background: transparent; /* Hide loading.gif */
|
||||
}
|
||||
|
||||
/* 1.3 - Point Releases */
|
||||
|
||||
.about-wrap .point-releases {
|
||||
@@ -258,6 +266,11 @@
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.about-wrap .streamlined-updates p,
|
||||
.about-wrap .native-fonts p {
|
||||
margin-bottom: 3em;
|
||||
}
|
||||
|
||||
/* 2.2 - Structure */
|
||||
|
||||
.about-wrap .headline-feature.feature-video {
|
||||
@@ -471,11 +484,13 @@
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.about-wrap .under-the-hood:nth-of-type(2n) {
|
||||
.about-wrap .under-the-hood:nth-of-type(2n),
|
||||
.about-wrap .under-the-hood:nth-of-type(3n) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.about-wrap .under-the-hood:nth-of-type(2n) h4 {
|
||||
.about-wrap .under-the-hood:nth-of-type(2n) h3,
|
||||
.about-wrap .under-the-hood:nth-of-type(3n) h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
2
wp-admin/css/about.min.css
vendored
2
wp-admin/css/about.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1308,6 +1308,10 @@ div.error {
|
||||
padding: 1px 12px;
|
||||
}
|
||||
|
||||
div[class="update-message"] { /* back-compat for pre-4.6 */
|
||||
padding: 0.5em 0 0.5em 12px;
|
||||
}
|
||||
|
||||
.notice p,
|
||||
.notice-title,
|
||||
div.updated p,
|
||||
@@ -3024,7 +3028,8 @@ img {
|
||||
|
||||
/* Metabox collapse arrow indicators */
|
||||
.js .sidebar-name .sidebar-name-arrow:before,
|
||||
.js .meta-box-sortables .postbox .toggle-indicator:before {
|
||||
.js .meta-box-sortables .postbox .toggle-indicator:before,
|
||||
.bulk-action-notice .toggle-indicator:before {
|
||||
content: "\f142";
|
||||
display: inline-block;
|
||||
font: normal 20px/1 dashicons;
|
||||
@@ -3035,7 +3040,8 @@ img {
|
||||
}
|
||||
|
||||
.js .widgets-holder-wrap.closed .sidebar-name-arrow:before,
|
||||
.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before {
|
||||
.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before,
|
||||
.bulk-action-notice .bulk-action-errors-collapsed .toggle-indicator:before {
|
||||
content: "\f140";
|
||||
}
|
||||
|
||||
@@ -3065,6 +3071,12 @@ img {
|
||||
text-indent: 1px; /* account for the dashicon alignment */
|
||||
}
|
||||
|
||||
.bulk-action-notice .toggle-indicator:before {
|
||||
line-height: 16px;
|
||||
vertical-align: top;
|
||||
color: #72777c;
|
||||
}
|
||||
|
||||
.js .postbox .handlediv:focus {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
|
||||
2
wp-admin/css/common-rtl.min.css
vendored
2
wp-admin/css/common-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1308,6 +1308,10 @@ div.error {
|
||||
padding: 1px 12px;
|
||||
}
|
||||
|
||||
div[class="update-message"] { /* back-compat for pre-4.6 */
|
||||
padding: 0.5em 12px 0.5em 0;
|
||||
}
|
||||
|
||||
.notice p,
|
||||
.notice-title,
|
||||
div.updated p,
|
||||
@@ -3024,7 +3028,8 @@ img {
|
||||
|
||||
/* Metabox collapse arrow indicators */
|
||||
.js .sidebar-name .sidebar-name-arrow:before,
|
||||
.js .meta-box-sortables .postbox .toggle-indicator:before {
|
||||
.js .meta-box-sortables .postbox .toggle-indicator:before,
|
||||
.bulk-action-notice .toggle-indicator:before {
|
||||
content: "\f142";
|
||||
display: inline-block;
|
||||
font: normal 20px/1 dashicons;
|
||||
@@ -3035,7 +3040,8 @@ img {
|
||||
}
|
||||
|
||||
.js .widgets-holder-wrap.closed .sidebar-name-arrow:before,
|
||||
.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before {
|
||||
.js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before,
|
||||
.bulk-action-notice .bulk-action-errors-collapsed .toggle-indicator:before {
|
||||
content: "\f140";
|
||||
}
|
||||
|
||||
@@ -3065,6 +3071,12 @@ img {
|
||||
text-indent: 1px; /* account for the dashicon alignment */
|
||||
}
|
||||
|
||||
.bulk-action-notice .toggle-indicator:before {
|
||||
line-height: 16px;
|
||||
vertical-align: top;
|
||||
color: #72777c;
|
||||
}
|
||||
|
||||
.js .postbox .handlediv:focus {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
|
||||
2
wp-admin/css/common.min.css
vendored
2
wp-admin/css/common.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -16,8 +16,22 @@
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* The `edit-menu` button uses also the `button-link` class. */
|
||||
.customize-control-nav_menu_location .edit-menu {
|
||||
margin-top: 1px;
|
||||
margin-right: 6px;
|
||||
vertical-align: middle;
|
||||
line-height: 28px;
|
||||
color: #0073aa;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.customize-control-nav_menu_location .edit-menu:hover,
|
||||
.customize-control-nav_menu_location .edit-menu:active {
|
||||
color: #00a0d2;
|
||||
}
|
||||
|
||||
.customize-control-nav_menu_location .edit-menu:focus {
|
||||
color: #124964;
|
||||
}
|
||||
|
||||
.wp-customizer .menu-item-bar .menu-item-handle,
|
||||
|
||||
2
wp-admin/css/customize-nav-menus-rtl.min.css
vendored
2
wp-admin/css/customize-nav-menus-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -16,8 +16,22 @@
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* The `edit-menu` button uses also the `button-link` class. */
|
||||
.customize-control-nav_menu_location .edit-menu {
|
||||
margin-top: 1px;
|
||||
margin-left: 6px;
|
||||
vertical-align: middle;
|
||||
line-height: 28px;
|
||||
color: #0073aa;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.customize-control-nav_menu_location .edit-menu:hover,
|
||||
.customize-control-nav_menu_location .edit-menu:active {
|
||||
color: #00a0d2;
|
||||
}
|
||||
|
||||
.customize-control-nav_menu_location .edit-menu:focus {
|
||||
color: #124964;
|
||||
}
|
||||
|
||||
.wp-customizer .menu-item-bar .menu-item-handle,
|
||||
|
||||
2
wp-admin/css/customize-nav-menus.min.css
vendored
2
wp-admin/css/customize-nav-menus.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1350,7 +1350,8 @@ ul.cat-checklist {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.plugins .plugin-update-tr .notice {
|
||||
.plugins .plugin-update-tr .notice,
|
||||
.plugins .plugin-update-tr div[class="update-message"] { /* back-compat for pre-4.6 */
|
||||
margin: 5px 40px 15px 20px;
|
||||
}
|
||||
|
||||
|
||||
2
wp-admin/css/list-tables-rtl.min.css
vendored
2
wp-admin/css/list-tables-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1350,7 +1350,8 @@ ul.cat-checklist {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.plugins .plugin-update-tr .notice {
|
||||
.plugins .plugin-update-tr .notice,
|
||||
.plugins .plugin-update-tr div[class="update-message"] { /* back-compat for pre-4.6 */
|
||||
margin: 5px 20px 15px 40px;
|
||||
}
|
||||
|
||||
|
||||
2
wp-admin/css/list-tables.min.css
vendored
2
wp-admin/css/list-tables.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -464,6 +464,7 @@ if ( current_theme_supports( 'custom-background', 'default-color' ) )
|
||||
* @deprecated 3.5.0
|
||||
*/
|
||||
public function wp_set_background_image() {
|
||||
check_ajax_referer( 'custom-background' );
|
||||
if ( ! current_user_can('edit_theme_options') || ! isset( $_POST['attachment_id'] ) ) exit;
|
||||
$attachment_id = absint($_POST['attachment_id']);
|
||||
/** This filter is documented in wp-admin/includes/media.php */
|
||||
|
||||
@@ -326,7 +326,7 @@ class Custom_Image_Header {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
(function($){
|
||||
var default_color = '<?php echo $default_color; ?>',
|
||||
var default_color = '<?php echo esc_js( $default_color ); ?>',
|
||||
header_text_fields;
|
||||
|
||||
function pickColor(color) {
|
||||
|
||||
@@ -132,7 +132,7 @@ do_action( 'customize_controls_print_scripts' );
|
||||
<div id="customize-info" class="accordion-section customize-info">
|
||||
<div class="accordion-section-title">
|
||||
<span class="preview-notice"><?php
|
||||
echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name' ) . '</strong>' );
|
||||
echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name', 'display' ) . '</strong>' );
|
||||
?></span>
|
||||
<button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
|
||||
</div>
|
||||
|
||||
@@ -74,12 +74,12 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
|
||||
<div id="message" class="updated">
|
||||
<p><strong><?php echo $message; ?></strong></p>
|
||||
<?php if ( $wp_http_referer ) { ?>
|
||||
<p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php
|
||||
<p><a href="<?php echo esc_url( wp_validate_redirect( esc_url_raw( $wp_http_referer ), admin_url( 'term.php?taxonomy=' . $taxonomy ) ) ); ?>"><?php
|
||||
/* translators: %s: taxonomy name */
|
||||
printf( _x( '← Back to %s', 'admin screen' ), $tax->labels->name );
|
||||
?></a></p>
|
||||
<?php } else { ?>
|
||||
<p><a href="<?php echo esc_url( wp_get_referer() ); ?>"><?php
|
||||
<p><a href="<?php echo esc_url( wp_validate_redirect( esc_url_raw( wp_get_referer() ) ) ); ?>"><?php
|
||||
/* translators: %s: taxonomy name */
|
||||
printf( _x( '← Back to %s', 'admin screen' ), $tax->labels->name );
|
||||
?></a></p>
|
||||
|
||||
@@ -19,7 +19,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
|
||||
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
|
||||
|
||||
<div class="about-text"><?php printf( __( 'Thank you for updating! WordPress %s streamlines your workflow, whether you’re writing or building your site.' ), $display_version ); ?></div>
|
||||
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version. WordPress %s changes a lot behind the scenes to make your WordPress experience even better!' ), $display_version ); ?></p>
|
||||
|
||||
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
|
||||
|
||||
|
||||
@@ -1025,6 +1025,8 @@ function wp_ajax_replyto_comment( $action ) {
|
||||
if ( wp_create_nonce( 'unfiltered-html-comment' ) != $_POST['_wp_unfiltered_html_comment'] ) {
|
||||
kses_remove_filters(); // start with a clean slate
|
||||
kses_init_filters(); // set up the filters
|
||||
remove_filter( 'pre_comment_content', 'wp_filter_post_kses' );
|
||||
add_filter( 'pre_comment_content', 'wp_filter_kses' );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -2020,7 +2022,7 @@ function wp_ajax_upload_attachment() {
|
||||
'success' => false,
|
||||
'data' => array(
|
||||
'message' => __( 'Sorry, you are not allowed to upload files.' ),
|
||||
'filename' => $_FILES['async-upload']['name'],
|
||||
'filename' => esc_html( $_FILES['async-upload']['name'] ),
|
||||
)
|
||||
) );
|
||||
|
||||
@@ -2034,7 +2036,7 @@ function wp_ajax_upload_attachment() {
|
||||
'success' => false,
|
||||
'data' => array(
|
||||
'message' => __( "You don't have permission to attach files to this post." ),
|
||||
'filename' => $_FILES['async-upload']['name'],
|
||||
'filename' => esc_html( $_FILES['async-upload']['name'] ),
|
||||
)
|
||||
) );
|
||||
|
||||
@@ -2044,7 +2046,11 @@ function wp_ajax_upload_attachment() {
|
||||
$post_id = null;
|
||||
}
|
||||
|
||||
$post_data = isset( $_REQUEST['post_data'] ) ? $_REQUEST['post_data'] : array();
|
||||
$post_data = ! empty( $_REQUEST['post_data'] ) ? _wp_get_allowed_postdata( _wp_translate_postdata( false, (array) $_REQUEST['post_data'] ) ) : array();
|
||||
|
||||
if ( is_wp_error( $post_data ) ) {
|
||||
wp_die( $post_data->get_error_message() );
|
||||
}
|
||||
|
||||
// If the context is custom header or background, make sure the uploaded file is an image.
|
||||
if ( isset( $post_data['context'] ) && in_array( $post_data['context'], array( 'custom-header', 'custom-background' ) ) ) {
|
||||
@@ -2054,7 +2060,7 @@ function wp_ajax_upload_attachment() {
|
||||
'success' => false,
|
||||
'data' => array(
|
||||
'message' => __( 'The uploaded file is not a valid image. Please try again.' ),
|
||||
'filename' => $_FILES['async-upload']['name'],
|
||||
'filename' => esc_html( $_FILES['async-upload']['name'] ),
|
||||
)
|
||||
) );
|
||||
|
||||
@@ -2069,7 +2075,7 @@ function wp_ajax_upload_attachment() {
|
||||
'success' => false,
|
||||
'data' => array(
|
||||
'message' => $attachment_id->get_error_message(),
|
||||
'filename' => $_FILES['async-upload']['name'],
|
||||
'filename' => esc_html( $_FILES['async-upload']['name'] ),
|
||||
)
|
||||
) );
|
||||
|
||||
@@ -3345,16 +3351,25 @@ function wp_ajax_install_theme() {
|
||||
wp_send_json_error( $status );
|
||||
}
|
||||
|
||||
$upgrader = new Theme_Upgrader( new Automatic_Upgrader_Skin() );
|
||||
$skin = new WP_Ajax_Upgrader_Skin();
|
||||
$upgrader = new Theme_Upgrader( $skin );
|
||||
$result = $upgrader->install( $api->download_link );
|
||||
|
||||
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
||||
$status['debug'] = $upgrader->skin->get_upgrade_messages();
|
||||
$status['debug'] = $skin->get_upgrade_messages();
|
||||
}
|
||||
|
||||
if ( is_wp_error( $result ) ) {
|
||||
$status['errorCode'] = $result->get_error_code();
|
||||
$status['errorMessage'] = $result->get_error_message();
|
||||
wp_send_json_error( $status );
|
||||
} elseif ( is_wp_error( $skin->result ) ) {
|
||||
$status['errorCode'] = $skin->result->get_error_code();
|
||||
$status['errorMessage'] = $skin->result->get_error_message();
|
||||
wp_send_json_error( $status );
|
||||
} elseif ( $skin->get_errors()->get_error_code() ) {
|
||||
$status['errorMessage'] = $skin->get_error_messages();
|
||||
wp_send_json_error( $status );
|
||||
} elseif ( is_null( $result ) ) {
|
||||
global $wp_filesystem;
|
||||
|
||||
@@ -3437,14 +3452,22 @@ function wp_ajax_update_theme() {
|
||||
wp_update_themes();
|
||||
}
|
||||
|
||||
$upgrader = new Theme_Upgrader( new Automatic_Upgrader_Skin() );
|
||||
$skin = new WP_Ajax_Upgrader_Skin();
|
||||
$upgrader = new Theme_Upgrader( $skin );
|
||||
$result = $upgrader->bulk_upgrade( array( $stylesheet ) );
|
||||
|
||||
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
||||
$status['debug'] = $upgrader->skin->get_upgrade_messages();
|
||||
$status['debug'] = $skin->get_upgrade_messages();
|
||||
}
|
||||
|
||||
if ( is_array( $result ) && ! empty( $result[ $stylesheet ] ) ) {
|
||||
if ( is_wp_error( $skin->result ) ) {
|
||||
$status['errorCode'] = $skin->result->get_error_code();
|
||||
$status['errorMessage'] = $skin->result->get_error_message();
|
||||
wp_send_json_error( $status );
|
||||
} elseif ( $skin->get_errors()->get_error_code() ) {
|
||||
$status['errorMessage'] = $skin->get_error_messages();
|
||||
wp_send_json_error( $status );
|
||||
} elseif ( is_array( $result ) && ! empty( $result[ $stylesheet ] ) ) {
|
||||
|
||||
// Theme is already at the latest version.
|
||||
if ( true === $result[ $stylesheet ] ) {
|
||||
@@ -3458,10 +3481,6 @@ function wp_ajax_update_theme() {
|
||||
}
|
||||
|
||||
wp_send_json_success( $status );
|
||||
} elseif ( is_wp_error( $upgrader->skin->result ) ) {
|
||||
$status['errorCode'] = $upgrader->skin->result->get_error_code();
|
||||
$status['errorMessage'] = $upgrader->skin->result->get_error_message();
|
||||
wp_send_json_error( $status );
|
||||
} elseif ( false === $result ) {
|
||||
global $wp_filesystem;
|
||||
|
||||
@@ -3594,16 +3613,25 @@ function wp_ajax_install_plugin() {
|
||||
|
||||
$status['pluginName'] = $api->name;
|
||||
|
||||
$upgrader = new Plugin_Upgrader( new Automatic_Upgrader_Skin() );
|
||||
$skin = new WP_Ajax_Upgrader_Skin();
|
||||
$upgrader = new Plugin_Upgrader( $skin );
|
||||
$result = $upgrader->install( $api->download_link );
|
||||
|
||||
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
||||
$status['debug'] = $upgrader->skin->get_upgrade_messages();
|
||||
$status['debug'] = $skin->get_upgrade_messages();
|
||||
}
|
||||
|
||||
if ( is_wp_error( $result ) ) {
|
||||
$status['errorCode'] = $result->get_error_code();
|
||||
$status['errorMessage'] = $result->get_error_message();
|
||||
wp_send_json_error( $status );
|
||||
} elseif ( is_wp_error( $skin->result ) ) {
|
||||
$status['errorCode'] = $skin->result->get_error_code();
|
||||
$status['errorMessage'] = $skin->result->get_error_message();
|
||||
wp_send_json_error( $status );
|
||||
} elseif ( $skin->get_errors()->get_error_code() ) {
|
||||
$status['errorMessage'] = $skin->get_error_messages();
|
||||
wp_send_json_error( $status );
|
||||
} elseif ( is_null( $result ) ) {
|
||||
global $wp_filesystem;
|
||||
|
||||
@@ -3680,19 +3708,22 @@ function wp_ajax_update_plugin() {
|
||||
|
||||
wp_update_plugins();
|
||||
|
||||
$skin = new Automatic_Upgrader_Skin();
|
||||
$skin = new WP_Ajax_Upgrader_Skin();
|
||||
$upgrader = new Plugin_Upgrader( $skin );
|
||||
$result = $upgrader->bulk_upgrade( array( $plugin ) );
|
||||
|
||||
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
||||
$status['debug'] = $upgrader->skin->get_upgrade_messages();
|
||||
$status['debug'] = $skin->get_upgrade_messages();
|
||||
}
|
||||
|
||||
if ( is_array( $result ) && empty( $result[ $plugin ] ) && is_wp_error( $skin->result ) ) {
|
||||
$result = $skin->result;
|
||||
}
|
||||
|
||||
if ( is_array( $result ) && ! empty( $result[ $plugin ] ) ) {
|
||||
if ( is_wp_error( $skin->result ) ) {
|
||||
$status['errorCode'] = $skin->result->get_error_code();
|
||||
$status['errorMessage'] = $skin->result->get_error_message();
|
||||
wp_send_json_error( $status );
|
||||
} elseif ( $skin->get_errors()->get_error_code() ) {
|
||||
$status['errorMessage'] = $skin->get_error_messages();
|
||||
wp_send_json_error( $status );
|
||||
} elseif ( is_array( $result ) && ! empty( $result[ $plugin ] ) ) {
|
||||
$plugin_update_data = current( $result );
|
||||
|
||||
/*
|
||||
@@ -3716,9 +3747,6 @@ function wp_ajax_update_plugin() {
|
||||
$status['newVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
|
||||
}
|
||||
wp_send_json_success( $status );
|
||||
} elseif ( is_wp_error( $result ) ) {
|
||||
$status['errorMessage'] = $result->get_error_message();
|
||||
wp_send_json_error( $status );
|
||||
} elseif ( false === $result ) {
|
||||
global $wp_filesystem;
|
||||
|
||||
|
||||
@@ -100,8 +100,12 @@ class File_Upload_Upgrader {
|
||||
if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) )
|
||||
wp_die( $uploads['error'] );
|
||||
|
||||
$this->filename = $_GET[$urlholder];
|
||||
$this->filename = sanitize_file_name( $_GET[ $urlholder ] );
|
||||
$this->package = $uploads['basedir'] . '/' . $this->filename;
|
||||
|
||||
if ( 0 !== strpos( realpath( $this->package ), realpath( $uploads['basedir'] ) ) ) {
|
||||
wp_die( __( 'Please select a file' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -282,9 +282,9 @@ class Language_Pack_Upgrader extends WP_Upgrader {
|
||||
|
||||
// Re-add upgrade hooks.
|
||||
add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
|
||||
add_action( 'upgrader_process_complete', 'wp_version_check' );
|
||||
add_action( 'upgrader_process_complete', 'wp_update_plugins' );
|
||||
add_action( 'upgrader_process_complete', 'wp_update_themes' );
|
||||
add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
|
||||
add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
|
||||
add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
|
||||
|
||||
$this->skin->bulk_footer();
|
||||
|
||||
|
||||
132
wp-admin/includes/class-wp-ajax-upgrader-skin.php
Normal file
132
wp-admin/includes/class-wp-ajax-upgrader-skin.php
Normal file
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
/**
|
||||
* Upgrader API: WP_Ajax_Upgrader_Skin class
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Upgrader
|
||||
* @since 4.6.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Upgrader Skin for Ajax WordPress upgrades.
|
||||
*
|
||||
* This skin is designed to be used for Ajax updates.
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @see Automatic_Upgrader_Skin
|
||||
*/
|
||||
class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin {
|
||||
|
||||
/**
|
||||
* Holds the WP_Error object.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @access protected
|
||||
* @var null|WP_Error
|
||||
*/
|
||||
protected $errors = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @access public
|
||||
*
|
||||
* @param array $args Options for the upgrader, see WP_Upgrader_Skin::__construct().
|
||||
*/
|
||||
public function __construct( $args = array() ) {
|
||||
parent::__construct( $args );
|
||||
|
||||
$this->errors = new WP_Error();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the list of errors.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @access public
|
||||
*
|
||||
* @return WP_Error Errors during an upgrade.
|
||||
*/
|
||||
public function get_errors() {
|
||||
return $this->errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a string for error messages.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @access public
|
||||
*
|
||||
* @return string Error messages during an upgrade.
|
||||
*/
|
||||
public function get_error_messages() {
|
||||
$messages = array();
|
||||
|
||||
foreach ( $this->errors->get_error_codes() as $error_code ) {
|
||||
if ( $this->errors->get_error_data( $error_code ) && is_string( $this->errors->get_error_data( $error_code ) ) ) {
|
||||
$messages[] = $this->errors->get_error_message( $error_code ) . ' ' . esc_html( strip_tags( $this->errors->get_error_data( $error_code ) ) );
|
||||
} else {
|
||||
$messages[] = $this->errors->get_error_message( $error_code );
|
||||
}
|
||||
}
|
||||
|
||||
return implode( ', ', $messages );
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores a log entry for an error.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @access public
|
||||
*
|
||||
* @param string|WP_Error $errors Errors.
|
||||
*/
|
||||
public function error( $errors ) {
|
||||
if ( is_string( $errors ) ) {
|
||||
$string = $errors;
|
||||
if ( ! empty( $this->upgrader->strings[ $string ] ) ) {
|
||||
$string = $this->upgrader->strings[ $string ];
|
||||
}
|
||||
|
||||
if ( false !== strpos( $string, '%' ) ) {
|
||||
$args = func_get_args();
|
||||
$args = array_splice( $args, 1 );
|
||||
if ( ! empty( $args ) ) {
|
||||
$string = vsprintf( $string, $args );
|
||||
}
|
||||
}
|
||||
|
||||
// Count existing errors to generate an unique error code.
|
||||
$errors_count = count( $errors->get_error_codes() );
|
||||
$this->errors->add( 'unknown_upgrade_error_' . $errors_count + 1 , $string );
|
||||
} elseif ( is_wp_error( $errors ) ) {
|
||||
foreach ( $errors->get_error_codes() as $error_code ) {
|
||||
$this->errors->add( $error_code, $errors->get_error_message( $error_code ), $errors->get_error_data( $error_code ) );
|
||||
}
|
||||
}
|
||||
|
||||
$args = func_get_args();
|
||||
call_user_func_array( array( $this, 'parent::error' ), $args );
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores a log entry.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @access public
|
||||
*
|
||||
* @param string|array|WP_Error $data Log entry data.
|
||||
*/
|
||||
public function feedback( $data ) {
|
||||
if ( is_wp_error( $data ) ) {
|
||||
foreach ( $data->get_error_codes() as $error_code ) {
|
||||
$this->errors->add( $error_code, $data->get_error_message( $error_code ), $data->get_error_data( $error_code ) );
|
||||
}
|
||||
}
|
||||
|
||||
$args = func_get_args();
|
||||
call_user_func_array( array( $this, 'parent::feedback' ), $args );
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,6 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
||||
* Prepares the list of sites for display.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @since 4.6.0 Converted to use get_sites()
|
||||
*
|
||||
* @global string $s
|
||||
* @global string $mode
|
||||
|
||||
@@ -476,6 +476,8 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
$action_links[] = '<button type="button" class="button button-disabled" disabled="disabled">' . _x( 'Active', 'plugin' ) . '</button>';
|
||||
} elseif ( current_user_can( 'activate_plugins' ) ) {
|
||||
$button_text = __( 'Activate' );
|
||||
/* translators: %s: Plugin name */
|
||||
$button_label = _x( 'Activate %s', 'plugin' );
|
||||
$activate_url = add_query_arg( array(
|
||||
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $status['file'] ),
|
||||
'action' => 'activate',
|
||||
@@ -484,14 +486,15 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
|
||||
if ( is_network_admin() ) {
|
||||
$button_text = __( 'Network Activate' );
|
||||
/* translators: %s: Plugin name */
|
||||
$button_label = _x( 'Network Activate %s', 'plugin' );
|
||||
$activate_url = add_query_arg( array( 'networkwide' => 1 ), $activate_url );
|
||||
}
|
||||
|
||||
$action_links[] = sprintf(
|
||||
'<a href="%1$s" class="button activate-now button-secondary" aria-label="%2$s">%3$s</a>',
|
||||
esc_url( $activate_url ),
|
||||
/* translators: %s: Plugin name */
|
||||
esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin['name'] ) ),
|
||||
esc_attr( sprintf( $button_label, $plugin['name'] ) ),
|
||||
$button_text
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -600,16 +600,16 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
if ( $is_active ) {
|
||||
if ( current_user_can( 'manage_network_plugins' ) ) {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Network Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Deactivate' ) . '</a>';
|
||||
$actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Network Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Deactivate' ) . '</a>';
|
||||
}
|
||||
} else {
|
||||
if ( current_user_can( 'manage_network_plugins' ) ) {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Network Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Activate' ) . '</a>';
|
||||
$actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Network Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Activate' ) . '</a>';
|
||||
}
|
||||
if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
|
||||
$actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -623,14 +623,14 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
);
|
||||
} elseif ( $is_active ) {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Deactivate' ) . '</a>';
|
||||
$actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Deactivate' ) . '</a>';
|
||||
} else {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Activate' ) . '</a>';
|
||||
$actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Activate' ) . '</a>';
|
||||
|
||||
if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
|
||||
$actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
|
||||
}
|
||||
} // end if $is_active
|
||||
|
||||
@@ -638,7 +638,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
|
||||
if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can( 'edit_plugins' ) && is_writable( WP_PLUGIN_DIR . '/' . $plugin_file ) ) {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Edit %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Edit' ) . '</a>';
|
||||
$actions['edit'] = '<a href="plugin-editor.php?file=' . urlencode( $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Edit %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Edit' ) . '</a>';
|
||||
}
|
||||
} // end if $context
|
||||
|
||||
|
||||
@@ -939,7 +939,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
if ( ! is_post_type_hierarchical( $this->screen->post_type ) && 'excerpt' === $mode && current_user_can( 'read_post', $post->ID ) ) {
|
||||
the_excerpt();
|
||||
echo esc_html( get_the_excerpt() );
|
||||
}
|
||||
|
||||
get_inline_data( $post );
|
||||
|
||||
@@ -119,10 +119,28 @@ class WP_Press_This {
|
||||
'post_type' => 'post',
|
||||
'post_status' => 'draft',
|
||||
'post_format' => ( ! empty( $_POST['post_format'] ) ) ? sanitize_text_field( $_POST['post_format'] ) : '',
|
||||
'tax_input' => ( ! empty( $_POST['tax_input'] ) ) ? $_POST['tax_input'] : array(),
|
||||
'post_category' => ( ! empty( $_POST['post_category'] ) ) ? $_POST['post_category'] : array(),
|
||||
);
|
||||
|
||||
// Only accept categories if the user actually can assign
|
||||
$category_tax = get_taxonomy( 'category' );
|
||||
if ( current_user_can( $category_tax->cap->assign_terms ) ) {
|
||||
$post_data['post_category'] = ( ! empty( $_POST['post_category'] ) ) ? $_POST['post_category'] : array();
|
||||
}
|
||||
|
||||
// Only accept taxonomies if the user can actually assign
|
||||
if ( ! empty( $_POST['tax_input'] ) ) {
|
||||
$tax_input = $_POST['tax_input'];
|
||||
foreach ( $tax_input as $tax => $_ti ) {
|
||||
$tax_object = get_taxonomy( $tax );
|
||||
if ( ! $tax_object || ! current_user_can( $tax_object->cap->assign_terms ) ) {
|
||||
unset( $tax_input[ $tax ] );
|
||||
}
|
||||
}
|
||||
|
||||
$post_data['tax_input'] = $tax_input;
|
||||
}
|
||||
|
||||
// Toggle status to pending if user cannot actually publish
|
||||
if ( ! empty( $_POST['post_status'] ) && 'publish' === $_POST['post_status'] ) {
|
||||
if ( current_user_can( 'publish_posts' ) ) {
|
||||
$post_data['post_status'] = 'publish';
|
||||
@@ -455,7 +473,7 @@ class WP_Press_This {
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string $src Embed source URL.
|
||||
* @return string If not from a supported provider, an empty string. Otherwise, a reformattd embed URL.
|
||||
* @return string If not from a supported provider, an empty string. Otherwise, a reformatted embed URL.
|
||||
*/
|
||||
private function _limit_embed( $src ) {
|
||||
$src = $this->_limit_url( $src );
|
||||
@@ -703,7 +721,11 @@ class WP_Press_This {
|
||||
* making PT fully backward compatible with the older bookmarklet.
|
||||
*/
|
||||
if ( empty( $_POST ) && ! empty( $data['u'] ) ) {
|
||||
$data = $this->source_data_fetch_fallback( $data['u'], $data );
|
||||
if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'scan-site' ) ) {
|
||||
$data = $this->source_data_fetch_fallback( $data['u'], $data );
|
||||
} else {
|
||||
$data['errors'] = 'missing nonce';
|
||||
}
|
||||
} else {
|
||||
foreach ( array( '_images', '_embeds' ) as $type ) {
|
||||
if ( empty( $_POST[ $type ] ) ) {
|
||||
@@ -856,6 +878,12 @@ class WP_Press_This {
|
||||
public function categories_html( $post ) {
|
||||
$taxonomy = get_taxonomy( 'category' );
|
||||
|
||||
// Bail if user cannot assign terms
|
||||
if ( ! current_user_can( $taxonomy->cap->assign_terms ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only show "add" if user can edit terms
|
||||
if ( current_user_can( $taxonomy->cap->edit_terms ) ) {
|
||||
?>
|
||||
<button type="button" class="add-cat-toggle button-link" aria-expanded="false">
|
||||
@@ -1213,7 +1241,7 @@ class WP_Press_This {
|
||||
$site_data = array(
|
||||
'v' => ! empty( $data['v'] ) ? $data['v'] : '',
|
||||
'u' => ! empty( $data['u'] ) ? $data['u'] : '',
|
||||
'hasData' => ! empty( $data ),
|
||||
'hasData' => ! empty( $data ) && ! isset( $data['errors'] ),
|
||||
);
|
||||
|
||||
if ( ! empty( $images ) ) {
|
||||
@@ -1274,6 +1302,12 @@ class WP_Press_This {
|
||||
wp_enqueue_script( 'json2' );
|
||||
wp_enqueue_script( 'editor' );
|
||||
|
||||
$categories_tax = get_taxonomy( 'category' );
|
||||
$show_categories = current_user_can( $categories_tax->cap->assign_terms ) || current_user_can( $categories_tax->cap->edit_terms );
|
||||
|
||||
$tag_tax = get_taxonomy( 'post_tag' );
|
||||
$show_tags = current_user_can( $tag_tax->cap->assign_terms );
|
||||
|
||||
$supports_formats = false;
|
||||
$post_format = 0;
|
||||
|
||||
@@ -1339,8 +1373,9 @@ class WP_Press_This {
|
||||
<div id="scanbar" class="scan">
|
||||
<form method="GET">
|
||||
<label for="url-scan" class="screen-reader-text"><?php _e( 'Scan site for content' ); ?></label>
|
||||
<input type="url" name="u" id="url-scan" class="scan-url" value="" placeholder="<?php esc_attr_e( 'Enter a URL to scan' ) ?>" />
|
||||
<input type="url" name="u" id="url-scan" class="scan-url" value="<?php echo esc_attr( $site_data['u'] ) ?>" placeholder="<?php esc_attr_e( 'Enter a URL to scan' ) ?>" />
|
||||
<input type="submit" name="url-scan-submit" id="url-scan-submit" class="scan-submit" value="<?php esc_attr_e( 'Scan' ) ?>" />
|
||||
<?php wp_nonce_field( 'scan-site' ); ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1425,17 +1460,21 @@ class WP_Press_This {
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
|
||||
<button type="button" class="button-link post-option">
|
||||
<span class="dashicons dashicons-category"></span>
|
||||
<span class="post-option-title"><?php _e( 'Categories' ); ?></span>
|
||||
<span class="dashicons post-option-forward"></span>
|
||||
</button>
|
||||
<?php if ( $show_categories ) : ?>
|
||||
<button type="button" class="button-link post-option">
|
||||
<span class="dashicons dashicons-category"></span>
|
||||
<span class="post-option-title"><?php _e( 'Categories' ); ?></span>
|
||||
<span class="dashicons post-option-forward"></span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
|
||||
<button type="button" class="button-link post-option">
|
||||
<span class="dashicons dashicons-tag"></span>
|
||||
<span class="post-option-title"><?php _e( 'Tags' ); ?></span>
|
||||
<span class="dashicons post-option-forward"></span>
|
||||
</button>
|
||||
<?php if ( $show_tags ) : ?>
|
||||
<button type="button" class="button-link post-option">
|
||||
<span class="dashicons dashicons-tag"></span>
|
||||
<span class="post-option-title"><?php _e( 'Tags' ); ?></span>
|
||||
<span class="dashicons post-option-forward"></span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( $supports_formats ) : ?>
|
||||
@@ -1449,23 +1488,27 @@ class WP_Press_This {
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="setting-modal is-off-screen is-hidden">
|
||||
<button type="button" class="button-link modal-close">
|
||||
<span class="dashicons post-option-back"></span>
|
||||
<span class="setting-title" aria-hidden="true"><?php _e( 'Categories' ); ?></span>
|
||||
<span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span>
|
||||
</button>
|
||||
<?php $this->categories_html( $post ); ?>
|
||||
</div>
|
||||
<?php if ( $show_categories ) : ?>
|
||||
<div class="setting-modal is-off-screen is-hidden">
|
||||
<button type="button" class="button-link modal-close">
|
||||
<span class="dashicons post-option-back"></span>
|
||||
<span class="setting-title" aria-hidden="true"><?php _e( 'Categories' ); ?></span>
|
||||
<span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span>
|
||||
</button>
|
||||
<?php $this->categories_html( $post ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="setting-modal tags is-off-screen is-hidden">
|
||||
<button type="button" class="button-link modal-close">
|
||||
<span class="dashicons post-option-back"></span>
|
||||
<span class="setting-title" aria-hidden="true"><?php _e( 'Tags' ); ?></span>
|
||||
<span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span>
|
||||
</button>
|
||||
<?php $this->tags_html( $post ); ?>
|
||||
</div>
|
||||
<?php if ( $show_tags ) : ?>
|
||||
<div class="setting-modal tags is-off-screen is-hidden">
|
||||
<button type="button" class="button-link modal-close">
|
||||
<span class="dashicons post-option-back"></span>
|
||||
<span class="setting-title" aria-hidden="true"><?php _e( 'Tags' ); ?></span>
|
||||
<span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span>
|
||||
</button>
|
||||
<?php $this->tags_html( $post ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div><!-- .options-panel -->
|
||||
</div><!-- .wrapper -->
|
||||
|
||||
|
||||
@@ -290,7 +290,9 @@ final class WP_Screen {
|
||||
|
||||
switch ( $base ) {
|
||||
case 'post' :
|
||||
if ( isset( $_GET['post'] ) )
|
||||
if ( isset( $_GET['post'] ) && isset( $_POST['post_ID'] ) && (int) $_GET['post'] !== (int) $_POST['post_ID'] )
|
||||
wp_die( __( 'A post ID mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );
|
||||
elseif ( isset( $_GET['post'] ) )
|
||||
$post_id = (int) $_GET['post'];
|
||||
elseif ( isset( $_POST['post_ID'] ) )
|
||||
$post_id = (int) $_POST['post_ID'];
|
||||
@@ -915,7 +917,8 @@ final class WP_Screen {
|
||||
|
||||
switch ( $this->base ) {
|
||||
case 'widgets':
|
||||
$this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n";
|
||||
$nonce = wp_create_nonce( 'widgets-access' );
|
||||
$this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on&_wpnonce=' . urlencode( $nonce ) . '">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off&_wpnonce=' . urlencode( $nonce ) . '">' . __('Disable accessibility mode') . "</a></p>\n";
|
||||
break;
|
||||
case 'post' :
|
||||
$expand = '<fieldset class="editor-expand hidden"><legend>' . __( 'Additional settings' ) . '</legend><label for="editor-expand-toggle">';
|
||||
|
||||
@@ -36,3 +36,6 @@ require_once ABSPATH . 'wp-admin/includes/class-language-pack-upgrader-skin.php'
|
||||
|
||||
/** Automatic_Upgrader_Skin class */
|
||||
require_once ABSPATH . 'wp-admin/includes/class-automatic-upgrader-skin.php';
|
||||
|
||||
/** WP_Ajax_Upgrader_Skin class */
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-ajax-upgrader-skin.php';
|
||||
|
||||
@@ -39,6 +39,9 @@ require_once ABSPATH . 'wp-admin/includes/class-language-pack-upgrader-skin.php'
|
||||
/** Automatic_Upgrader_Skin class */
|
||||
require_once ABSPATH . 'wp-admin/includes/class-automatic-upgrader-skin.php';
|
||||
|
||||
/** WP_Ajax_Upgrader_Skin class */
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-ajax-upgrader-skin.php';
|
||||
|
||||
/**
|
||||
* Core class used for upgrading/installing a local set of files via
|
||||
* the Filesystem Abstraction classes from a Zip file.
|
||||
@@ -900,5 +903,5 @@ require_once ABSPATH . 'wp-admin/includes/class-core-upgrader.php';
|
||||
/** File_Upload_Upgrader class */
|
||||
require_once ABSPATH . 'wp-admin/includes/class-file-upload-upgrader.php';
|
||||
|
||||
/** WP_Automatic_Upgrader class */
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-automatic-upgrader.php';
|
||||
/** WP_Automatic_Updater class */
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-automatic-updater.php';
|
||||
|
||||
@@ -270,7 +270,7 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
|
||||
|
||||
// You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully.
|
||||
if ( isset( $file['error'] ) && ! is_numeric( $file['error'] ) && $file['error'] ) {
|
||||
return $upload_error_handler( $file, $file['error'] );
|
||||
return call_user_func_array( $upload_error_handler, array( &$file, $file['error'] ) );
|
||||
}
|
||||
|
||||
// Install user overrides. Did we mention that this voids your warranty?
|
||||
@@ -312,11 +312,11 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
|
||||
|
||||
// A correct form post will pass this test.
|
||||
if ( $test_form && ( ! isset( $_POST['action'] ) || ( $_POST['action'] != $action ) ) ) {
|
||||
return call_user_func( $upload_error_handler, $file, __( 'Invalid form submission.' ) );
|
||||
return call_user_func_array( $upload_error_handler, array( &$file, __( 'Invalid form submission.' ) ) );
|
||||
}
|
||||
// A successful upload will pass this test. It makes no sense to override this one.
|
||||
if ( isset( $file['error'] ) && $file['error'] > 0 ) {
|
||||
return call_user_func( $upload_error_handler, $file, $upload_error_strings[ $file['error'] ] );
|
||||
return call_user_func_array( $upload_error_handler, array( &$file, $upload_error_strings[ $file['error'] ] ) );
|
||||
}
|
||||
|
||||
$test_file_size = 'wp_handle_upload' === $action ? $file['size'] : filesize( $file['tmp_name'] );
|
||||
@@ -327,13 +327,13 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
|
||||
} else {
|
||||
$error_msg = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' );
|
||||
}
|
||||
return call_user_func( $upload_error_handler, $file, $error_msg );
|
||||
return call_user_func_array( $upload_error_handler, array( &$file, $error_msg ) );
|
||||
}
|
||||
|
||||
// A properly uploaded file will pass this test. There should be no reason to override this one.
|
||||
$test_uploaded_file = 'wp_handle_upload' === $action ? @ is_uploaded_file( $file['tmp_name'] ) : @ is_file( $file['tmp_name'] );
|
||||
if ( ! $test_uploaded_file ) {
|
||||
return call_user_func( $upload_error_handler, $file, __( 'Specified file failed upload test.' ) );
|
||||
return call_user_func_array( $upload_error_handler, array( &$file, __( 'Specified file failed upload test.' ) ) );
|
||||
}
|
||||
|
||||
// A correct MIME type will pass this test. Override $mimes or use the upload_mimes filter.
|
||||
@@ -348,7 +348,7 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
|
||||
$file['name'] = $proper_filename;
|
||||
}
|
||||
if ( ( ! $type || !$ext ) && ! current_user_can( 'unfiltered_upload' ) ) {
|
||||
return call_user_func( $upload_error_handler, $file, __( 'Sorry, this file type is not permitted for security reasons.' ) );
|
||||
return call_user_func_array( $upload_error_handler, array( &$file, __( 'Sorry, this file type is not permitted for security reasons.' ) ) );
|
||||
}
|
||||
if ( ! $type ) {
|
||||
$type = $file['type'];
|
||||
@@ -362,7 +362,7 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
|
||||
* overriding this one.
|
||||
*/
|
||||
if ( ! ( ( $uploads = wp_upload_dir( $time ) ) && false === $uploads['error'] ) ) {
|
||||
return call_user_func( $upload_error_handler, $file, $uploads['error'] );
|
||||
return call_user_func_array( $upload_error_handler, array( &$file, $uploads['error'] ) );
|
||||
}
|
||||
|
||||
$filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );
|
||||
@@ -646,6 +646,10 @@ function _unzip_file_ziparchive($file, $to, $needed_dirs = array() ) {
|
||||
if ( '__MACOSX/' === substr($info['name'], 0, 9) ) // Skip the OS X-created __MACOSX directory
|
||||
continue;
|
||||
|
||||
if ( 0 !== validate_file( $info['name'] ) ) {
|
||||
return new WP_Error( 'invalid_file_ziparchive', __( 'Could not extract file from archive.' ), $info['name'] );
|
||||
}
|
||||
|
||||
$uncompressed_size += $info['size'];
|
||||
|
||||
if ( '/' === substr( $info['name'], -1 ) ) {
|
||||
@@ -806,6 +810,10 @@ function _unzip_file_pclzip($file, $to, $needed_dirs = array()) {
|
||||
if ( '__MACOSX/' === substr($file['filename'], 0, 9) ) // Don't extract the OS X-created __MACOSX directory files
|
||||
continue;
|
||||
|
||||
if ( 0 !== validate_file( $file['filename'] ) ) {
|
||||
return new WP_Error( 'invalid_file_pclzip', __( 'Could not extract file from archive.' ), $file['filename'] );
|
||||
}
|
||||
|
||||
if ( ! $wp_filesystem->put_contents( $to . $file['filename'], $file['content'], FS_CHMOD_FILE) )
|
||||
return new WP_Error( 'copy_failed_pclzip', __( 'Could not copy file.' ), $file['filename'] );
|
||||
}
|
||||
@@ -1090,14 +1098,28 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false,
|
||||
|
||||
$credentials = get_option('ftp_credentials', array( 'hostname' => '', 'username' => ''));
|
||||
|
||||
$submitted_form = wp_unslash( $_POST );
|
||||
|
||||
// Verify nonce, or unset submitted form field values on failure
|
||||
if ( ! isset( $_POST['_fs_nonce'] ) || ! wp_verify_nonce( $_POST['_fs_nonce'], 'filesystem-credentials' ) ) {
|
||||
unset(
|
||||
$submitted_form['hostname'],
|
||||
$submitted_form['username'],
|
||||
$submitted_form['password'],
|
||||
$submitted_form['public_key'],
|
||||
$submitted_form['private_key'],
|
||||
$submitted_form['connection_type']
|
||||
);
|
||||
}
|
||||
|
||||
// If defined, set it to that, Else, If POST'd, set it to that, If not, Set it to whatever it previously was(saved details in option)
|
||||
$credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? wp_unslash( $_POST['hostname'] ) : $credentials['hostname']);
|
||||
$credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? wp_unslash( $_POST['username'] ) : $credentials['username']);
|
||||
$credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? wp_unslash( $_POST['password'] ) : '');
|
||||
$credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($submitted_form['hostname']) ? $submitted_form['hostname'] : $credentials['hostname']);
|
||||
$credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($submitted_form['username']) ? $submitted_form['username'] : $credentials['username']);
|
||||
$credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($submitted_form['password']) ? $submitted_form['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']) ? wp_unslash( $_POST['public_key'] ) : '');
|
||||
$credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? wp_unslash( $_POST['private_key'] ) : '');
|
||||
$credentials['public_key'] = defined('FTP_PUBKEY') ? FTP_PUBKEY : (!empty($submitted_form['public_key']) ? $submitted_form['public_key'] : '');
|
||||
$credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($submitted_form['private_key']) ? $submitted_form['private_key'] : '');
|
||||
|
||||
// Sanitize the hostname, Some people might pass in odd-data:
|
||||
$credentials['hostname'] = preg_replace('|\w+://|', '', $credentials['hostname']); //Strip any schemes off
|
||||
@@ -1114,8 +1136,8 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false,
|
||||
$credentials['connection_type'] = 'ssh';
|
||||
} elseif ( ( defined( 'FTP_SSL' ) && FTP_SSL ) && 'ftpext' == $type ) { //Only the FTP Extension understands SSL
|
||||
$credentials['connection_type'] = 'ftps';
|
||||
} elseif ( ! empty( $_POST['connection_type'] ) ) {
|
||||
$credentials['connection_type'] = wp_unslash( $_POST['connection_type'] );
|
||||
} elseif ( ! empty( $submitted_form['connection_type'] ) ) {
|
||||
$credentials['connection_type'] = $submitted_form['connection_type'];
|
||||
} elseif ( ! isset( $credentials['connection_type'] ) ) { //All else fails (And it's not defaulted to something else saved), Default to FTP
|
||||
$credentials['connection_type'] = 'ftp';
|
||||
}
|
||||
@@ -1254,11 +1276,12 @@ if ( isset( $types['ssh'] ) ) {
|
||||
}
|
||||
|
||||
foreach ( (array) $extra_fields as $field ) {
|
||||
if ( isset( $_POST[ $field ] ) )
|
||||
echo '<input type="hidden" name="' . esc_attr( $field ) . '" value="' . esc_attr( wp_unslash( $_POST[ $field ] ) ) . '" />';
|
||||
if ( isset( $submitted_form[ $field ] ) )
|
||||
echo '<input type="hidden" name="' . esc_attr( $field ) . '" value="' . esc_attr( $submitted_form[ $field ] ) . '" />';
|
||||
}
|
||||
?>
|
||||
<p class="request-filesystem-credentials-action-buttons">
|
||||
<?php wp_nonce_field( 'filesystem-credentials', '_fs_nonce', false, true ); ?>
|
||||
<button class="button cancel-button" data-js-action="close" type="button"><?php _e( 'Cancel' ); ?></button>
|
||||
<?php submit_button( __( 'Proceed' ), 'button', 'upgrade', false ); ?>
|
||||
</p>
|
||||
|
||||
@@ -290,7 +290,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override
|
||||
$url = $file['url'];
|
||||
$type = $file['type'];
|
||||
$file = $file['file'];
|
||||
$title = $name;
|
||||
$title = sanitize_text_field( $name );
|
||||
$content = '';
|
||||
$excerpt = '';
|
||||
|
||||
@@ -464,7 +464,7 @@ wp_enqueue_style( 'ie' );
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
|
||||
var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
|
||||
isRtl = <?php echo (int) is_rtl(); ?>;
|
||||
</script>
|
||||
<?php
|
||||
@@ -2807,8 +2807,11 @@ function edit_form_image_editor( $post ) {
|
||||
<label for="attachment_content"><strong><?php _e( 'Description' ); ?></strong><?php
|
||||
if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ) {
|
||||
echo ': ' . __( 'Displayed on attachment pages.' );
|
||||
} ?></label>
|
||||
<?php wp_editor( $post->post_content, 'attachment_content', $editor_args ); ?>
|
||||
}
|
||||
|
||||
?>
|
||||
</label>
|
||||
<?php wp_editor( format_to_edit( $post->post_content ), 'attachment_content', $editor_args ); ?>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
@@ -2964,7 +2967,7 @@ function wp_add_id3_tag_data( &$metadata, $data ) {
|
||||
if ( ! empty( $data[$version]['comments'] ) ) {
|
||||
foreach ( $data[$version]['comments'] as $key => $list ) {
|
||||
if ( 'length' !== $key && ! empty( $list ) ) {
|
||||
$metadata[$key] = reset( $list );
|
||||
$metadata[$key] = wp_kses_post( reset( $list ) );
|
||||
// Fix bug in byte stream analysis.
|
||||
if ( 'terms_of_use' === $key && 0 === strpos( $metadata[$key], 'yright notice.' ) )
|
||||
$metadata[$key] = 'Cop' . $metadata[$key];
|
||||
|
||||
@@ -436,24 +436,48 @@ function set_screen_options() {
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
$screen_option = false;
|
||||
|
||||
if ( '_page' === substr( $option, -5 ) || 'layout_columns' === $option ) {
|
||||
/**
|
||||
* Filters a screen option value before it is set.
|
||||
*
|
||||
* The filter can also be used to modify non-standard [items]_per_page
|
||||
* settings. See the parent function for a full list of standard options.
|
||||
*
|
||||
* Returning false to the filter will skip saving the current option.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @since 5.4.2 Only applied to options ending with '_page',
|
||||
* or the 'layout_columns' option.
|
||||
*
|
||||
* @see set_screen_options()
|
||||
*
|
||||
* @param mixed $screen_option The value to save instead of the option value.
|
||||
* Default false (to skip saving the current option).
|
||||
* @param string $option The option name.
|
||||
* @param int $value The option value.
|
||||
*/
|
||||
$screen_option = apply_filters( 'set-screen-option', $screen_option, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters a screen option value before it is set.
|
||||
*
|
||||
* The filter can also be used to modify non-standard [items]_per_page
|
||||
* settings. See the parent function for a full list of standard options.
|
||||
* The dynamic portion of the hook, `$option`, refers to the option name.
|
||||
*
|
||||
* Returning false to the filter will skip saving the current option.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @since 5.4.2
|
||||
*
|
||||
* @see set_screen_options()
|
||||
*
|
||||
* @param bool|int $value Screen option value. Default false to skip.
|
||||
* @param string $option The option name.
|
||||
* @param int $value The number of rows to use.
|
||||
* @param mixed $screen_option The value to save instead of the option value.
|
||||
* Default false (to skip saving the current option).
|
||||
* @param string $option The option name.
|
||||
* @param int $value The option value.
|
||||
*/
|
||||
$value = apply_filters( 'set-screen-option', false, $option, $value );
|
||||
$value = apply_filters( "set_screen_option_{$option}", $screen_option, $option, $value );
|
||||
|
||||
if ( false === $value )
|
||||
return;
|
||||
|
||||
@@ -893,7 +893,7 @@ function can_edit_network( $site_id ) {
|
||||
function _thickbox_path_admin_subfolder() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var tb_pathToImage = "<?php echo includes_url( 'js/thickbox/loadingAnimation.gif', 'relative' ); ?>";
|
||||
var tb_pathToImage = "<?php echo esc_js( includes_url( 'js/thickbox/loadingAnimation.gif', 'relative' ) ); ?>";
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -175,6 +175,27 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
|
||||
return $post_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns only allowed post data fields
|
||||
*
|
||||
* @since 4.9.9
|
||||
*
|
||||
* @param array $post_data Array of post data. Defaults to the contents of $_POST.
|
||||
* @return object|bool WP_Error on failure, true on success.
|
||||
*/
|
||||
function _wp_get_allowed_postdata( $post_data = null ) {
|
||||
if ( empty( $post_data ) ) {
|
||||
$post_data = $_POST;
|
||||
}
|
||||
|
||||
// Pass through errors
|
||||
if ( is_wp_error( $post_data ) ) {
|
||||
return $post_data;
|
||||
}
|
||||
|
||||
return array_diff_key( $post_data, array_flip( array( 'meta_input', 'file', 'guid' ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing post with values provided in $_POST.
|
||||
*
|
||||
@@ -243,6 +264,7 @@ function edit_post( $post_data = null ) {
|
||||
$post_data = _wp_translate_postdata( true, $post_data );
|
||||
if ( is_wp_error($post_data) )
|
||||
wp_die( $post_data->get_error_message() );
|
||||
$translated = _wp_get_allowed_postdata( $post_data );
|
||||
|
||||
// Post Formats
|
||||
if ( isset( $post_data['post_format'] ) )
|
||||
@@ -320,7 +342,7 @@ function edit_post( $post_data = null ) {
|
||||
$attachment_data = isset( $post_data['attachments'][ $post_ID ] ) ? $post_data['attachments'][ $post_ID ] : array();
|
||||
|
||||
/** This filter is documented in wp-admin/includes/media.php */
|
||||
$post_data = apply_filters( 'attachment_fields_to_save', $post_data, $attachment_data );
|
||||
$translated = apply_filters( 'attachment_fields_to_save', $translated, $attachment_data );
|
||||
}
|
||||
|
||||
// Convert taxonomy input to term IDs, to avoid ambiguity.
|
||||
@@ -365,7 +387,7 @@ function edit_post( $post_data = null ) {
|
||||
}
|
||||
}
|
||||
|
||||
$post_data['tax_input'][ $taxonomy ] = $clean_terms;
|
||||
$translated['tax_input'][ $taxonomy ] = $clean_terms;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,18 +395,18 @@ function edit_post( $post_data = null ) {
|
||||
|
||||
update_post_meta( $post_ID, '_edit_last', get_current_user_id() );
|
||||
|
||||
$success = wp_update_post( $post_data );
|
||||
$success = wp_update_post( $translated );
|
||||
// If the save failed, see if we can sanity check the main fields and try again
|
||||
if ( ! $success && is_callable( array( $wpdb, 'strip_invalid_text_for_column' ) ) ) {
|
||||
$fields = array( 'post_title', 'post_content', 'post_excerpt' );
|
||||
|
||||
foreach ( $fields as $field ) {
|
||||
if ( isset( $post_data[ $field ] ) ) {
|
||||
$post_data[ $field ] = $wpdb->strip_invalid_text_for_column( $wpdb->posts, $field, $post_data[ $field ] );
|
||||
if ( isset( $translated[ $field ] ) ) {
|
||||
$translated[ $field ] = $wpdb->strip_invalid_text_for_column( $wpdb->posts, $field, $translated[ $field ] );
|
||||
}
|
||||
}
|
||||
|
||||
wp_update_post( $post_data );
|
||||
wp_update_post( $translated );
|
||||
}
|
||||
|
||||
// Now that we have an ID we can fix any attachment anchor hrefs
|
||||
@@ -544,9 +566,9 @@ function bulk_edit_posts( $post_data = null ) {
|
||||
unset( $post_data['tax_input']['category'] );
|
||||
}
|
||||
|
||||
$post_data['post_ID'] = $post_ID;
|
||||
$post_data['post_type'] = $post->post_type;
|
||||
$post_data['post_mime_type'] = $post->post_mime_type;
|
||||
$post_data['guid'] = $post->guid;
|
||||
|
||||
foreach ( array( 'comment_status', 'ping_status', 'post_author' ) as $field ) {
|
||||
if ( ! isset( $post_data[ $field ] ) ) {
|
||||
@@ -554,14 +576,12 @@ function bulk_edit_posts( $post_data = null ) {
|
||||
}
|
||||
}
|
||||
|
||||
$post_data['ID'] = $post_ID;
|
||||
$post_data['post_ID'] = $post_ID;
|
||||
|
||||
$post_data = _wp_translate_postdata( true, $post_data );
|
||||
if ( is_wp_error( $post_data ) ) {
|
||||
$skipped[] = $post_ID;
|
||||
continue;
|
||||
}
|
||||
$post_data = _wp_get_allowed_postdata( $post_data );
|
||||
|
||||
$updated[] = wp_update_post( $post_data );
|
||||
|
||||
@@ -572,8 +592,8 @@ function bulk_edit_posts( $post_data = null ) {
|
||||
unstick_post( $post_ID );
|
||||
}
|
||||
|
||||
if ( isset( $post_data['post_format'] ) )
|
||||
set_post_format( $post_ID, $post_data['post_format'] );
|
||||
if ( isset( $shared_post_data['post_format'] ) )
|
||||
set_post_format( $post_ID, $shared_post_data['post_format'] );
|
||||
}
|
||||
|
||||
return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked );
|
||||
@@ -754,9 +774,10 @@ function wp_write_post() {
|
||||
$translated = _wp_translate_postdata( false );
|
||||
if ( is_wp_error($translated) )
|
||||
return $translated;
|
||||
$translated = _wp_get_allowed_postdata( $translated );
|
||||
|
||||
// Create the post.
|
||||
$post_ID = wp_insert_post( $_POST );
|
||||
$post_ID = wp_insert_post( $translated );
|
||||
if ( is_wp_error( $post_ID ) )
|
||||
return $post_ID;
|
||||
|
||||
@@ -1659,6 +1680,7 @@ function wp_create_post_autosave( $post_data ) {
|
||||
$post_data = _wp_translate_postdata( true, $post_data );
|
||||
if ( is_wp_error( $post_data ) )
|
||||
return $post_data;
|
||||
$post_data = _wp_get_allowed_postdata( $post_data );
|
||||
|
||||
$post_author = get_current_user_id();
|
||||
|
||||
|
||||
@@ -769,7 +769,7 @@ function page_template_dropdown( $default = '' ) {
|
||||
ksort( $templates );
|
||||
foreach ( array_keys( $templates ) as $template ) {
|
||||
$selected = selected( $default, $templates[ $template ], false );
|
||||
echo "\n\t<option value='" . $templates[ $template ] . "' $selected>$template</option>";
|
||||
echo "\n\t<option value='" . esc_attr( $templates[ $template ] ) . "' $selected>" . esc_html( $template ) . "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1030,7 +1030,7 @@ function do_meta_boxes( $screen, $context, $object ) {
|
||||
$widget_title = $box[ 'title' ];
|
||||
|
||||
if ( is_array( $box[ 'args' ] ) && isset( $box[ 'args' ][ '__widget_basename' ] ) ) {
|
||||
$widget_title = esc_html( $box[ 'args' ][ '__widget_basename' ] );
|
||||
$widget_title = $box[ 'args' ][ '__widget_basename' ];
|
||||
// Do not pass this parameter to the user callback function.
|
||||
unset( $box[ 'args' ][ '__widget_basename' ] );
|
||||
}
|
||||
@@ -1592,12 +1592,12 @@ wp_enqueue_style( 'colors' );
|
||||
<script type="text/javascript">
|
||||
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||
function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
|
||||
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
|
||||
pagenow = '<?php echo $current_screen->id; ?>',
|
||||
typenow = '<?php echo $current_screen->post_type; ?>',
|
||||
adminpage = '<?php echo $admin_body_class; ?>',
|
||||
thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
|
||||
decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
|
||||
var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>',
|
||||
pagenow = '<?php echo esc_js( $current_screen->id ); ?>',
|
||||
typenow = '<?php echo esc_js( $current_screen->post_type ); ?>',
|
||||
adminpage = '<?php echo esc_js( $admin_body_class ); ?>',
|
||||
thousandsSeparator = '<?php echo esc_js( $wp_locale->number_format['thousands_sep'] ); ?>',
|
||||
decimalPoint = '<?php echo esc_js( $wp_locale->number_format['decimal_point'] ); ?>',
|
||||
isRtl = <?php echo (int) is_rtl(); ?>;
|
||||
</script>
|
||||
<?php
|
||||
|
||||
@@ -703,6 +703,11 @@ $_old_files = array(
|
||||
'wp-includes/js/tinymce/plugins/wpfullscreen',
|
||||
// 4.5
|
||||
'wp-includes/theme-compat/comments-popup.php',
|
||||
// 4.6
|
||||
'wp-admin/includes/class-wp-automatic-upgrader.php', // Wrong file name, see #37628.
|
||||
// 4.9.2
|
||||
'wp-includes/js/mediaelement/flashmediaelement.swf',
|
||||
'wp-includes/js/mediaelement/silverlightmediaelement.xap',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -1079,7 +1084,11 @@ function update_core($from, $to) {
|
||||
$old_file = $to . $old_file;
|
||||
if ( !$wp_filesystem->exists($old_file) )
|
||||
continue;
|
||||
$wp_filesystem->delete($old_file, true);
|
||||
|
||||
// If the file isn't deleted, try writing an empty string to the file instead.
|
||||
if ( ! $wp_filesystem->delete( $old_file, true ) && $wp_filesystem->is_file( $old_file ) ) {
|
||||
$wp_filesystem->put_contents( $old_file, '' );
|
||||
}
|
||||
}
|
||||
|
||||
// Remove any Genericons example.html's from the filesystem
|
||||
|
||||
@@ -634,7 +634,7 @@ function wp_print_admin_notice_templates() {
|
||||
<div <# if ( data.id ) { #>id="{{ data.id }}"<# } #> class="notice {{ data.className }}"><p>{{{ data.message }}}</p></div>
|
||||
</script>
|
||||
<script id="tmpl-wp-bulk-updates-admin-notice" type="text/html">
|
||||
<div id="{{ data.id }}" class="notice <# if ( data.errors ) { #>notice-error<# } else { #>notice-success<# } #>">
|
||||
<div id="{{ data.id }}" class="{{ data.className }} notice <# if ( data.errors ) { #>notice-error<# } else { #>notice-success<# } #>">
|
||||
<p>
|
||||
<# if ( data.successes ) { #>
|
||||
<# if ( 1 === data.successes ) { #>
|
||||
@@ -664,25 +664,25 @@ function wp_print_admin_notice_templates() {
|
||||
<# } #>
|
||||
<# } #>
|
||||
<# if ( data.errors ) { #>
|
||||
<# if ( 1 === data.errors ) { #>
|
||||
<button class="button-link">
|
||||
<button class="button-link bulk-action-errors-collapsed" aria-expanded="false">
|
||||
<# if ( 1 === data.errors ) { #>
|
||||
<?php
|
||||
/* translators: %s: Number of failures */
|
||||
printf( __( '%s failure.' ), '{{ data.errors }}' );
|
||||
/* translators: %s: Number of failed updates */
|
||||
printf( __( '%s update failed.' ), '{{ data.errors }}' );
|
||||
?>
|
||||
</button>
|
||||
<# } else { #>
|
||||
<button class="button-link">
|
||||
<# } else { #>
|
||||
<?php
|
||||
/* translators: %s: Number of failures */
|
||||
printf( __( '%s failures.' ), '{{ data.errors }}' );
|
||||
/* translators: %s: Number of failed updates */
|
||||
printf( __( '%s updates failed.' ), '{{ data.errors }}' );
|
||||
?>
|
||||
</button>
|
||||
<# } #>
|
||||
<# } #>
|
||||
<span class="screen-reader-text"><?php _e( 'Show more details' ); ?></span>
|
||||
<span class="toggle-indicator" aria-hidden="true"></span>
|
||||
</button>
|
||||
<# } #>
|
||||
</p>
|
||||
<# if ( data.errors ) { #>
|
||||
<ul class="hidden">
|
||||
<ul class="bulk-action-errors hidden">
|
||||
<# _.each( data.errorMessages, function( errorMessage ) { #>
|
||||
<li>{{ errorMessage }}</li>
|
||||
<# } ); #>
|
||||
|
||||
2
wp-admin/js/common.min.js
vendored
2
wp-admin/js/common.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -56,11 +56,13 @@
|
||||
frame.on( 'select', function() {
|
||||
// Grab the selected attachment.
|
||||
var attachment = frame.state().get('selection').first();
|
||||
var nonceValue = $( '#_wpnonce' ).val() || '';
|
||||
|
||||
// Run an AJAX request to set the background image.
|
||||
$.post( ajaxurl, {
|
||||
action: 'set-background-image',
|
||||
attachment_id: attachment.id,
|
||||
_ajax_nonce: nonceValue,
|
||||
size: 'full'
|
||||
}).done( function() {
|
||||
// When the request completes, reload the window.
|
||||
|
||||
2
wp-admin/js/custom-background.min.js
vendored
2
wp-admin/js/custom-background.min.js
vendored
@@ -1 +1 @@
|
||||
!function(a){a(document).ready(function(){var b,c=a("#custom-background-image");a("#background-color").wpColorPicker({change:function(a,b){c.css("background-color",b.color.toString())},clear:function(){c.css("background-color","")}}),a('input[name="background-position-x"]').change(function(){c.css("background-position",a(this).val()+" top")}),a('input[name="background-repeat"]').change(function(){c.css("background-repeat",a(this).val())}),a("#choose-from-library-link").click(function(c){var d=a(this);return c.preventDefault(),b?void b.open():(b=wp.media.frames.customBackground=wp.media({title:d.data("choose"),library:{type:"image"},button:{text:d.data("update"),close:!1}}),b.on("select",function(){var c=b.state().get("selection").first();a.post(ajaxurl,{action:"set-background-image",attachment_id:c.id,size:"full"}).done(function(){window.location.reload()})}),void b.open())})})}(jQuery);
|
||||
!function(a){a(document).ready(function(){var b,c=a("#custom-background-image");a("#background-color").wpColorPicker({change:function(a,b){c.css("background-color",b.color.toString())},clear:function(){c.css("background-color","")}}),a('input[name="background-position-x"]').change(function(){c.css("background-position",a(this).val()+" top")}),a('input[name="background-repeat"]').change(function(){c.css("background-repeat",a(this).val())}),a("#choose-from-library-link").click(function(c){var d=a(this);return c.preventDefault(),b?void b.open():(b=wp.media.frames.customBackground=wp.media({title:d.data("choose"),library:{type:"image"},button:{text:d.data("update"),close:!1}}),b.on("select",function(){var c=b.state().get("selection").first(),d=a("#_wpnonce").val()||"";a.post(ajaxurl,{action:"set-background-image",attachment_id:c.id,_ajax_nonce:d,size:"full"}).done(function(){window.location.reload()})}),void b.open())})})}(jQuery);
|
||||
@@ -3796,6 +3796,16 @@
|
||||
}
|
||||
});
|
||||
|
||||
// Ensure preview nonce is included with every customized request, to allow post data to be read.
|
||||
$.ajaxPrefilter( function injectPreviewNonce( options ) {
|
||||
if ( ! /wp_customize=on/.test( options.data ) ) {
|
||||
return;
|
||||
}
|
||||
options.data += '&' + $.param({
|
||||
customize_preview_nonce: api.settings.nonce.preview
|
||||
});
|
||||
});
|
||||
|
||||
// Refresh the nonces if the preview sends updated nonces over.
|
||||
api.previewer.bind( 'nonce', function( nonce ) {
|
||||
$.extend( this.nonce, nonce );
|
||||
|
||||
4
wp-admin/js/customize-controls.min.js
vendored
4
wp-admin/js/customize-controls.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/js/customize-nav-menus.min.js
vendored
2
wp-admin/js/customize-nav-menus.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/js/customize-widgets.min.js
vendored
2
wp-admin/js/customize-widgets.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/js/dashboard.min.js
vendored
2
wp-admin/js/dashboard.min.js
vendored
@@ -1 +1 @@
|
||||
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){function b(){if(!(document.documentMode&&document.documentMode<9)){a("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>');var b=a(".quick-draft-textarea-clone"),c=a("#content"),d=c.height(),e=a(window).height()-100;b.css({"font-family":c.css("font-family"),"font-size":c.css("font-size"),"line-height":c.css("line-height"),"padding-bottom":c.css("paddingBottom"),"padding-left":c.css("paddingLeft"),"padding-right":c.css("paddingRight"),"padding-top":c.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),c.on("focus input propertychange",function(){var f=a(this),g=f.val()+" ",h=b.css("width",f.css("width")).text(g).outerHeight()+2;c.css("overflow-y","auto"),h===d||h>=e&&d>=e||(d=h>e?e:h,c.css("overflow","hidden"),f.css("height",d+"px"))})}}var c,d=a("#welcome-panel"),e=a("#wp_welcome_panel-hide");c=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})},d.hasClass("hidden")&&e.prop("checked")&&d.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(b){b.preventDefault(),d.addClass("hidden"),c(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){d.toggleClass("hidden",!this.checked),c(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c+"&pagenow="+pagenow,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),-1!==a.inArray(b,ajaxWidgets)&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var c,d=a("#quickpost-action");a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),c=a("#quick-press").submit(function(b){function d(){var b=a(".drafts ul li").first();b.css("background","#fffbe5"),setTimeout(function(){b.css("background","none")},1e3)}b.preventDefault(),a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),a.post(c.attr("action"),c.serializeArray(),function(b){a("#dashboard_quick_press .inside").html(b),a("#quick-press").removeClass("initial-form"),quickPressLoad(),d(),a("#title").focus()})}),a("#publish").click(function(){d.val("post-quickpress-publish")}),a("#title, #tags-input, #content").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),b()},quickPressLoad(),a(".meta-box-sortables").sortable("option","containment","#wpwrap")});
|
||||
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(a){function b(){if(!(document.documentMode&&document.documentMode<9)){a("body").append('<div class="quick-draft-textarea-clone" style="display: none;"></div>');var b=a(".quick-draft-textarea-clone"),c=a("#content"),d=c.height(),e=a(window).height()-100;b.css({"font-family":c.css("font-family"),"font-size":c.css("font-size"),"line-height":c.css("line-height"),"padding-bottom":c.css("paddingBottom"),"padding-left":c.css("paddingLeft"),"padding-right":c.css("paddingRight"),"padding-top":c.css("paddingTop"),"white-space":"pre-wrap","word-wrap":"break-word",display:"none"}),c.on("focus input propertychange",function(){var f=a(this),g=f.val()+" ",h=b.css("width",f.css("width")).text(g).outerHeight()+2;c.css("overflow-y","auto"),h===d||h>=e&&d>=e||(d=h>e?e:h,c.css("overflow","hidden"),f.css("height",d+"px"))})}}var c,d=a("#welcome-panel"),e=a("#wp_welcome_panel-hide");c=function(b){a.post(ajaxurl,{action:"update-welcome-panel",visible:b,welcomepanelnonce:a("#welcomepanelnonce").val()})},d.hasClass("hidden")&&e.prop("checked")&&d.removeClass("hidden"),a(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(b){b.preventDefault(),d.addClass("hidden"),c(0),a("#wp_welcome_panel-hide").prop("checked",!1)}),e.click(function(){d.toggleClass("hidden",!this.checked),c(this.checked?1:0)}),ajaxWidgets=["dashboard_primary"],ajaxPopulateWidgets=function(b){function c(b,c){var d,e=a("#"+c+" div.inside:visible").find(".widget-loading");e.length&&(d=e.parent(),setTimeout(function(){d.load(ajaxurl+"?action=dashboard-widgets&widget="+c+"&pagenow="+pagenow,"",function(){d.hide().slideDown("normal",function(){a(this).css("display","")})})},500*b))}b?(b=b.toString(),a.inArray(b,ajaxWidgets)!==-1&&c(0,b)):a.each(ajaxWidgets,c)},ajaxPopulateWidgets(),postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets}),quickPressLoad=function(){var c,d=a("#quickpost-action");a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!1),c=a("#quick-press").submit(function(b){function d(){var b=a(".drafts ul li").first();b.css("background","#fffbe5"),setTimeout(function(){b.css("background","none")},1e3)}b.preventDefault(),a("#dashboard_quick_press #publishing-action .spinner").show(),a('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",!0),a.post(c.attr("action"),c.serializeArray(),function(b){a("#dashboard_quick_press .inside").html(b),a("#quick-press").removeClass("initial-form"),quickPressLoad(),d(),a("#title").focus()})}),a("#publish").click(function(){d.val("post-quickpress-publish")}),a("#title, #tags-input, #content").each(function(){var b=a(this),c=a("#"+this.id+"-prompt-text");""===this.value&&c.removeClass("screen-reader-text"),c.click(function(){a(this).addClass("screen-reader-text"),b.focus()}),b.blur(function(){""===this.value&&c.removeClass("screen-reader-text")}),b.focus(function(){c.addClass("screen-reader-text")})}),a("#quick-press").on("click focusin",function(){wpActiveEditor="content"}),b()},quickPressLoad(),a(".meta-box-sortables").sortable("option","containment","#wpwrap")});
|
||||
2
wp-admin/js/edit-comments.min.js
vendored
2
wp-admin/js/edit-comments.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -53,6 +53,47 @@
|
||||
sideSortablesHeight: 0
|
||||
};
|
||||
|
||||
var shrinkTextarea = window._.throttle( function() {
|
||||
var x = window.scrollX || document.documentElement.scrollLeft;
|
||||
var y = window.scrollY || document.documentElement.scrollTop;
|
||||
var height = parseInt( textEditor.style.height, 10 );
|
||||
|
||||
textEditor.style.height = autoresizeMinHeight + 'px';
|
||||
|
||||
if ( textEditor.scrollHeight > autoresizeMinHeight ) {
|
||||
textEditor.style.height = textEditor.scrollHeight + 'px';
|
||||
}
|
||||
|
||||
if ( typeof x !== 'undefined' ) {
|
||||
window.scrollTo( x, y );
|
||||
}
|
||||
|
||||
if ( textEditor.scrollHeight < height ) {
|
||||
adjust();
|
||||
}
|
||||
}, 300 );
|
||||
|
||||
function textEditorResize() {
|
||||
var length = textEditor.value.length;
|
||||
|
||||
if ( mceEditor && ! mceEditor.isHidden() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! mceEditor && initialMode === 'tinymce' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( length < oldTextLength ) {
|
||||
shrinkTextarea();
|
||||
} else if ( parseInt( textEditor.style.height, 10 ) < textEditor.scrollHeight ) {
|
||||
textEditor.style.height = Math.ceil( textEditor.scrollHeight ) + 'px';
|
||||
adjust();
|
||||
}
|
||||
|
||||
oldTextLength = length;
|
||||
}
|
||||
|
||||
function getHeights() {
|
||||
var windowWidth = $window.width();
|
||||
|
||||
@@ -75,43 +116,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function textEditorResize() {
|
||||
if ( mceEditor && ! mceEditor.isHidden() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! mceEditor && initialMode === 'tinymce' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var length = textEditor.value.length;
|
||||
var height = parseInt( textEditor.style.height, 10 );
|
||||
var top = window.scrollTop;
|
||||
|
||||
if ( length < oldTextLength ) {
|
||||
// textEditor.scrollHeight is not adjusted until the next line.
|
||||
textEditor.style.height = 'auto';
|
||||
|
||||
if ( textEditor.scrollHeight > autoresizeMinHeight ) {
|
||||
textEditor.style.height = textEditor.scrollHeight + 'px';
|
||||
} else {
|
||||
textEditor.style.height = autoresizeMinHeight + 'px';
|
||||
}
|
||||
|
||||
// Prevent scroll-jumping in Firefox and IE.
|
||||
window.scrollTop = top;
|
||||
|
||||
if ( textEditor.scrollHeight < height ) {
|
||||
adjust();
|
||||
}
|
||||
} else if ( height < textEditor.scrollHeight ) {
|
||||
textEditor.style.height = textEditor.scrollHeight + 'px';
|
||||
adjust();
|
||||
}
|
||||
|
||||
oldTextLength = length;
|
||||
}
|
||||
|
||||
// We need to wait for TinyMCE to initialize.
|
||||
$document.on( 'tinymce-editor-init.editor-expand', function( event, editor ) {
|
||||
var VK = window.tinymce.util.VK,
|
||||
|
||||
2
wp-admin/js/editor-expand.min.js
vendored
2
wp-admin/js/editor-expand.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/js/editor.min.js
vendored
2
wp-admin/js/editor.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/js/image-edit.min.js
vendored
2
wp-admin/js/image-edit.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/js/inline-edit-post.min.js
vendored
2
wp-admin/js/inline-edit-post.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/js/inline-edit-tax.min.js
vendored
2
wp-admin/js/inline-edit-tax.min.js
vendored
@@ -1 +1 @@
|
||||
window.wp=window.wp||{};var inlineEditTax;!function(a,b){inlineEditTax={init:function(){var b=this,c=a("#inline-edit");b.type=a("#the-list").attr("data-wp-lists").substr(5),b.what="#"+b.type+"-",a("#the-list").on("click","a.editinline",function(){return inlineEditTax.edit(this),!1}),c.keyup(function(a){return 27===a.which?inlineEditTax.revert():void 0}),a(".cancel",c).click(function(){return inlineEditTax.revert()}),a(".save",c).click(function(){return inlineEditTax.save(this)}),a("input, select",c).keydown(function(a){return 13===a.which?inlineEditTax.save(this):void 0}),a('#posts-filter input[type="submit"]').mousedown(function(){b.revert()})},toggle:function(b){var c=this;"none"===a(c.what+c.getId(b)).css("display")?c.revert():c.edit(b)},edit:function(b){var c,d,e,f=this;return f.revert(),"object"==typeof b&&(b=f.getId(b)),c=a("#inline-edit").clone(!0),d=a("#inline_"+b),a("td",c).attr("colspan",a("th:visible, td:visible",".wp-list-table.widefat:first thead").length),a(f.what+b).hide().after(c).after('<tr class="hidden"></tr>'),e=a(".name",d),e.find("img").replaceWith(function(){return this.alt}),e=e.text(),a(':input[name="name"]',c).val(e),e=a(".slug",d),e.find("img").replaceWith(function(){return this.alt}),e=e.text(),a(':input[name="slug"]',c).val(e),a(c).attr("id","edit-"+b).addClass("inline-editor").show(),a(".ptitle",c).eq(0).focus(),!1},save:function(c){var d,e,f=a('input[name="taxonomy"]').val()||"";return"object"==typeof c&&(c=this.getId(c)),a("table.widefat .spinner").addClass("is-active"),d={action:"inline-save-tax",tax_type:this.type,tax_ID:c,taxonomy:f},e=a("#edit-"+c).find(":input").serialize(),d=e+"&"+a.param(d),a.post(ajaxurl,d,function(d){var e,f,g,h=a("#edit-"+c+" .inline-edit-save .error");a("table.widefat .spinner").removeClass("is-active"),d?-1!==d.indexOf("<tr")?(a(inlineEditTax.what+c).siblings("tr.hidden").addBack().remove(),f=a(d).attr("id"),a("#edit-"+c).before(d).remove(),f?(g=f.replace(inlineEditTax.type+"-",""),e=a("#"+f)):(g=c,e=a(inlineEditTax.what+c)),a("#parent").find("option[value="+g+"]").text(e.find(".row-title").text()),e.hide().fadeIn(400,function(){e.find(".editinline").focus(),b.a11y.speak(inlineEditL10n.saved)})):(h.html(d).show(),b.a11y.speak(h.text())):(h.html(inlineEditL10n.error).show(),b.a11y.speak(inlineEditL10n.error))}),!1},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");b&&(a("table.widefat .spinner").removeClass("is-active"),a("#"+b).siblings("tr.hidden").addBack().remove(),b=b.substr(b.lastIndexOf("-")+1),a(this.what+b).show().find(".editinline").focus())},getId:function(b){var c="TR"===b.tagName?b.id:a(b).parents("tr").attr("id"),d=c.split("-");return d[d.length-1]}},a(document).ready(function(){inlineEditTax.init()})}(jQuery,window.wp);
|
||||
window.wp=window.wp||{};var inlineEditTax;!function(a,b){inlineEditTax={init:function(){var b=this,c=a("#inline-edit");b.type=a("#the-list").attr("data-wp-lists").substr(5),b.what="#"+b.type+"-",a("#the-list").on("click","a.editinline",function(){return inlineEditTax.edit(this),!1}),c.keyup(function(a){if(27===a.which)return inlineEditTax.revert()}),a(".cancel",c).click(function(){return inlineEditTax.revert()}),a(".save",c).click(function(){return inlineEditTax.save(this)}),a("input, select",c).keydown(function(a){if(13===a.which)return inlineEditTax.save(this)}),a('#posts-filter input[type="submit"]').mousedown(function(){b.revert()})},toggle:function(b){var c=this;"none"===a(c.what+c.getId(b)).css("display")?c.revert():c.edit(b)},edit:function(b){var c,d,e,f=this;return f.revert(),"object"==typeof b&&(b=f.getId(b)),c=a("#inline-edit").clone(!0),d=a("#inline_"+b),a("td",c).attr("colspan",a("th:visible, td:visible",".wp-list-table.widefat:first thead").length),a(f.what+b).hide().after(c).after('<tr class="hidden"></tr>'),e=a(".name",d),e.find("img").replaceWith(function(){return this.alt}),e=e.text(),a(':input[name="name"]',c).val(e),e=a(".slug",d),e.find("img").replaceWith(function(){return this.alt}),e=e.text(),a(':input[name="slug"]',c).val(e),a(c).attr("id","edit-"+b).addClass("inline-editor").show(),a(".ptitle",c).eq(0).focus(),!1},save:function(c){var d,e,f=a('input[name="taxonomy"]').val()||"";return"object"==typeof c&&(c=this.getId(c)),a("table.widefat .spinner").addClass("is-active"),d={action:"inline-save-tax",tax_type:this.type,tax_ID:c,taxonomy:f},e=a("#edit-"+c).find(":input").serialize(),d=e+"&"+a.param(d),a.post(ajaxurl,d,function(d){var e,f,g,h=a("#edit-"+c+" .inline-edit-save .error");a("table.widefat .spinner").removeClass("is-active"),d?-1!==d.indexOf("<tr")?(a(inlineEditTax.what+c).siblings("tr.hidden").addBack().remove(),f=a(d).attr("id"),a("#edit-"+c).before(d).remove(),f?(g=f.replace(inlineEditTax.type+"-",""),e=a("#"+f)):(g=c,e=a(inlineEditTax.what+c)),a("#parent").find("option[value="+g+"]").text(e.find(".row-title").text()),e.hide().fadeIn(400,function(){e.find(".editinline").focus(),b.a11y.speak(inlineEditL10n.saved)})):(h.html(d).show(),b.a11y.speak(h.text())):(h.html(inlineEditL10n.error).show(),b.a11y.speak(inlineEditL10n.error))}),!1},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");b&&(a("table.widefat .spinner").removeClass("is-active"),a("#"+b).siblings("tr.hidden").addBack().remove(),b=b.substr(b.lastIndexOf("-")+1),a(this.what+b).show().find(".editinline").focus())},getId:function(b){var c="TR"===b.tagName?b.id:a(b).parents("tr").attr("id"),d=c.split("-");return d[d.length-1]}},a(document).ready(function(){inlineEditTax.init()})}(jQuery,window.wp);
|
||||
@@ -1,7 +1,7 @@
|
||||
/* global ajaxurl */
|
||||
jQuery(function($){
|
||||
$( 'body' ).bind( 'click.wp-gallery', function(e){
|
||||
var target = $( e.target ), id, img_size;
|
||||
var target = $( e.target ), id, img_size, nonceValue;
|
||||
|
||||
if ( target.hasClass( 'wp-set-header' ) ) {
|
||||
( window.dialogArguments || opener || parent || top ).location.href = target.data( 'location' );
|
||||
@@ -9,10 +9,12 @@ jQuery(function($){
|
||||
} else if ( target.hasClass( 'wp-set-background' ) ) {
|
||||
id = target.data( 'attachment-id' );
|
||||
img_size = $( 'input[name="attachments[' + id + '][image-size]"]:checked').val();
|
||||
nonceValue = $( '#_wpnonce' ).val() && '';
|
||||
|
||||
jQuery.post(ajaxurl, {
|
||||
action: 'set-background-image',
|
||||
attachment_id: id,
|
||||
_ajax_nonce: nonceValue,
|
||||
size: img_size
|
||||
}, function(){
|
||||
var win = window.dialogArguments || opener || parent || top;
|
||||
|
||||
2
wp-admin/js/media-gallery.min.js
vendored
2
wp-admin/js/media-gallery.min.js
vendored
@@ -1 +1 @@
|
||||
jQuery(function(a){a("body").bind("click.wp-gallery",function(b){var c,d,e=a(b.target);e.hasClass("wp-set-header")?((window.dialogArguments||opener||parent||top).location.href=e.data("location"),b.preventDefault()):e.hasClass("wp-set-background")&&(c=e.data("attachment-id"),d=a('input[name="attachments['+c+'][image-size]"]:checked').val(),jQuery.post(ajaxurl,{action:"set-background-image",attachment_id:c,size:d},function(){var a=window.dialogArguments||opener||parent||top;a.tb_remove(),a.location.reload()}),b.preventDefault())})});
|
||||
jQuery(function(a){a("body").bind("click.wp-gallery",function(b){var c,d,e,f=a(b.target);f.hasClass("wp-set-header")?((window.dialogArguments||opener||parent||top).location.href=f.data("location"),b.preventDefault()):f.hasClass("wp-set-background")&&(c=f.data("attachment-id"),d=a('input[name="attachments['+c+'][image-size]"]:checked').val(),e=a("#_wpnonce").val()&&"",jQuery.post(ajaxurl,{action:"set-background-image",attachment_id:c,_ajax_nonce:e,size:d},function(){var a=window.dialogArguments||opener||parent||top;a.tb_remove(),a.location.reload()}),b.preventDefault())})});
|
||||
2
wp-admin/js/media-upload.min.js
vendored
2
wp-admin/js/media-upload.min.js
vendored
@@ -1 +1 @@
|
||||
var wpActiveEditor,send_to_editor;send_to_editor=function(a){var b,c="undefined"!=typeof tinymce,d="undefined"!=typeof QTags;if(wpActiveEditor)c&&(b=tinymce.get(wpActiveEditor));else if(c&&tinymce.activeEditor)b=tinymce.activeEditor,wpActiveEditor=b.id;else if(!d)return!1;if(b&&!b.isHidden()?b.execCommand("mceInsertContent",!1,a):d?QTags.insertContent(a):document.getElementById(wpActiveEditor).value+=a,window.tb_remove)try{window.tb_remove()}catch(e){}};var tb_position;!function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=c>833?833:c,f=0;return a("#wpadminbar").length&&(f=parseInt(a("#wpadminbar").css("height"),10)),b.length&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+(e-80)+"&height="+(d-85-f)))})},a(window).resize(function(){tb_position()})}(jQuery);
|
||||
var wpActiveEditor,send_to_editor;send_to_editor=function(a){var b,c="undefined"!=typeof tinymce,d="undefined"!=typeof QTags;if(wpActiveEditor)c&&(b=tinymce.get(wpActiveEditor));else if(c&&tinymce.activeEditor)b=tinymce.activeEditor,wpActiveEditor=b.id;else if(!d)return!1;if(b&&!b.isHidden()?b.execCommand("mceInsertContent",!1,a):d?QTags.insertContent(a):document.getElementById(wpActiveEditor).value+=a,window.tb_remove)try{window.tb_remove()}catch(e){}};var tb_position;!function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=833<c?833:c,f=0;return a("#wpadminbar").length&&(f=parseInt(a("#wpadminbar").css("height"),10)),b.length&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+(e-80)+"&height="+(d-85-f)))})},a(window).resize(function(){tb_position()})}(jQuery);
|
||||
2
wp-admin/js/media.min.js
vendored
2
wp-admin/js/media.min.js
vendored
@@ -1 +1 @@
|
||||
var findPosts;!function(a){findPosts={open:function(b,c){var d=a(".ui-find-overlay");return 0===d.length&&(a("body").append('<div class="ui-find-overlay"></div>'),findPosts.overlay()),d.show(),b&&c&&a("#affected").attr("name",b).val(c),a("#find-posts").show(),a("#find-posts-input").focus().keyup(function(a){27==a.which&&findPosts.close()}),findPosts.send(),!1},close:function(){a("#find-posts-response").empty(),a("#find-posts").hide(),a(".ui-find-overlay").hide()},overlay:function(){a(".ui-find-overlay").on("click",function(){findPosts.close()})},send:function(){var b={ps:a("#find-posts-input").val(),action:"find_posts",_ajax_nonce:a("#_ajax_nonce").val()},c=a(".find-box-search .spinner");c.addClass("is-active"),a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){c.removeClass("is-active")}).done(function(b){b.success||a("#find-posts-response").text(attachMediaBoxL10n.error),a("#find-posts-response").html(b.data)}).fail(function(){a("#find-posts-response").text(attachMediaBoxL10n.error)})}},a(document).ready(function(){var b,c=a("#wp-media-grid");c.length&&window.wp&&window.wp.media&&(b=_wpMediaGridSettings,window.wp.media({frame:"manage",container:c,library:b.queryVars}).open()),a("#find-posts-submit").click(function(b){a('#find-posts-response input[type="radio"]:checked').length||b.preventDefault()}),a("#find-posts .find-box-search :input").keypress(function(a){return 13==a.which?(findPosts.send(),!1):void 0}),a("#find-posts-search").click(findPosts.send),a("#find-posts-close").click(findPosts.close),a("#doaction, #doaction2").click(function(b){a('select[name^="action"]').each(function(){var c=a(this).val();"attach"===c?(b.preventDefault(),findPosts.open()):"delete"===c&&(showNotice.warn()||b.preventDefault())})}),a(".find-box-inside").on("click","tr",function(){a(this).find(".found-radio input").prop("checked",!0)})})}(jQuery);
|
||||
var findPosts;!function(a){findPosts={open:function(b,c){var d=a(".ui-find-overlay");return 0===d.length&&(a("body").append('<div class="ui-find-overlay"></div>'),findPosts.overlay()),d.show(),b&&c&&a("#affected").attr("name",b).val(c),a("#find-posts").show(),a("#find-posts-input").focus().keyup(function(a){27==a.which&&findPosts.close()}),findPosts.send(),!1},close:function(){a("#find-posts-response").empty(),a("#find-posts").hide(),a(".ui-find-overlay").hide()},overlay:function(){a(".ui-find-overlay").on("click",function(){findPosts.close()})},send:function(){var b={ps:a("#find-posts-input").val(),action:"find_posts",_ajax_nonce:a("#_ajax_nonce").val()},c=a(".find-box-search .spinner");c.addClass("is-active"),a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){c.removeClass("is-active")}).done(function(b){b.success||a("#find-posts-response").text(attachMediaBoxL10n.error),a("#find-posts-response").html(b.data)}).fail(function(){a("#find-posts-response").text(attachMediaBoxL10n.error)})}},a(document).ready(function(){var b,c=a("#wp-media-grid");c.length&&window.wp&&window.wp.media&&(b=_wpMediaGridSettings,window.wp.media({frame:"manage",container:c,library:b.queryVars}).open()),a("#find-posts-submit").click(function(b){a('#find-posts-response input[type="radio"]:checked').length||b.preventDefault()}),a("#find-posts .find-box-search :input").keypress(function(a){if(13==a.which)return findPosts.send(),!1}),a("#find-posts-search").click(findPosts.send),a("#find-posts-close").click(findPosts.close),a("#doaction, #doaction2").click(function(b){a('select[name^="action"]').each(function(){var c=a(this).val();"attach"===c?(b.preventDefault(),findPosts.open()):"delete"===c&&(showNotice.warn()||b.preventDefault())})}),a(".find-box-inside").on("click","tr",function(){a(this).find(".found-radio input").prop("checked",!0)})})}(jQuery);
|
||||
2
wp-admin/js/nav-menu.min.js
vendored
2
wp-admin/js/nav-menu.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/js/password-strength-meter.min.js
vendored
2
wp-admin/js/password-strength-meter.min.js
vendored
@@ -1 +1 @@
|
||||
window.wp=window.wp||{};var passwordStrength;!function(a){wp.passwordStrength={meter:function(b,c,d){if(a.isArray(c)||(c=[c.toString()]),b!=d&&d&&d.length>0)return 5;if("undefined"==typeof window.zxcvbn)return-1;var e=zxcvbn(b,c);return e.score},userInputBlacklist:function(){var b,c,d,e,f=[],g=[],h=["user_login","first_name","last_name","nickname","display_name","email","url","description","weblog_title","admin_email"];for(f.push(document.title),f.push(document.URL),c=h.length,b=0;c>b;b++)e=a("#"+h[b]),0!==e.length&&(f.push(e[0].defaultValue),f.push(e.val()));for(d=f.length,b=0;d>b;b++)f[b]&&(g=g.concat(f[b].replace(/\W/g," ").split(" ")));return g=a.grep(g,function(b,c){return""===b||4>b.length?!1:a.inArray(b,g)===c})}},passwordStrength=wp.passwordStrength.meter}(jQuery);
|
||||
window.wp=window.wp||{};var passwordStrength;!function(a){wp.passwordStrength={meter:function(b,c,d){if(a.isArray(c)||(c=[c.toString()]),b!=d&&d&&d.length>0)return 5;if("undefined"==typeof window.zxcvbn)return-1;var e=zxcvbn(b,c);return e.score},userInputBlacklist:function(){var b,c,d,e,f=[],g=[],h=["user_login","first_name","last_name","nickname","display_name","email","url","description","weblog_title","admin_email"];for(f.push(document.title),f.push(document.URL),c=h.length,b=0;b<c;b++)e=a("#"+h[b]),0!==e.length&&(f.push(e[0].defaultValue),f.push(e.val()));for(d=f.length,b=0;b<d;b++)f[b]&&(g=g.concat(f[b].replace(/\W/g," ").split(" ")));return g=a.grep(g,function(b,c){return!(""===b||4>b.length)&&a.inArray(b,g)===c})}},passwordStrength=wp.passwordStrength.meter}(jQuery);
|
||||
2
wp-admin/js/plugin-install.min.js
vendored
2
wp-admin/js/plugin-install.min.js
vendored
@@ -1 +1 @@
|
||||
var tb_position;jQuery(document).ready(function(a){function b(){var b=e.find("#TB_iframeContent");g=b.contents().find("body"),c(),i.focus(),a("#plugin-information-tabs a",g).on("click",function(){c()}),g.on("keydown",function(a){27===a.which&&tb_remove()})}function c(){var b;h=a(":tabbable",g),i=e.find("#TB_closeWindowButton"),j=h.last(),b=i.add(j),b.off("keydown.wp-plugin-details"),b.on("keydown.wp-plugin-details",function(a){d(a)})}function d(a){9===a.which&&(j[0]!==a.target||a.shiftKey?i[0]===a.target&&a.shiftKey&&(a.preventDefault(),j.focus()):(a.preventDefault(),i.focus()))}var e,f,g,h,i,j,k=a(".upload-view-toggle"),l=a(".wrap"),m=a(document.body);tb_position=function(){var b=a(window).width(),c=a(window).height()-(b>792?60:20),d=b>792?772:b-20;return e=a("#TB_window"),e.length&&(e.width(d).height(c),a("#TB_iframeContent").width(d).height(c),e.css({"margin-left":"-"+parseInt(d/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&e.css({top:"30px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+d+"&height="+c))})},a(window).resize(function(){tb_position()}),m.on("thickbox:iframe:loaded",e,function(){b()}).on("thickbox:removed",function(){f.focus()}),a(".thickbox.open-plugin-details-modal").on("click",function(b){var c=a(this).data("title")?plugininstallL10n.plugin_information+" "+a(this).data("title"):plugininstallL10n.plugin_modal_label;b.preventDefault(),b.stopPropagation(),f=a(this),tb_click.call(this),e.attr({role:"dialog","aria-label":plugininstallL10n.plugin_modal_label}),e.find("#TB_iframeContent").attr("title",c)}),a("#plugin-information-tabs a").click(function(b){var c=a(this).attr("name");b.preventDefault(),a("#plugin-information-tabs a.current").removeClass("current"),a(this).addClass("current"),"description"!==c&&a(window).width()<772?a("#plugin-information-content").find(".fyi").hide():a("#plugin-information-content").find(".fyi").show(),a("#section-holder div.section").hide(),a("#section-"+c).show()}),l.hasClass("plugin-install-tab-upload")||k.attr({role:"button","aria-expanded":"false"}).on("click",function(a){a.preventDefault(),m.toggleClass("show-upload-view"),k.attr("aria-expanded",m.hasClass("show-upload-view"))})});
|
||||
var tb_position;jQuery(document).ready(function(a){function b(){var b=e.find("#TB_iframeContent");g=b.contents().find("body"),c(),i.focus(),a("#plugin-information-tabs a",g).on("click",function(){c()}),g.on("keydown",function(a){27===a.which&&tb_remove()})}function c(){var b;h=a(":tabbable",g),i=e.find("#TB_closeWindowButton"),j=h.last(),b=i.add(j),b.off("keydown.wp-plugin-details"),b.on("keydown.wp-plugin-details",function(a){d(a)})}function d(a){9===a.which&&(j[0]!==a.target||a.shiftKey?i[0]===a.target&&a.shiftKey&&(a.preventDefault(),j.focus()):(a.preventDefault(),i.focus()))}var e,f,g,h,i,j,k=a(".upload-view-toggle"),l=a(".wrap"),m=a(document.body);tb_position=function(){var b=a(window).width(),c=a(window).height()-(792<b?60:20),d=792<b?772:b-20;return e=a("#TB_window"),e.length&&(e.width(d).height(c),a("#TB_iframeContent").width(d).height(c),e.css({"margin-left":"-"+parseInt(d/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&e.css({top:"30px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+d+"&height="+c))})},a(window).resize(function(){tb_position()}),m.on("thickbox:iframe:loaded",e,function(){b()}).on("thickbox:removed",function(){f.focus()}),a(".thickbox.open-plugin-details-modal").on("click",function(b){var c=a(this).data("title")?plugininstallL10n.plugin_information+" "+a(this).data("title"):plugininstallL10n.plugin_modal_label;b.preventDefault(),b.stopPropagation(),f=a(this),tb_click.call(this),e.attr({role:"dialog","aria-label":plugininstallL10n.plugin_modal_label}),e.find("#TB_iframeContent").attr("title",c)}),a("#plugin-information-tabs a").click(function(b){var c=a(this).attr("name");b.preventDefault(),a("#plugin-information-tabs a.current").removeClass("current"),a(this).addClass("current"),"description"!==c&&a(window).width()<772?a("#plugin-information-content").find(".fyi").hide():a("#plugin-information-content").find(".fyi").show(),a("#section-holder div.section").hide(),a("#section-"+c).show()}),l.hasClass("plugin-install-tab-upload")||k.attr({role:"button","aria-expanded":"false"}).on("click",function(a){a.preventDefault(),m.toggleClass("show-upload-view"),k.attr("aria-expanded",m.hasClass("show-upload-view"))})});
|
||||
2
wp-admin/js/post.min.js
vendored
2
wp-admin/js/post.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/js/press-this.min.js
vendored
2
wp-admin/js/press-this.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/js/revisions.min.js
vendored
2
wp-admin/js/revisions.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/js/svg-painter.min.js
vendored
2
wp-admin/js/svg-painter.min.js
vendored
@@ -1 +1 @@
|
||||
window.wp=window.wp||{},wp.svgPainter=function(a,b,c,d){"use strict";var e,f,g,h={},i=[];return a(c).ready(function(){c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")&&(a(c.body).removeClass("no-svg").addClass("svg"),wp.svgPainter.init())}),f=function(){function a(){for(;256>j;)e=String.fromCharCode(j),g+=e,i[j]=j,h[j]=f.indexOf(e),++j}function b(a,b,c,d,f,g){var h,i,j=0,k=0,l="",m=0;for(a=String(a),i=a.length;i>k;){for(e=a.charCodeAt(k),e=256>e?c[e]:-1,j=(j<<f)+e,m+=f;m>=g;)m-=g,h=j>>m,l+=d.charAt(h),j^=h<<m;++k}return!b&&m>0&&(l+=d.charAt(j<<g-m)),l}function c(c){return e||a(),c=b(c,!1,i,f,8,6),c+"====".slice(c.length%4||4)}function d(c){var d;e||a(),c=c.replace(/[^A-Za-z0-9\+\/\=]/g,""),c=String(c).split("="),d=c.length;do--d,c[d]=b(c[d],!0,h,g,6,8);while(d>0);return c=c.join("")}var e,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g="",h=[256],i=[256],j=0;return{atob:d,btoa:c}}(),{init:function(){g=this,e=a("#adminmenu .wp-menu-image, #wpadminbar .ab-item"),this.setColors(),this.findElements(),this.paint()},setColors:function(a){"undefined"==typeof a&&"undefined"!=typeof b._wpColorScheme&&(a=b._wpColorScheme),a&&a.icons&&a.icons.base&&a.icons.current&&a.icons.focus&&(h=a.icons)},findElements:function(){e.each(function(){var b=a(this),c=b.css("background-image");c&&-1!=c.indexOf("data:image/svg+xml;base64")&&i.push(b)})},paint:function(){a.each(i,function(a,c){var d=c.parent().parent();d.hasClass("current")||d.hasClass("wp-has-current-submenu")?g.paintElement(c,"current"):(g.paintElement(c,"base"),d.hover(function(){g.paintElement(c,"focus")},function(){b.setTimeout(function(){g.paintElement(c,"base")},100)}))})},paintElement:function(a,c){var d,e,g;if(c&&h.hasOwnProperty(c)&&(g=h[c],g.match(/^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i)&&(d=a.data("wp-ui-svg-"+g),"none"!==d))){if(!d){if(e=a.css("background-image").match(/.+data:image\/svg\+xml;base64,([A-Za-z0-9\+\/\=]+)/),!e||!e[1])return void a.data("wp-ui-svg-"+g,"none");try{d="atob"in b?b.atob(e[1]):f.atob(e[1])}catch(i){}if(!d)return void a.data("wp-ui-svg-"+g,"none");d=d.replace(/fill="(.+?)"/g,'fill="'+g+'"'),d=d.replace(/style="(.+?)"/g,'style="fill:'+g+'"'),d=d.replace(/fill:.*?;/g,"fill: "+g+";"),d="btoa"in b?b.btoa(d):f.btoa(d),a.data("wp-ui-svg-"+g,d)}a.attr("style",'background-image: url("data:image/svg+xml;base64,'+d+'") !important;')}}}}(jQuery,window,document);
|
||||
window.wp=window.wp||{},wp.svgPainter=function(a,b,c,d){"use strict";var e,f,g,h={},i=[];return a(c).ready(function(){c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")&&(a(c.body).removeClass("no-svg").addClass("svg"),wp.svgPainter.init())}),f=function(){function a(){for(;j<256;)e=String.fromCharCode(j),g+=e,i[j]=j,h[j]=f.indexOf(e),++j}function b(a,b,c,d,f,g){var h,i,j=0,k=0,l="",m=0;for(a=String(a),i=a.length;k<i;){for(e=a.charCodeAt(k),e=e<256?c[e]:-1,j=(j<<f)+e,m+=f;m>=g;)m-=g,h=j>>m,l+=d.charAt(h),j^=h<<m;++k}return!b&&m>0&&(l+=d.charAt(j<<g-m)),l}function c(c){return e||a(),c=b(c,!1,i,f,8,6),c+"====".slice(c.length%4||4)}function d(c){var d;e||a(),c=c.replace(/[^A-Za-z0-9\+\/\=]/g,""),c=String(c).split("="),d=c.length;do--d,c[d]=b(c[d],!0,h,g,6,8);while(d>0);return c=c.join("")}var e,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g="",h=[256],i=[256],j=0;return{atob:d,btoa:c}}(),{init:function(){g=this,e=a("#adminmenu .wp-menu-image, #wpadminbar .ab-item"),this.setColors(),this.findElements(),this.paint()},setColors:function(a){"undefined"==typeof a&&"undefined"!=typeof b._wpColorScheme&&(a=b._wpColorScheme),a&&a.icons&&a.icons.base&&a.icons.current&&a.icons.focus&&(h=a.icons)},findElements:function(){e.each(function(){var b=a(this),c=b.css("background-image");c&&c.indexOf("data:image/svg+xml;base64")!=-1&&i.push(b)})},paint:function(){a.each(i,function(a,c){var d=c.parent().parent();d.hasClass("current")||d.hasClass("wp-has-current-submenu")?g.paintElement(c,"current"):(g.paintElement(c,"base"),d.hover(function(){g.paintElement(c,"focus")},function(){b.setTimeout(function(){g.paintElement(c,"base")},100)}))})},paintElement:function(a,c){var d,e,g;if(c&&h.hasOwnProperty(c)&&(g=h[c],g.match(/^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i)&&(d=a.data("wp-ui-svg-"+g),"none"!==d))){if(!d){if(e=a.css("background-image").match(/.+data:image\/svg\+xml;base64,([A-Za-z0-9\+\/\=]+)/),!e||!e[1])return void a.data("wp-ui-svg-"+g,"none");try{d="atob"in b?b.atob(e[1]):f.atob(e[1])}catch(i){}if(!d)return void a.data("wp-ui-svg-"+g,"none");d=d.replace(/fill="(.+?)"/g,'fill="'+g+'"'),d=d.replace(/style="(.+?)"/g,'style="fill:'+g+'"'),d=d.replace(/fill:.*?;/g,"fill: "+g+";"),d="btoa"in b?b.btoa(d):f.btoa(d),a.data("wp-ui-svg-"+g,d)}a.attr("style",'background-image: url("data:image/svg+xml;base64,'+d+'") !important;')}}}}(jQuery,window,document);
|
||||
2
wp-admin/js/tags-box.min.js
vendored
2
wp-admin/js/tags-box.min.js
vendored
@@ -1 +1 @@
|
||||
var tagBox,array_unique_noempty;!function(a){array_unique_noempty=function(b){var c=[];return a.each(b,function(b,d){d=a.trim(d),d&&-1===a.inArray(d,c)&&c.push(d)}),c},tagBox={clean:function(a){var b=window.tagsBoxL10n.tagDelimiter;return","!==b&&(a=a.replace(new RegExp(b,"g"),",")),a=a.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,""),","!==b&&(a=a.replace(/,/g,b)),a},parseTags:function(b){var c=b.id,d=c.split("-check-num-")[1],e=a(b).closest(".tagsdiv"),f=e.find(".the-tags"),g=window.tagsBoxL10n.tagDelimiter,h=f.val().split(g),i=[];return delete h[d],a.each(h,function(b,c){c=a.trim(c),c&&i.push(c)}),f.val(this.clean(i.join(g))),this.quickClicks(e),!1},quickClicks:function(b){var c,d,e=a(".the-tags",b),f=a(".tagchecklist",b),g=a(b).attr("id");e.length&&(d=e.prop("disabled"),c=e.val().split(window.tagsBoxL10n.tagDelimiter),f.empty(),a.each(c,function(b,c){var e,h;c=a.trim(c),c&&(e=a("<span />").text(c),d||(h=a('<a id="'+g+"-check-num-"+b+'" class="ntdelbutton" tabindex="0">X</a>'),h.on("click keypress",function(b){"click"!==b.type&&13!==b.keyCode||(13===b.keyCode&&a(this).closest(".tagsdiv").find("input.newtag").focus(),tagBox.parseTags(this))}),e.prepend(" ").prepend(h)),f.append(e))}))},flushTags:function(b,c,d){var e,f,g,h=a(".the-tags",b),i=a("input.newtag",b),j=window.tagsBoxL10n.tagDelimiter;return c=c||!1,g=c?a(c).text():i.val(),"undefined"==typeof g?!1:(e=h.val(),f=e?e+j+g:g,f=this.clean(f),f=array_unique_noempty(f.split(j)).join(j),h.val(f),this.quickClicks(b),c||i.val(""),"undefined"==typeof d&&i.focus(),!1)},get:function(b){var c=b.substr(b.indexOf("-")+1);a.post(ajaxurl,{action:"get-tagcloud",tax:c},function(d,e){0!==d&&"success"==e&&(d=a('<p id="tagcloud-'+c+'" class="the-tagcloud">'+d+"</p>"),a("a",d).click(function(){return tagBox.flushTags(a("#"+c),this),!1}),a("#"+b).after(d))})},init:function(){var b=this,c=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)}),a(".tagadd",c).click(function(){b.flushTags(a(this).closest(".tagsdiv"))}),a("input.newtag",c).keyup(function(b){return 13==b.which?(tagBox.flushTags(a(this).closest(".tagsdiv")),!1):void 0}).keypress(function(a){return 13==a.which?(a.preventDefault(),!1):void 0}).each(function(){var b=a(this).closest("div.tagsdiv").attr("id");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:!0,multipleSep:window.tagsBoxL10n.tagDelimiter})}),a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,!1,1)})}),a(".tagcloud-link").click(function(){return tagBox.get(a(this).attr("id")),a(this).unbind().click(function(){return a(this).siblings(".the-tagcloud").toggle(),!1}),!1})}}}(jQuery);
|
||||
var tagBox,array_unique_noempty;!function(a){array_unique_noempty=function(b){var c=[];return a.each(b,function(b,d){d=a.trim(d),d&&a.inArray(d,c)===-1&&c.push(d)}),c},tagBox={clean:function(a){var b=window.tagsBoxL10n.tagDelimiter;return","!==b&&(a=a.replace(new RegExp(b,"g"),",")),a=a.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,""),","!==b&&(a=a.replace(/,/g,b)),a},parseTags:function(b){var c=b.id,d=c.split("-check-num-")[1],e=a(b).closest(".tagsdiv"),f=e.find(".the-tags"),g=window.tagsBoxL10n.tagDelimiter,h=f.val().split(g),i=[];return delete h[d],a.each(h,function(b,c){c=a.trim(c),c&&i.push(c)}),f.val(this.clean(i.join(g))),this.quickClicks(e),!1},quickClicks:function(b){var c,d,e=a(".the-tags",b),f=a(".tagchecklist",b),g=a(b).attr("id");e.length&&(d=e.prop("disabled"),c=e.val().split(window.tagsBoxL10n.tagDelimiter),f.empty(),a.each(c,function(b,c){var e,h;c=a.trim(c),c&&(e=a("<span />").text(c),d||(h=a('<a id="'+g+"-check-num-"+b+'" class="ntdelbutton" tabindex="0">X</a>'),h.on("click keypress",function(b){"click"!==b.type&&13!==b.keyCode||(13===b.keyCode&&a(this).closest(".tagsdiv").find("input.newtag").focus(),tagBox.parseTags(this))}),e.prepend(" ").prepend(h)),f.append(e))}))},flushTags:function(b,c,d){var e,f,g,h=a(".the-tags",b),i=a("input.newtag",b),j=window.tagsBoxL10n.tagDelimiter;return c=c||!1,g=c?a(c).text():i.val(),"undefined"!=typeof g&&(e=h.val(),f=e?e+j+g:g,f=this.clean(f),f=array_unique_noempty(f.split(j)).join(j),h.val(f),this.quickClicks(b),c||i.val(""),"undefined"==typeof d&&i.focus(),!1)},get:function(b){var c=b.substr(b.indexOf("-")+1);a.post(ajaxurl,{action:"get-tagcloud",tax:c},function(d,e){0!==d&&"success"==e&&(d=a('<p id="tagcloud-'+c+'" class="the-tagcloud">'+d+"</p>"),a("a",d).click(function(){return tagBox.flushTags(a("#"+c),this),!1}),a("#"+b).after(d))})},init:function(){var b=this,c=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)}),a(".tagadd",c).click(function(){b.flushTags(a(this).closest(".tagsdiv"))}),a("input.newtag",c).keyup(function(b){if(13==b.which)return tagBox.flushTags(a(this).closest(".tagsdiv")),!1}).keypress(function(a){if(13==a.which)return a.preventDefault(),!1}).each(function(){var b=a(this).closest("div.tagsdiv").attr("id");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:!0,multipleSep:window.tagsBoxL10n.tagDelimiter})}),a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,!1,1)})}),a(".tagcloud-link").click(function(){return tagBox.get(a(this).attr("id")),a(this).unbind().click(function(){return a(this).siblings(".the-tagcloud").toggle(),!1}),!1})}}}(jQuery);
|
||||
2
wp-admin/js/tags.min.js
vendored
2
wp-admin/js/tags.min.js
vendored
@@ -1 +1 @@
|
||||
jQuery(document).ready(function(a){a("#the-list").on("click",".delete-tag",function(){var b,c=a(this),d=c.parents("tr"),e=!0;return"undefined"!=showNotice&&(e=showNotice.warn()),e&&(b=c.attr("href").replace(/[^?]*\?/,"").replace(/action=delete/,"action=delete-tag"),a.post(ajaxurl,b,function(c){"1"==c?(a("#ajax-response").empty(),d.fadeOut("normal",function(){d.remove()}),a('select#parent option[value="'+b.match(/tag_ID=(\d+)/)[1]+'"]').remove(),a("a.tag-link-"+b.match(/tag_ID=(\d+)/)[1]).remove()):"-1"==c?(a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.noPerm+"</p></div>"),d.children().css("backgroundColor","")):(a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.broken+"</p></div>"),d.children().css("backgroundColor",""))}),d.children().css("backgroundColor","#f33")),!1}),a("#submit").click(function(){var b=a(this).parents("form");return validateForm(b)?(a.post(ajaxurl,a("#addtag").serialize(),function(c){var d,e,f,g,h;if(a("#ajax-response").empty(),d=wpAjax.parseAjaxResponse(c,"ajax-response"),d&&!d.errors){if(e=b.find("select#parent").val(),e>0&&a("#tag-"+e).length>0?a(".tags #tag-"+e).after(d.responses[0].supplemental.noparents):a(".tags").prepend(d.responses[0].supplemental.parents),a(".tags .no-items").remove(),b.find("select#parent")){for(f=d.responses[1].supplemental,g="",h=0;h<d.responses[1].position;h++)g+=" ";b.find("select#parent option:selected").after('<option value="'+f.term_id+'">'+g+f.name+"</option>")}a('input[type="text"]:visible, textarea:visible',b).val("")}}),!1):!1})});
|
||||
jQuery(document).ready(function(a){a("#the-list").on("click",".delete-tag",function(){var b,c=a(this),d=c.parents("tr"),e=!0;return"undefined"!=showNotice&&(e=showNotice.warn()),e&&(b=c.attr("href").replace(/[^?]*\?/,"").replace(/action=delete/,"action=delete-tag"),a.post(ajaxurl,b,function(c){"1"==c?(a("#ajax-response").empty(),d.fadeOut("normal",function(){d.remove()}),a('select#parent option[value="'+b.match(/tag_ID=(\d+)/)[1]+'"]').remove(),a("a.tag-link-"+b.match(/tag_ID=(\d+)/)[1]).remove()):"-1"==c?(a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.noPerm+"</p></div>"),d.children().css("backgroundColor","")):(a("#ajax-response").empty().append('<div class="error"><p>'+tagsl10n.broken+"</p></div>"),d.children().css("backgroundColor",""))}),d.children().css("backgroundColor","#f33")),!1}),a("#submit").click(function(){var b=a(this).parents("form");return!!validateForm(b)&&(a.post(ajaxurl,a("#addtag").serialize(),function(c){var d,e,f,g,h;if(a("#ajax-response").empty(),d=wpAjax.parseAjaxResponse(c,"ajax-response"),d&&!d.errors){if(e=b.find("select#parent").val(),e>0&&a("#tag-"+e).length>0?a(".tags #tag-"+e).after(d.responses[0].supplemental.noparents):a(".tags").prepend(d.responses[0].supplemental.parents),a(".tags .no-items").remove(),b.find("select#parent")){for(f=d.responses[1].supplemental,g="",h=0;h<d.responses[1].position;h++)g+=" ";b.find("select#parent option:selected").after('<option value="'+f.term_id+'">'+g+f.name+"</option>")}a('input[type="text"]:visible, textarea:visible',b).val("")}}),!1)})});
|
||||
@@ -597,7 +597,7 @@ themes.view.Theme = wp.Backbone.View.extend({
|
||||
|
||||
wp.updates.maybeRequestFilesystemCredentials( event );
|
||||
|
||||
$( document ).on( 'wp-install-theme-success', function( event, response ) {
|
||||
$( document ).on( 'wp-theme-install-success', function( event, response ) {
|
||||
if ( _this.model.get( 'id' ) === response.slug ) {
|
||||
_this.model.set( { 'installed': true } );
|
||||
}
|
||||
@@ -799,7 +799,7 @@ themes.view.Details = wp.Backbone.View.extend({
|
||||
|
||||
wp.updates.maybeRequestFilesystemCredentials( event );
|
||||
|
||||
$( document ).one( 'wp-delete-theme-success', function( event, response ) {
|
||||
$( document ).one( 'wp-theme-delete-success', function( event, response ) {
|
||||
_this.$el.find( '.close' ).trigger( 'click' );
|
||||
$( '[data-slug="' + response.slug + '"' ).css( { backgroundColor:'#faafaa' } ).fadeOut( 350, function() {
|
||||
$( this ).remove();
|
||||
@@ -972,7 +972,7 @@ themes.view.Preview = themes.view.Details.extend({
|
||||
|
||||
wp.updates.maybeRequestFilesystemCredentials( event );
|
||||
|
||||
$( document ).on( 'wp-install-theme-success', function() {
|
||||
$( document ).on( 'wp-theme-install-success', function() {
|
||||
_this.model.set( { 'installed': true } );
|
||||
} );
|
||||
|
||||
|
||||
2
wp-admin/js/theme.min.js
vendored
2
wp-admin/js/theme.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -92,6 +92,7 @@
|
||||
* @type {object} filesystemCredentials.ssh Holds SSH credentials.
|
||||
* @type {string} filesystemCredentials.ssh.publicKey The public key. Default empty string.
|
||||
* @type {string} filesystemCredentials.ssh.privateKey The private key. Default empty string.
|
||||
* @type {string} filesystemCredentials.fsNonce Filesystem credentials form nonce.
|
||||
* @type {bool} filesystemCredentials.available Whether filesystem credentials have been provided.
|
||||
* Default 'false'.
|
||||
*/
|
||||
@@ -106,6 +107,7 @@
|
||||
publicKey: '',
|
||||
privateKey: ''
|
||||
},
|
||||
fsNonce: '',
|
||||
available: false
|
||||
};
|
||||
|
||||
@@ -223,6 +225,7 @@
|
||||
options.data = _.extend( data, {
|
||||
action: action,
|
||||
_ajax_nonce: wp.updates.ajaxNonce,
|
||||
_fs_nonce: wp.updates.filesystemCredentials.fsNonce,
|
||||
username: wp.updates.filesystemCredentials.ftp.username,
|
||||
password: wp.updates.filesystemCredentials.ftp.password,
|
||||
hostname: wp.updates.filesystemCredentials.ftp.hostname,
|
||||
@@ -244,12 +247,12 @@
|
||||
* @param {string=} response.errorCode Optional. Error code for an error that occurred.
|
||||
*/
|
||||
wp.updates.ajaxAlways = function( response ) {
|
||||
if ( ! response.errorCode && 'unable_to_connect_to_filesystem' !== response.errorCode ) {
|
||||
if ( ! response.errorCode || 'unable_to_connect_to_filesystem' !== response.errorCode ) {
|
||||
wp.updates.ajaxLocked = false;
|
||||
wp.updates.queueChecker();
|
||||
}
|
||||
|
||||
if ( 'undefined' !== typeof response.debug ) {
|
||||
if ( 'undefined' !== typeof response.debug && window.console && window.console.log ) {
|
||||
_.map( response.debug, function( message ) {
|
||||
window.console.log( $( '<p />' ).html( message ).text() );
|
||||
} );
|
||||
@@ -350,7 +353,7 @@
|
||||
|
||||
if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
|
||||
$updateRow = $( 'tr[data-plugin="' + args.plugin + '"]' );
|
||||
$message = $updateRow.find( '.update-message' ).addClass( 'updating-message' ).find( 'p' );
|
||||
$message = $updateRow.find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' );
|
||||
message = wp.updates.l10n.updatingLabel.replace( '%s', $updateRow.find( '.plugin-title strong' ).text() );
|
||||
} else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
|
||||
$card = $( '.plugin-card-' + args.slug );
|
||||
@@ -453,6 +456,13 @@
|
||||
$message = $( 'tr[data-slug="' + response.slug + '"]' ).find( '.update-message' );
|
||||
}
|
||||
$message.removeClass( 'updating-message notice-warning' ).addClass( 'notice-error' ).find( 'p' ).html( errorMessage );
|
||||
|
||||
if ( response.pluginName ) {
|
||||
$message.find( 'p' )
|
||||
.attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', response.pluginName ) );
|
||||
} else {
|
||||
$message.find( 'p' ).removeAttr( 'aria-label' );
|
||||
}
|
||||
} else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
|
||||
$card = $( '.plugin-card-' + response.slug )
|
||||
.addClass( 'plugin-card-update-failed' )
|
||||
@@ -467,6 +477,8 @@
|
||||
if ( response.pluginName ) {
|
||||
$card.find( '.update-now' )
|
||||
.attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', response.pluginName ) );
|
||||
} else {
|
||||
$card.find( '.update-now' ).removeAttr( 'aria-label' );
|
||||
}
|
||||
|
||||
$card.on( 'click', '.notice.is-dismissible .notice-dismiss', function() {
|
||||
@@ -514,11 +526,14 @@
|
||||
$message = $( '[data-slug="' + args.slug + '"]' );
|
||||
}
|
||||
|
||||
$message.text( wp.updates.l10n.installing );
|
||||
if ( $message.html() !== wp.updates.l10n.installing ) {
|
||||
$message.data( 'originaltext', $message.html() );
|
||||
}
|
||||
|
||||
$message
|
||||
.addClass( 'updating-message' )
|
||||
.attr( 'aria-label', wp.updates.l10n.pluginInstallingLabel.replace( '%s', $message.data( 'name' ) ) );
|
||||
.attr( 'aria-label', wp.updates.l10n.pluginInstallingLabel.replace( '%s', $message.data( 'name' ) ) )
|
||||
.text( wp.updates.l10n.installing );
|
||||
|
||||
wp.a11y.speak( wp.updates.l10n.installingMsg, 'polite' );
|
||||
|
||||
@@ -526,7 +541,7 @@
|
||||
$card.removeClass( 'plugin-card-install-failed' ).find( '.notice.notice-error' ).remove();
|
||||
|
||||
$document.trigger( 'wp-plugin-installing', args );
|
||||
|
||||
|
||||
return wp.updates.ajax( 'install-plugin', args );
|
||||
};
|
||||
|
||||
@@ -704,21 +719,23 @@
|
||||
* decorated with an abort() method.
|
||||
*/
|
||||
wp.updates.deletePlugin = function( args ) {
|
||||
var $message = $( '[data-plugin="' + args.plugin + '"]' ).find( '.update-message p' );
|
||||
var $link = $( '[data-plugin="' + args.plugin + '"]' ).find( '.row-actions a.delete' );
|
||||
|
||||
args = _.extend( {
|
||||
success: wp.updates.deletePluginSuccess,
|
||||
error: wp.updates.deletePluginError
|
||||
}, args );
|
||||
|
||||
if ( $message.html() !== wp.updates.l10n.updating ) {
|
||||
$message.data( 'originaltext', $message.html() );
|
||||
if ( $link.html() !== wp.updates.l10n.deleting ) {
|
||||
$link
|
||||
.data( 'originaltext', $link.html() )
|
||||
.text( wp.updates.l10n.deleting );
|
||||
}
|
||||
|
||||
wp.a11y.speak( wp.updates.l10n.deleting, 'polite' );
|
||||
|
||||
$document.trigger( 'wp-plugin-deleting', args );
|
||||
|
||||
|
||||
return wp.updates.ajax( 'delete-plugin', args );
|
||||
};
|
||||
|
||||
@@ -891,7 +908,7 @@
|
||||
}, args );
|
||||
|
||||
if ( 'themes-network' === pagenow ) {
|
||||
$notice = $( '[data-slug="' + args.slug + '"]' ).find( '.update-message' ).addClass( 'updating-message' ).find( 'p' );
|
||||
$notice = $( '[data-slug="' + args.slug + '"]' ).find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' );
|
||||
|
||||
} else {
|
||||
$notice = $( '#update-theme' ).closest( '.notice' ).removeClass( 'notice-large' );
|
||||
@@ -1043,7 +1060,7 @@
|
||||
$( '.install-theme-info, [data-slug="' + args.slug + '"]' ).removeClass( 'theme-install-failed' ).find( '.notice.notice-error' ).remove();
|
||||
|
||||
$document.trigger( 'wp-theme-installing', args );
|
||||
|
||||
|
||||
return wp.updates.ajax( 'install-theme', args );
|
||||
};
|
||||
|
||||
@@ -1062,7 +1079,7 @@
|
||||
var $card = $( '.wp-full-overlay-header, [data-slug=' + response.slug + ']' ),
|
||||
$message;
|
||||
|
||||
$document.trigger( 'wp-install-theme-success', response );
|
||||
$document.trigger( 'wp-theme-install-success', response );
|
||||
|
||||
$message = $card.find( '.button-primary' )
|
||||
.removeClass( 'updating-message' )
|
||||
@@ -1156,25 +1173,32 @@
|
||||
* decorated with an abort() method.
|
||||
*/
|
||||
wp.updates.deleteTheme = function( args ) {
|
||||
var $button = $( '.theme-actions .delete-theme' );
|
||||
var $button;
|
||||
|
||||
if ( 'themes' === pagenow ) {
|
||||
$button = $( '.theme-actions .delete-theme' );
|
||||
} else if ( 'themes-network' === pagenow ) {
|
||||
$button = $( '[data-slug="' + args.slug + '"]' ).find( '.row-actions a.delete' );
|
||||
}
|
||||
|
||||
args = _.extend( {
|
||||
success: wp.updates.deleteThemeSuccess,
|
||||
error: wp.updates.deleteThemeError
|
||||
}, args );
|
||||
|
||||
if ( $button.html() !== wp.updates.l10n.deleting ) {
|
||||
$button.data( 'originaltext', $button.html() );
|
||||
if ( $button && $button.html() !== wp.updates.l10n.deleting ) {
|
||||
$button
|
||||
.data( 'originaltext', $button.html() )
|
||||
.text( wp.updates.l10n.deleting );
|
||||
}
|
||||
|
||||
$button.text( wp.updates.l10n.deleting );
|
||||
wp.a11y.speak( wp.updates.l10n.deleting, 'polite' );
|
||||
|
||||
// Remove previous error messages, if any.
|
||||
$( '.theme-info .update-message' ).remove();
|
||||
|
||||
$document.trigger( 'wp-theme-deleting', args );
|
||||
|
||||
|
||||
return wp.updates.ajax( 'delete-theme', args );
|
||||
};
|
||||
|
||||
@@ -1234,7 +1258,7 @@
|
||||
|
||||
wp.a11y.speak( wp.updates.l10n.deleted, 'polite' );
|
||||
|
||||
$document.trigger( 'wp-delete-theme-success', response );
|
||||
$document.trigger( 'wp-theme-delete-success', response );
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1349,7 +1373,6 @@
|
||||
break;
|
||||
|
||||
default:
|
||||
window.console.error( 'Failed to execute queued update job.', job );
|
||||
break;
|
||||
}
|
||||
};
|
||||
@@ -1497,7 +1520,7 @@
|
||||
// Restore callbacks.
|
||||
response = wp.updates._addCallbacks( response, action );
|
||||
|
||||
wp.updates.queue.push( {
|
||||
wp.updates.queue.unshift( {
|
||||
action: action,
|
||||
|
||||
/*
|
||||
@@ -1525,7 +1548,7 @@
|
||||
* @returns {boolean} Whether there is an error that needs to be handled or not.
|
||||
*/
|
||||
wp.updates.maybeHandleCredentialError = function( response, action ) {
|
||||
if ( response.errorCode && 'unable_to_connect_to_filesystem' === response.errorCode ) {
|
||||
if ( wp.updates.shouldRequestFilesystemCredentials && response.errorCode && 'unable_to_connect_to_filesystem' === response.errorCode ) {
|
||||
wp.updates.credentialError( response, action );
|
||||
return true;
|
||||
}
|
||||
@@ -1554,8 +1577,12 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( _.isString( response ) ) {
|
||||
if ( _.isString( response ) && '-1' === response ) {
|
||||
error = wp.updates.l10n.nonceError;
|
||||
} else if ( _.isString( response ) ) {
|
||||
error = response;
|
||||
} else if ( 'undefined' !== typeof response.readyState && 0 === response.readyState ) {
|
||||
error = wp.updates.l10n.connectionError;
|
||||
} else if ( _.isString( response.responseText ) && '' !== response.responseText ) {
|
||||
error = response.responseText;
|
||||
} else if ( _.isString( response.statusText ) ) {
|
||||
@@ -1576,13 +1603,15 @@
|
||||
break;
|
||||
}
|
||||
|
||||
// Messages are escaped, remove HTML tags to make them more readable.
|
||||
error = error.replace( /<[\/a-z][^<>]*>/gi, '' );
|
||||
errorMessage = errorMessage.replace( '%s', error );
|
||||
|
||||
// Add admin notice.
|
||||
wp.updates.addAdminNotice( {
|
||||
id: 'unknown_error',
|
||||
className: 'notice-error is-dismissible',
|
||||
message: errorMessage
|
||||
message: _.escape( errorMessage )
|
||||
} );
|
||||
|
||||
// Remove the lock, and clear the queue.
|
||||
@@ -1592,14 +1621,16 @@
|
||||
// Change buttons of all running updates.
|
||||
$( '.button.updating-message' )
|
||||
.removeClass( 'updating-message' )
|
||||
.attr( 'aria-label', wp.updates.l10n.updateFailedShort )
|
||||
.removeAttr( 'aria-label' )
|
||||
.prop( 'disabled', true )
|
||||
.text( wp.updates.l10n.updateFailedShort );
|
||||
|
||||
$( '.updating-message:not(.button):not(.thickbox)' )
|
||||
.removeClass( 'updating-message notice-warning' )
|
||||
.addClass( 'notice-error' )
|
||||
.find( 'p' ).text( errorMessage );
|
||||
.find( 'p' )
|
||||
.removeAttr( 'aria-label' )
|
||||
.text( errorMessage );
|
||||
|
||||
wp.a11y.speak( errorMessage, 'assertive' );
|
||||
|
||||
@@ -1651,6 +1682,7 @@
|
||||
wp.updates.filesystemCredentials.ftp.connectionType = $( 'input[name="connection_type"]:checked' ).val();
|
||||
wp.updates.filesystemCredentials.ssh.publicKey = $( '#public_key' ).val();
|
||||
wp.updates.filesystemCredentials.ssh.privateKey = $( '#private_key' ).val();
|
||||
wp.updates.filesystemCredentials.fsNonce = $( '#_fs_nonce' ).val();
|
||||
wp.updates.filesystemCredentials.available = true;
|
||||
|
||||
// Unlock and invoke the queue.
|
||||
@@ -1691,14 +1723,24 @@
|
||||
if ( 'import' === pagenow ) {
|
||||
$updatingMessage.removeClass( 'updating-message' );
|
||||
} else if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
|
||||
$message = $( 'tr[data-plugin="' + job.data.plugin + '"]' ).find( '.update-message' );
|
||||
} else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
|
||||
$message = $( '.update-now.updating-message' );
|
||||
if ( 'update-plugin' === job.action ) {
|
||||
$message = $( 'tr[data-plugin="' + job.data.plugin + '"]' ).find( '.update-message' );
|
||||
} else if ( 'delete-plugin' === job.action ) {
|
||||
$message = $( '[data-plugin="' + job.data.plugin + '"]' ).find( '.row-actions a.delete' );
|
||||
}
|
||||
} else if ( 'themes' === pagenow || 'themes-network' === pagenow ) {
|
||||
if ( 'update-theme' === job.action ) {
|
||||
$message = $( '[data-slug="' + job.data.slug + '"]' ).find( '.update-message' );
|
||||
} else if ( 'delete-theme' === job.action && 'themes-network' === pagenow ) {
|
||||
$message = $( '[data-slug="' + job.data.slug + '"]' ).find( '.row-actions a.delete' );
|
||||
} else if ( 'delete-theme' === job.action && 'themes' === pagenow ) {
|
||||
$message = $( '.theme-actions .delete-theme' );
|
||||
}
|
||||
} else {
|
||||
$message = $updatingMessage;
|
||||
}
|
||||
|
||||
if ( $message ) {
|
||||
if ( $message && $message.hasClass( 'updating-message' ) ) {
|
||||
originalText = $message.data( 'originaltext' );
|
||||
|
||||
if ( 'undefined' === typeof originalText ) {
|
||||
@@ -1708,6 +1750,14 @@
|
||||
$message
|
||||
.removeClass( 'updating-message' )
|
||||
.html( originalText );
|
||||
|
||||
if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
|
||||
if ( 'update-plugin' === job.action ) {
|
||||
$message.attr( 'aria-label', wp.updates.l10n.updateNowLabel.replace( '%s', $message.data( 'name' ) ) );
|
||||
} else if ( 'install-plugin' === job.action ) {
|
||||
$message.attr( 'aria-label', wp.updates.l10n.installNowLabel.replace( '%s', $message.data( 'name' ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
|
||||
@@ -1938,7 +1988,6 @@
|
||||
break;
|
||||
|
||||
default:
|
||||
window.console.error( 'The page "%s" is not white-listed for bulk action handling.', pagenow );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1970,7 +2019,6 @@
|
||||
break;
|
||||
|
||||
default:
|
||||
window.console.error( 'Failed to identify bulk action: %s', bulkAction );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1982,17 +2030,17 @@
|
||||
$bulkActionForm.find( '.manage-column [type="checkbox"]' ).prop( 'checked', false );
|
||||
|
||||
$document.trigger( 'wp-' + type + '-bulk-' + bulkAction, itemsSelected );
|
||||
|
||||
|
||||
// Find all the checkboxes which have been checked.
|
||||
itemsSelected.each( function( index, element ) {
|
||||
var $checkbox = $( element ),
|
||||
var $checkbox = $( element ),
|
||||
$itemRow = $checkbox.parents( 'tr' );
|
||||
|
||||
// Un-check the box.
|
||||
$checkbox.prop( 'checked', false );
|
||||
|
||||
// Only add update-able items to the update queue.
|
||||
if ( 'update-selected' === bulkAction && ( ! $itemRow.hasClass( 'update' ) || $itemRow.find( 'notice-error' ).length ) ) {
|
||||
|
||||
// Un-check the box.
|
||||
$checkbox.prop( 'checked', false );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2008,21 +2056,25 @@
|
||||
|
||||
// Display bulk notification for updates of any kind.
|
||||
$document.on( 'wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error', function( event, response ) {
|
||||
var $bulkActionNotice, itemName;
|
||||
var $itemRow = $( '[data-slug="' + response.slug + '"]' ),
|
||||
$bulkActionNotice, itemName;
|
||||
|
||||
if ( 'wp-' + response.update + '-update-success' === event.type ) {
|
||||
success++;
|
||||
} else {
|
||||
itemName = response.pluginName ? response.pluginName : $( '[data-slug="' + response.slug + '"]' ).find( '.theme-title strong' ).text();
|
||||
itemName = response.pluginName ? response.pluginName : $itemRow.find( '.column-primary strong' ).text();
|
||||
|
||||
error++;
|
||||
errorMessages.push( itemName + ': ' + response.errorMessage );
|
||||
}
|
||||
|
||||
$itemRow.find( 'input[name="checked[]"]:checked' ).prop( 'checked', false );
|
||||
|
||||
wp.updates.adminNotice = wp.template( 'wp-bulk-updates-admin-notice' );
|
||||
|
||||
wp.updates.addAdminNotice( {
|
||||
id: 'bulk-action-notice',
|
||||
className: 'bulk-action-notice',
|
||||
successes: success,
|
||||
errors: error,
|
||||
errorMessages: errorMessages,
|
||||
@@ -2030,7 +2082,12 @@
|
||||
} );
|
||||
|
||||
$bulkActionNotice = $( '#bulk-action-notice' ).on( 'click', 'button', function() {
|
||||
$bulkActionNotice.find( 'ul' ).toggleClass( 'hidden' );
|
||||
// $( this ) is the clicked button, no need to get it again.
|
||||
$( this )
|
||||
.toggleClass( 'bulk-action-errors-collapsed' )
|
||||
.attr( 'aria-expanded', ! $( this ).hasClass( 'bulk-action-errors-collapsed' ) );
|
||||
// Show the errors list.
|
||||
$bulkActionNotice.find( '.bulk-action-errors' ).toggleClass( 'hidden' );
|
||||
} );
|
||||
|
||||
if ( error > 0 && ! wp.updates.queue.length ) {
|
||||
|
||||
3
wp-admin/js/updates.min.js
vendored
3
wp-admin/js/updates.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/js/user-profile.min.js
vendored
2
wp-admin/js/user-profile.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -72,9 +72,9 @@ if ( get_user_setting('uploader') || isset( $_GET['browser-uploader'] ) )
|
||||
<?php media_upload_form(); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
var post_id = <?php echo $post_id; ?>, shortform = 3;
|
||||
var post_id = <?php echo absint( $post_id ); ?>, shortform = 3;
|
||||
</script>
|
||||
<input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id; ?>" />
|
||||
<input type="hidden" name="post_id" id="post_id" value="<?php echo absint( $post_id ); ?>" />
|
||||
<?php wp_nonce_field('media-form'); ?>
|
||||
<div id="media-items" class="hide-if-no-js"></div>
|
||||
</form>
|
||||
|
||||
@@ -197,7 +197,7 @@ if ( ! wp_is_large_network( 'users' ) && apply_filters( 'show_network_site_users
|
||||
require( ABSPATH . 'wp-admin/admin-header.php' ); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
var current_site_id = <?php echo $id; ?>;
|
||||
var current_site_id = <?php echo absint( $id ); ?>;
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -96,9 +96,9 @@ default:
|
||||
wp_die( $error );
|
||||
|
||||
if ( ( ! empty( $_GET['networkwide'] ) && ! is_plugin_active_for_network($file) ) || ! is_plugin_active($file) )
|
||||
activate_plugin($file, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error
|
||||
activate_plugin($file, "plugin-editor.php?file=" . urlencode( $file ) . "&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error
|
||||
|
||||
wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto") );
|
||||
wp_redirect( self_admin_url("plugin-editor.php?file=" . urlencode( $file ) . "&a=te&scrollto=$scrollto") );
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -191,18 +191,18 @@ default:
|
||||
if ( is_plugin_active( $plugin ) ) {
|
||||
if ( is_writeable( $real_file ) ) {
|
||||
/* translators: %s: plugin file name */
|
||||
echo sprintf( __( 'Editing %s (active)' ), '<strong>' . $file . '</strong>' );
|
||||
echo sprintf( __( 'Editing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
} else {
|
||||
/* translators: %s: plugin file name */
|
||||
echo sprintf( __( 'Browsing %s (active)' ), '<strong>' . $file . '</strong>' );
|
||||
echo sprintf( __( 'Browsing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
}
|
||||
} else {
|
||||
if ( is_writeable( $real_file ) ) {
|
||||
/* translators: %s: plugin file name */
|
||||
echo sprintf( __( 'Editing %s (inactive)' ), '<strong>' . $file . '</strong>' );
|
||||
echo sprintf( __( 'Editing %s (inactive)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
} else {
|
||||
/* translators: %s: plugin file name */
|
||||
echo sprintf( __( 'Browsing %s (inactive)' ), '<strong>' . $file . '</strong>' );
|
||||
echo sprintf( __( 'Browsing %s (inactive)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
}
|
||||
}
|
||||
?></big>
|
||||
@@ -247,7 +247,7 @@ foreach ( $plugin_files as $plugin_file ) :
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo urlencode( $plugin_file ) ?>&plugin=<?php echo urlencode( $plugin ) ?>"><?php echo $plugin_file ?></a></li>
|
||||
<li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo urlencode( $plugin_file ) ?>&plugin=<?php echo urlencode( $plugin ) ?>"><?php echo esc_html( $plugin_file ); ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@ $pagenum = $wp_list_table->get_pagenum();
|
||||
|
||||
$action = $wp_list_table->current_action();
|
||||
|
||||
$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
|
||||
$plugin = isset($_REQUEST['plugin']) ? wp_unslash( $_REQUEST['plugin'] ) : '';
|
||||
$s = isset($_REQUEST['s']) ? urlencode( wp_unslash( $_REQUEST['s'] ) ) : '';
|
||||
|
||||
// Clean up request URI from temporary args for screen options/paging uri's to work as expected.
|
||||
@@ -39,10 +39,10 @@ if ( $action ) {
|
||||
|
||||
check_admin_referer('activate-plugin_' . $plugin);
|
||||
|
||||
$result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . $plugin), is_network_admin() );
|
||||
$result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . urlencode( $plugin ) ), is_network_admin() );
|
||||
if ( is_wp_error( $result ) ) {
|
||||
if ( 'unexpected_output' == $result->get_error_code() ) {
|
||||
$redirect = self_admin_url('plugins.php?error=true&charsout=' . strlen($result->get_error_data()) . '&plugin=' . $plugin . "&plugin_status=$status&paged=$page&s=$s");
|
||||
$redirect = self_admin_url('plugins.php?error=true&charsout=' . strlen($result->get_error_data()) . '&plugin=' . urlencode( $plugin ) . "&plugin_status=$status&paged=$page&s=$s");
|
||||
wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect));
|
||||
exit;
|
||||
} else {
|
||||
@@ -73,7 +73,7 @@ if ( $action ) {
|
||||
|
||||
check_admin_referer('bulk-plugins');
|
||||
|
||||
$plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
||||
$plugins = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array();
|
||||
|
||||
if ( is_network_admin() ) {
|
||||
foreach ( $plugins as $i => $plugin ) {
|
||||
@@ -122,9 +122,9 @@ if ( $action ) {
|
||||
check_admin_referer( 'bulk-plugins' );
|
||||
|
||||
if ( isset( $_GET['plugins'] ) )
|
||||
$plugins = explode( ',', $_GET['plugins'] );
|
||||
$plugins = explode( ',', wp_unslash( $_GET['plugins'] ) );
|
||||
elseif ( isset( $_POST['checked'] ) )
|
||||
$plugins = (array) $_POST['checked'];
|
||||
$plugins = (array) wp_unslash( $_POST['checked'] );
|
||||
else
|
||||
$plugins = array();
|
||||
|
||||
@@ -197,7 +197,7 @@ if ( $action ) {
|
||||
|
||||
check_admin_referer('bulk-plugins');
|
||||
|
||||
$plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
||||
$plugins = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array();
|
||||
// Do not deactivate plugins which are already deactivated.
|
||||
if ( is_network_admin() ) {
|
||||
$plugins = array_filter( $plugins, 'is_plugin_active_for_network' );
|
||||
@@ -234,7 +234,7 @@ if ( $action ) {
|
||||
check_admin_referer('bulk-plugins');
|
||||
|
||||
//$_POST = from the plugin form; $_GET = from the FTP details screen.
|
||||
$plugins = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array();
|
||||
$plugins = isset( $_REQUEST['checked'] ) ? (array) wp_unslash( $_REQUEST['checked'] ) : array();
|
||||
if ( empty( $plugins ) ) {
|
||||
wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
|
||||
exit;
|
||||
@@ -246,6 +246,14 @@ if ( $action ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Bail on all if any paths are invalid.
|
||||
// validate_file() returns truthy for invalid files
|
||||
$invalid_plugin_files = array_filter( $plugins, 'validate_file' );
|
||||
if ( $invalid_plugin_files ) {
|
||||
wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
|
||||
exit;
|
||||
}
|
||||
|
||||
include(ABSPATH . 'wp-admin/update.php');
|
||||
|
||||
$parent_file = 'plugins.php';
|
||||
|
||||
@@ -16,7 +16,9 @@ $submenu_file = 'edit.php';
|
||||
|
||||
wp_reset_vars( array( 'action' ) );
|
||||
|
||||
if ( isset( $_GET['post'] ) )
|
||||
if ( isset( $_GET['post'] ) && isset( $_POST['post_ID'] ) && (int) $_GET['post'] !== (int) $_POST['post_ID'] )
|
||||
wp_die( __( 'A post ID mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );
|
||||
elseif ( isset( $_GET['post'] ) )
|
||||
$post_id = $post_ID = (int) $_GET['post'];
|
||||
elseif ( isset( $_POST['post_ID'] ) )
|
||||
$post_id = $post_ID = (int) $_POST['post_ID'];
|
||||
@@ -38,6 +40,10 @@ if ( $post ) {
|
||||
$post_type_object = get_post_type_object( $post_type );
|
||||
}
|
||||
|
||||
if ( isset( $_POST['post_type'] ) && $post && $post_type !== $_POST['post_type'] ) {
|
||||
wp_die( __( 'A post type mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );
|
||||
}
|
||||
|
||||
if ( isset( $_POST['deletepost'] ) )
|
||||
$action = 'delete';
|
||||
elseif ( isset($_POST['wp-preview']) && 'dopreview' == $_POST['wp-preview'] )
|
||||
@@ -183,7 +189,7 @@ case 'editattachment':
|
||||
|
||||
// Update the thumbnail filename
|
||||
$newmeta = wp_get_attachment_metadata( $post_id, true );
|
||||
$newmeta['thumb'] = $_POST['thumb'];
|
||||
$newmeta['thumb'] = wp_basename( $_POST['thumb'] );
|
||||
|
||||
wp_update_attachment_metadata( $post_id, $newmeta );
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ if ( empty( $file ) ) {
|
||||
$relative_file = 'style.css';
|
||||
$file = $allowed_files['style.css'];
|
||||
} else {
|
||||
$relative_file = $file;
|
||||
$relative_file = wp_unslash( $file );
|
||||
$file = $theme->get_stylesheet_directory() . '/' . $relative_file;
|
||||
}
|
||||
|
||||
@@ -156,10 +156,12 @@ default:
|
||||
<div id="message" class="updated notice is-dismissible"><p><?php _e( 'File edited successfully.' ) ?></p></div>
|
||||
<?php endif;
|
||||
|
||||
$description = get_file_description( $relative_file );
|
||||
$file_description = get_file_description( $relative_file );
|
||||
$file_show = array_search( $file, array_filter( $allowed_files ) );
|
||||
if ( $description != $file_show )
|
||||
$description .= ' <span>(' . $file_show . ')</span>';
|
||||
$description = esc_html( $file_description );
|
||||
if ( $file_description != $file_show ) {
|
||||
$description .= ' <span>(' . esc_html( $file_show ) . ')</span>';
|
||||
}
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h1><?php echo esc_html( $title ); ?></h1>
|
||||
@@ -230,9 +232,9 @@ if ( $allowed_files ) :
|
||||
echo "\t<ul>\n";
|
||||
}
|
||||
|
||||
$file_description = get_file_description( $filename );
|
||||
$file_description = esc_html( get_file_description( $filename ) );
|
||||
if ( $filename !== basename( $absolute_filename ) || $file_description !== $filename ) {
|
||||
$file_description .= '<br /><span class="nonessential">(' . $filename . ')</span>';
|
||||
$file_description .= '<br /><span class="nonessential">(' . esc_html( $filename ) . ')</span>';
|
||||
}
|
||||
|
||||
if ( $absolute_filename === $file ) {
|
||||
|
||||
@@ -322,7 +322,7 @@ $can_install = current_user_can( 'install_themes' );
|
||||
</tr>
|
||||
<?php foreach ( $broken_themes as $broken_theme ) : ?>
|
||||
<tr>
|
||||
<td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : $broken_theme->get_stylesheet(); ?></td>
|
||||
<td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : esc_html( $broken_theme->get_stylesheet() ); ?></td>
|
||||
<td><?php echo $broken_theme->errors()->get_error_message(); ?></td>
|
||||
<?php
|
||||
if ( $can_delete ) {
|
||||
|
||||
@@ -253,6 +253,8 @@ function list_plugin_updates() {
|
||||
<tbody class="plugins">
|
||||
<?php
|
||||
foreach ( (array) $plugins as $plugin_file => $plugin_data ) {
|
||||
$plugin_data = (object) _get_plugin_data_markup_translate( $plugin_file, (array) $plugin_data, false, true );
|
||||
|
||||
// Get plugin compat for running version of WordPress.
|
||||
if ( isset($plugin_data->update->tested) && version_compare($plugin_data->update->tested, $cur_wp_version, '>=') ) {
|
||||
$compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: 100%% (according to its author)'), $cur_wp_version);
|
||||
|
||||
@@ -181,7 +181,7 @@ include(ABSPATH . 'wp-admin/admin-header.php');
|
||||
<p><strong><?php _e('User updated.') ?></strong></p>
|
||||
<?php endif; ?>
|
||||
<?php if ( $wp_http_referer && false === strpos( $wp_http_referer, 'user-new.php' ) && ! IS_PROFILE_PAGE ) : ?>
|
||||
<p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php _e('← Back to Users'); ?></a></p>
|
||||
<p><a href="<?php echo esc_url( wp_validate_redirect( esc_url_raw( $wp_http_referer ), self_admin_url( 'users.php' ) ) ); ?>"><?php _e('← Back to Users'); ?></a></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -70,7 +70,7 @@ if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
|
||||
add_existing_user_to_blog( array( 'user_id' => $user_id, 'role' => $_REQUEST[ 'role' ] ) );
|
||||
$redirect = add_query_arg( array( 'update' => 'addnoconfirmation' , 'user_id' => $user_id ), 'user-new.php' );
|
||||
} else {
|
||||
$newuser_key = substr( md5( $user_id ), 0, 5 );
|
||||
$newuser_key = wp_generate_password( 20, false );
|
||||
add_option( 'new_user_' . $newuser_key, array( 'user_id' => $user_id, 'email' => $user_details->user_email, 'role' => $_REQUEST[ 'role' ] ) );
|
||||
|
||||
$roles = get_editable_roles();
|
||||
|
||||
@@ -22,6 +22,8 @@ if ( ! current_user_can( 'edit_theme_options' ) ) {
|
||||
|
||||
$widgets_access = get_user_setting( 'widgets_access' );
|
||||
if ( isset($_GET['widgets-access']) ) {
|
||||
check_admin_referer( 'widgets-access' );
|
||||
|
||||
$widgets_access = 'on' == $_GET['widgets-access'] ? 'on' : 'off';
|
||||
set_user_setting( 'widgets_access', $widgets_access );
|
||||
}
|
||||
|
||||
34
wp-content/themes/twentysixteen/404.php
Normal file
34
wp-content/themes/twentysixteen/404.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying 404 pages (not found)
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Sixteen
|
||||
* @since Twenty Sixteen 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary" class="content-area">
|
||||
<main id="main" class="site-main" role="main">
|
||||
|
||||
<section class="error-404 not-found">
|
||||
<header class="page-header">
|
||||
<h1 class="page-title"><?php _e( 'Oops! That page can’t be found.', 'twentysixteen' ); ?></h1>
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<div class="page-content">
|
||||
<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentysixteen' ); ?></p>
|
||||
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .page-content -->
|
||||
</section><!-- .error-404 -->
|
||||
|
||||
</main><!-- .site-main -->
|
||||
|
||||
<?php get_sidebar( 'content-bottom' ); ?>
|
||||
|
||||
</div><!-- .content-area -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
||||
65
wp-content/themes/twentysixteen/archive.php
Normal file
65
wp-content/themes/twentysixteen/archive.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying archive pages
|
||||
*
|
||||
* Used to display archive-type pages if nothing more specific matches a query.
|
||||
* For example, puts together date-based pages if no date.php file exists.
|
||||
*
|
||||
* If you'd like to further customize these archive views, you may create a
|
||||
* new template file for each one. For example, tag.php (Tag archives),
|
||||
* category.php (Category archives), author.php (Author archives), etc.
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Sixteen
|
||||
* @since Twenty Sixteen 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="primary" class="content-area">
|
||||
<main id="main" class="site-main" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header">
|
||||
<?php
|
||||
the_archive_title( '<h1 class="page-title">', '</h1>' );
|
||||
the_archive_description( '<div class="taxonomy-description">', '</div>' );
|
||||
?>
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<?php
|
||||
// Start the Loop.
|
||||
while ( have_posts() ) : the_post();
|
||||
|
||||
/*
|
||||
* Include the Post-Format-specific template for the content.
|
||||
* If you want to override this in a child theme, then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'template-parts/content', get_post_format() );
|
||||
|
||||
// End the loop.
|
||||
endwhile;
|
||||
|
||||
// Previous/next page navigation.
|
||||
the_posts_pagination( array(
|
||||
'prev_text' => __( 'Previous page', 'twentysixteen' ),
|
||||
'next_text' => __( 'Next page', 'twentysixteen' ),
|
||||
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
|
||||
) );
|
||||
|
||||
// If no content, include the "No posts found" template.
|
||||
else :
|
||||
get_template_part( 'template-parts/content', 'none' );
|
||||
|
||||
endif;
|
||||
?>
|
||||
|
||||
</main><!-- .site-main -->
|
||||
</div><!-- .content-area -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_footer(); ?>
|
||||
79
wp-content/themes/twentysixteen/comments.php
Normal file
79
wp-content/themes/twentysixteen/comments.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying comments
|
||||
*
|
||||
* The area of the page that contains both current comments
|
||||
* and the comment form.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Sixteen
|
||||
* @since Twenty Sixteen 1.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* If the current post is protected by a password and
|
||||
* the visitor has not yet entered the password we will
|
||||
* return early without loading the comments.
|
||||
*/
|
||||
if ( post_password_required() ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="comments" class="comments-area">
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<h2 class="comments-title">
|
||||
<?php
|
||||
$comments_number = get_comments_number();
|
||||
if ( 1 === $comments_number ) {
|
||||
/* translators: %s: post title */
|
||||
printf( _x( 'One thought on “%s”', 'comments title', 'twentysixteen' ), get_the_title() );
|
||||
} else {
|
||||
printf(
|
||||
/* translators: 1: number of comments, 2: post title */
|
||||
_nx(
|
||||
'%1$s thought on “%2$s”',
|
||||
'%1$s thoughts on “%2$s”',
|
||||
$comments_number,
|
||||
'comments title',
|
||||
'twentysixteen'
|
||||
),
|
||||
number_format_i18n( $comments_number ),
|
||||
get_the_title()
|
||||
);
|
||||
}
|
||||
?>
|
||||
</h2>
|
||||
|
||||
<?php the_comments_navigation(); ?>
|
||||
|
||||
<ol class="comment-list">
|
||||
<?php
|
||||
wp_list_comments( array(
|
||||
'style' => 'ol',
|
||||
'short_ping' => true,
|
||||
'avatar_size' => 42,
|
||||
) );
|
||||
?>
|
||||
</ol><!-- .comment-list -->
|
||||
|
||||
<?php the_comments_navigation(); ?>
|
||||
|
||||
<?php endif; // Check for have_comments(). ?>
|
||||
|
||||
<?php
|
||||
// If comments are closed and there are comments, let's leave a little note, shall we?
|
||||
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
|
||||
?>
|
||||
<p class="no-comments"><?php _e( 'Comments are closed.', 'twentysixteen' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
comment_form( array(
|
||||
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
|
||||
'title_reply_after' => '</h2>',
|
||||
) );
|
||||
?>
|
||||
|
||||
</div><!-- .comments-area -->
|
||||
547
wp-content/themes/twentysixteen/css/editor-style.css
Normal file
547
wp-content/themes/twentysixteen/css/editor-style.css
Normal file
@@ -0,0 +1,547 @@
|
||||
/*
|
||||
Theme Name: Twenty Sixteen
|
||||
Description: Used to style the TinyMCE editor.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Table of Contents:
|
||||
*
|
||||
* 1.0 - Body
|
||||
* 2.0 - Typography
|
||||
* 3.0 - Elements
|
||||
* 4.0 - Alignment
|
||||
* 5.0 - Caption
|
||||
* 6.0 - Galleries
|
||||
* 7.0 - Audio / Video
|
||||
* 8.0 - RTL
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 1.0 - Body
|
||||
*/
|
||||
|
||||
body {
|
||||
color: #1a1a1a;
|
||||
font-family: Merriweather, Georgia, serif;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: 1.75;
|
||||
margin: 20px 40px;
|
||||
max-width: 600px;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
body.post-type-page {
|
||||
max-width: 840px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 2.0 - Typography
|
||||
*/
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
clear: both;
|
||||
font-weight: 900;
|
||||
margin: 56px 0 28px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 33px;
|
||||
line-height: 1.2727272727;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 28px;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 23px;
|
||||
line-height: 1.2173913043;
|
||||
}
|
||||
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: 19px;
|
||||
line-height: 1.1052631579;
|
||||
}
|
||||
|
||||
h4 {
|
||||
letter-spacing: 0.13333em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
h1:first-child,
|
||||
h2:first-child,
|
||||
h3:first-child,
|
||||
h4:first-child,
|
||||
h5:first-child,
|
||||
h6:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 0 28px;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dfn,
|
||||
cite,
|
||||
em,
|
||||
i {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 4px solid #1a1a1a;
|
||||
color: #686868;
|
||||
font-size: 19px;
|
||||
font-style: italic;
|
||||
line-height: 1.4736842105;
|
||||
margin-bottom: 28px;
|
||||
overflow: hidden;
|
||||
padding: 0 0 0 24px;
|
||||
}
|
||||
|
||||
blockquote:not(.alignleft):not(.alignright) {
|
||||
margin-left: -28px;
|
||||
}
|
||||
|
||||
blockquote blockquote:not(.alignleft):not(.alignright) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote:before,
|
||||
blockquote:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
|
||||
blockquote:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
blockquote > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
blockquote cite,
|
||||
blockquote small {
|
||||
color: #1a1a1a;
|
||||
font-size: 16px;
|
||||
line-height: 1.75;
|
||||
}
|
||||
|
||||
blockquote em,
|
||||
blockquote i,
|
||||
blockquote cite {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
blockquote strong,
|
||||
blockquote b {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
blockquote.alignleft,
|
||||
blockquote.alignright {
|
||||
border: 0 solid #1a1a1a;
|
||||
border-top-width: 4px;
|
||||
padding: 18px 0 0;
|
||||
width: -webkit-calc(50% - 14px);
|
||||
width: calc(50% - 14px);
|
||||
}
|
||||
|
||||
address {
|
||||
font-style: italic;
|
||||
margin: 0 0 28px;
|
||||
}
|
||||
|
||||
code,
|
||||
kbd,
|
||||
tt,
|
||||
var,
|
||||
samp,
|
||||
pre {
|
||||
font-family: Inconsolata, monospace;
|
||||
}
|
||||
|
||||
pre {
|
||||
border: 1px solid #d1d1d1;
|
||||
font-size: 16px;
|
||||
line-height: 1.3125;
|
||||
margin: 0 0 28px;
|
||||
max-width: 100%;
|
||||
overflow: auto;
|
||||
padding: 14px;
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: #d1d1d1;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: 1px dotted #d1d1d1;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
mark,
|
||||
ins {
|
||||
background: #007acc;
|
||||
color: #fff;
|
||||
padding: 2px 4px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
sup,
|
||||
sub {
|
||||
font-size: 75%;
|
||||
height: 0;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
top: -6px;
|
||||
}
|
||||
|
||||
sup {
|
||||
bottom: -3px;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
big {
|
||||
font-size: 125%;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 3.0 - Elements
|
||||
*/
|
||||
|
||||
hr {
|
||||
background-color: #d1d1d1;
|
||||
border: 0;
|
||||
height: 1px;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
margin: 0 0 28px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: disc;
|
||||
}
|
||||
|
||||
ol {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
li > ul,
|
||||
li > ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
li > ul,
|
||||
blockquote > ul {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
li > ol,
|
||||
blockquote > ol {
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin: 0 0 28px;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin: 0 0 28px;
|
||||
}
|
||||
|
||||
table,
|
||||
th,
|
||||
td,
|
||||
.mce-item-table,
|
||||
.mce-item-table th,
|
||||
.mce-item-table td {
|
||||
border: 1px solid #d1d1d1;
|
||||
}
|
||||
|
||||
table a {
|
||||
color: #007acc;
|
||||
}
|
||||
|
||||
table,
|
||||
.mce-item-table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
border-width: 1px 0 0 1px;
|
||||
margin: 0 0 28px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table th,
|
||||
.mce-item-table th,
|
||||
table caption {
|
||||
border-width: 0 1px 1px 0;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
padding: 7px;
|
||||
text-align: left;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
table td,
|
||||
.mce-item-table td {
|
||||
border-width: 0 1px 1px 0;
|
||||
font-size: 16px;
|
||||
padding: 7px;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
a img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
del {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
a {
|
||||
box-shadow: 0 1px 0 0 currentColor;
|
||||
color: #007acc;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #d1d1d1;
|
||||
margin: 0 0 28px;
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 4.0 - Alignment
|
||||
*/
|
||||
|
||||
.alignleft {
|
||||
float: left;
|
||||
margin: 6px 28px 28px 0;
|
||||
}
|
||||
|
||||
.alignright {
|
||||
float: right;
|
||||
margin: 6px 0 28px 28px;
|
||||
}
|
||||
|
||||
.aligncenter {
|
||||
clear: both;
|
||||
display: block;
|
||||
margin: 0 auto 28px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 5.0 - Caption
|
||||
*/
|
||||
|
||||
.wp-caption {
|
||||
background: transparent;
|
||||
border: none;
|
||||
margin-bottom: 28px;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
.wp-caption-text,
|
||||
.wp-caption-dd {
|
||||
color: #686868;
|
||||
font-size: 13px;
|
||||
font-style: italic;
|
||||
line-height: 1.6153846154;
|
||||
padding-top: 7px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 6.0 - Galleries
|
||||
*/
|
||||
|
||||
.mce-content-body .wpview-wrap {
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.gallery {
|
||||
margin: 0 -1.1666667%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.gallery .gallery-item {
|
||||
display: inline-block;
|
||||
max-width: 33.33%;
|
||||
padding: 0 1.1400652% 2.2801304%;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.gallery-columns-1 .gallery-item {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.gallery-columns-2 .gallery-item {
|
||||
max-width: 50%;
|
||||
}
|
||||
|
||||
.gallery-columns-4 .gallery-item {
|
||||
max-width: 25%;
|
||||
}
|
||||
|
||||
.gallery-columns-5 .gallery-item {
|
||||
max-width: 20%;
|
||||
}
|
||||
|
||||
.gallery-columns-6 .gallery-item {
|
||||
max-width: 16.66%;
|
||||
}
|
||||
|
||||
.gallery-columns-7 .gallery-item {
|
||||
max-width: 14.28%;
|
||||
}
|
||||
|
||||
.gallery-columns-8 .gallery-item {
|
||||
max-width: 12.5%;
|
||||
}
|
||||
|
||||
.gallery-columns-9 .gallery-item {
|
||||
max-width: 11.11%;
|
||||
}
|
||||
|
||||
.gallery .gallery-caption {
|
||||
font-size: 13px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.gallery-columns-6 .gallery-caption,
|
||||
.gallery-columns-7 .gallery-caption,
|
||||
.gallery-columns-8 .gallery-caption,
|
||||
.gallery-columns-9 .gallery-caption {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 7.0 - Audio / Video
|
||||
*/
|
||||
|
||||
.wp-audio-shortcode a,
|
||||
.wp-playlist a {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.mce-content-body .wp-audio-playlist {
|
||||
margin: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.mce-content-body .wp-playlist-tracks {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.mce-content-body .wp-playlist-item {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.mce-content-body .wp-playlist-item-length {
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 8.0 - RTL
|
||||
*/
|
||||
|
||||
.rtl blockquote {
|
||||
border: 0 solid #1a1a1a;
|
||||
border-right-width: 4px;
|
||||
}
|
||||
|
||||
.rtl blockquote.alignleft,
|
||||
.rtl blockquote.alignright {
|
||||
border: 0 solid #1a1a1a;
|
||||
border-top-width: 4px;
|
||||
}
|
||||
|
||||
.rtl blockquote:not(.alignleft):not(.alignright) {
|
||||
margin-right: -28px;
|
||||
padding: 0 24px 0 0;
|
||||
}
|
||||
|
||||
.rtl blockquote blockquote:not(.alignleft):not(.alignright) {
|
||||
margin-right: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.rtl li > ul,
|
||||
.rtl blockquote > ul {
|
||||
margin-right: 20px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.rtl li > ol,
|
||||
.rtl blockquote > ol {
|
||||
margin-right: 24px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.rtl table th,
|
||||
.rtl .mce-item-table th,
|
||||
.rtl table caption {
|
||||
text-align: right;
|
||||
}
|
||||
48
wp-content/themes/twentysixteen/css/ie.css
Normal file
48
wp-content/themes/twentysixteen/css/ie.css
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Theme Name: Twenty Sixteen
|
||||
Description: Global Styles for older IE versions (previous to IE10).
|
||||
*/
|
||||
|
||||
.site-header-main:before,
|
||||
.site-header-main:after,
|
||||
.site-footer:before,
|
||||
.site-footer:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
|
||||
.site-header-main:after,
|
||||
.site-footer:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 56.875em) {
|
||||
.site-branding,
|
||||
.site-info {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.site-header-menu,
|
||||
.site-footer .social-navigation {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.site-footer .social-navigation {
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
.rtl .site-branding,
|
||||
.rtl .site-info {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.rtl .site-header-menu,
|
||||
.rtl .site-footer .social-navigation {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.rtl .site-footer .social-navigation {
|
||||
margin-right: 7px;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
176
wp-content/themes/twentysixteen/css/ie7.css
Normal file
176
wp-content/themes/twentysixteen/css/ie7.css
Normal file
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
Theme Name: Twenty Sixteen
|
||||
Description: IE7 specific style.
|
||||
*/
|
||||
|
||||
.site-inner {
|
||||
max-width: 656px;
|
||||
}
|
||||
|
||||
.post-navigation,
|
||||
.pagination,
|
||||
.image-navigation,
|
||||
.entry-header,
|
||||
.entry-summary,
|
||||
.entry-content,
|
||||
.entry-footer,
|
||||
.page-header,
|
||||
.page-content,
|
||||
.post-thumbnail,
|
||||
.content-bottom-widgets,
|
||||
.comments-area {
|
||||
margin-right: 28px;
|
||||
margin-left: 28px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.site-header,
|
||||
.sidebar,
|
||||
.site-footer,
|
||||
.widecolumn {
|
||||
padding-right: 28px;
|
||||
padding-left: 28px;
|
||||
}
|
||||
|
||||
.search-submit {
|
||||
height: auto;
|
||||
margin-top: 28px;
|
||||
padding: 15px 0 8px;
|
||||
position: relative;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.search-submit .screen-reader-text {
|
||||
height: auto;
|
||||
position: relative !important;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.image-navigation .nav-previous,
|
||||
.image-navigation .nav-next,
|
||||
.comment-navigation .nav-previous,
|
||||
.comment-navigation .nav-next {
|
||||
*display: inline;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.image-navigation .nav-previous + .nav-next,
|
||||
.comment-navigation .nav-previous + .nav-next {
|
||||
margin-left: 14px;
|
||||
}
|
||||
|
||||
.pagination .nav-links {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.pagination .page-numbers {
|
||||
line-height: 1;
|
||||
margin: -4px 14px 0;
|
||||
padding: 18px 0;
|
||||
}
|
||||
|
||||
.pagination .prev,
|
||||
.pagination .next {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
height: auto;
|
||||
left: 0;
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
padding: 18px 14px;
|
||||
position: relative;
|
||||
right: 0;
|
||||
text-transform: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-navigation ul ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.social-navigation {
|
||||
margin-top: 1.75em;
|
||||
}
|
||||
|
||||
.social-navigation a {
|
||||
height: auto;
|
||||
padding: 3px 7px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.social-navigation .screen-reader-text {
|
||||
height: auto;
|
||||
position: relative !important;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.site-header-main {
|
||||
overflow : hidden;
|
||||
zoom : 1;
|
||||
}
|
||||
|
||||
.entry-footer > span {
|
||||
margin-right: 14px;
|
||||
}
|
||||
|
||||
.site-info .site-title {
|
||||
font-size: 13px;
|
||||
margin-right: 14px;
|
||||
}
|
||||
|
||||
.gallery-item {
|
||||
max-width: 30%;
|
||||
}
|
||||
|
||||
.gallery-columns-1 .gallery-item {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.gallery-columns-2 .gallery-item {
|
||||
max-width: 46%;
|
||||
}
|
||||
|
||||
.gallery-columns-4 .gallery-item {
|
||||
max-width: 22%;
|
||||
}
|
||||
|
||||
.gallery-columns-5 .gallery-item {
|
||||
max-width: 17%;
|
||||
}
|
||||
|
||||
.gallery-columns-6 .gallery-item {
|
||||
max-width: 13.5%;
|
||||
}
|
||||
|
||||
.gallery-columns-7 .gallery-item {
|
||||
max-width: 11%;
|
||||
}
|
||||
|
||||
.gallery-columns-8 .gallery-item {
|
||||
max-width: 9.5%;
|
||||
}
|
||||
|
||||
.gallery-columns-9 .gallery-item {
|
||||
max-width: 8%;
|
||||
}
|
||||
|
||||
.rtl .image-navigation .nav-previous + .nav-next,
|
||||
.rtl .comment-navigation .nav-previous + .nav-next {
|
||||
margin-right: 14px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.rtl .entry-footer > span {
|
||||
margin-right: 14px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.rtl .site-info .site-title {
|
||||
margin-right: 0;
|
||||
margin-left: 14px;
|
||||
}
|
||||
222
wp-content/themes/twentysixteen/css/ie8.css
Normal file
222
wp-content/themes/twentysixteen/css/ie8.css
Normal file
@@ -0,0 +1,222 @@
|
||||
/*
|
||||
Theme Name: Twenty Sixteen
|
||||
Description: IE8 specific style.
|
||||
*/
|
||||
|
||||
code {
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.entry-content a,
|
||||
.entry-summary a,
|
||||
.taxonomy-description a,
|
||||
.logged-in-as a,
|
||||
.comment-content a,
|
||||
.pingback .comment-body > a,
|
||||
.textwidget a,
|
||||
.entry-footer a:hover,
|
||||
.site-info a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.entry-content a:hover,
|
||||
.entry-content a:focus,
|
||||
.entry-summary a:hover,
|
||||
.entry-summary a:focus,
|
||||
.taxonomy-description a:hover,
|
||||
.taxonomy-description a:focus,
|
||||
.logged-in-as a:hover,
|
||||
.logged-in-as a:focus,
|
||||
.comment-content a:hover,
|
||||
.comment-content a:focus,
|
||||
.pingback .comment-body > a:hover,
|
||||
.pingback .comment-body > a:focus,
|
||||
.textwidget a:hover,
|
||||
.textwidget a:focus,
|
||||
.entry-content .wp-audio-shortcode a,
|
||||
.entry-content .wp-playlist a,
|
||||
.page-links a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.site {
|
||||
margin: 21px;
|
||||
}
|
||||
|
||||
.site-inner {
|
||||
max-width: 710px;
|
||||
}
|
||||
|
||||
.site-header {
|
||||
padding-top: 3.9375em;
|
||||
padding-bottom: 3.9375em;
|
||||
}
|
||||
|
||||
.site-branding {
|
||||
float: left;
|
||||
margin-top: 1.3125em;
|
||||
margin-bottom: 1.3125em;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
font-size: 28px;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.site-description {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.menu-toggle {
|
||||
float: right;
|
||||
font-size: 16px;
|
||||
margin: 1.3125em 0;
|
||||
padding: 0.8125em 0.875em 0.6875em;
|
||||
}
|
||||
|
||||
.site-header-menu {
|
||||
clear: both;
|
||||
margin: 0;
|
||||
padding: 1.3125em 0;
|
||||
}
|
||||
|
||||
.site-header .main-navigation + .social-navigation {
|
||||
margin-top: 2.625em;
|
||||
}
|
||||
|
||||
.header-image {
|
||||
margin: 1.3125em 0;
|
||||
}
|
||||
|
||||
.site-main {
|
||||
margin-bottom: 5.25em;
|
||||
}
|
||||
|
||||
.post-navigation {
|
||||
margin-bottom: 5.25em;
|
||||
}
|
||||
|
||||
.post-navigation .post-title {
|
||||
font-size: 28px;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
margin: 0 7.6923% 4.421052632em;
|
||||
}
|
||||
|
||||
.pagination .nav-links:before,
|
||||
.pagination .nav-links:after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* restore screen-reader-text */
|
||||
.pagination .current .screen-reader-text {
|
||||
position: absolute !important;
|
||||
}
|
||||
|
||||
.pagination .page-numbers {
|
||||
display: inline-block;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.image-navigation .nav-previous,
|
||||
.image-navigation .nav-next,
|
||||
.comment-navigation .nav-previous,
|
||||
.comment-navigation .nav-next {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.image-navigation .nav-previous + .nav-next:before,
|
||||
.comment-navigation .nav-previous + .nav-next:before {
|
||||
content: "\002f";
|
||||
display: inline-block;
|
||||
filter: alpha(opacity=70);
|
||||
padding: 0 0.538461538em;
|
||||
}
|
||||
|
||||
.site-main > article {
|
||||
margin-bottom: 5.25em;
|
||||
}
|
||||
|
||||
.entry-title {
|
||||
font-size: 33px;
|
||||
line-height: 1.2727272727;
|
||||
margin-bottom: 0.8484848485em;
|
||||
}
|
||||
|
||||
.entry-content blockquote.alignleft,
|
||||
.entry-content blockquote.alignright {
|
||||
border-width: 4px 0 0 0;
|
||||
padding: 0.9473684211em 0 0;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.entry-footer > span:after {
|
||||
content: "\002f";
|
||||
display: inline-block;
|
||||
filter: alpha(opacity=70);
|
||||
padding: 0 0.538461538em;
|
||||
}
|
||||
|
||||
.updated {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.updated.published {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.comment-author {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.comment-author .avatar {
|
||||
height: 42px;
|
||||
position: relative;
|
||||
top: 0.25em;
|
||||
width: 42px;
|
||||
}
|
||||
|
||||
.comment-list .children > li {
|
||||
padding-left: 1.75em;
|
||||
}
|
||||
|
||||
.comment-list + .comment-respond,
|
||||
.comment-navigation + .comment-respond {
|
||||
padding-top: 3.5em;
|
||||
}
|
||||
|
||||
.comment-reply-link {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.comments-area,
|
||||
.widget,
|
||||
.content-bottom-widgets .widget-area {
|
||||
margin-bottom: 5.25em;
|
||||
}
|
||||
|
||||
.sidebar,
|
||||
.widecolumn {
|
||||
margin-bottom: 5.25em;
|
||||
}
|
||||
|
||||
.site-footer .main-navigation,
|
||||
.site-footer .social-navigation {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.rtl .site-branding {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.rtl .menu-toggle {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.rtl .comment-list .children > li {
|
||||
padding-right: 1.75em;
|
||||
padding-left: 0;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user