Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d87e4a8b8 |
@@ -33,126 +33,6 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
|
||||
<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.9.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.9.15' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress version number */
|
||||
__( '<strong>Version %s</strong> addressed some security issues.' ),
|
||||
'4.9.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.9.14' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress version number */
|
||||
__( '<strong>Version %s</strong> addressed some security issues.' ),
|
||||
'4.9.13'
|
||||
);
|
||||
?>
|
||||
<?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.9.13' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress version number */
|
||||
__( '<strong>Version %s</strong> addressed some security issues.' ),
|
||||
'4.9.12'
|
||||
);
|
||||
?>
|
||||
<?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.9.12' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress version number */
|
||||
__( '<strong>Version %s</strong> addressed some security issues.' ),
|
||||
'4.9.11'
|
||||
);
|
||||
?>
|
||||
<?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.9.11' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: WordPress version number */
|
||||
__( '<strong>Version %s</strong> addressed some security issues.' ),
|
||||
'4.9.10'
|
||||
);
|
||||
?>
|
||||
<?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.9.10' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: %s: WordPress version number */
|
||||
|
||||
@@ -67,6 +67,7 @@ $core_actions_post = array(
|
||||
'get-post-thumbnail-html', 'get-community-events', 'edit-theme-plugin-file',
|
||||
'wp-privacy-export-personal-data',
|
||||
'wp-privacy-erase-personal-data',
|
||||
'update-try-gutenberg-panel',
|
||||
);
|
||||
|
||||
// Deprecated
|
||||
|
||||
@@ -22,7 +22,7 @@ if ( defined( 'ABSPATH' ) ) {
|
||||
|
||||
require_once( ABSPATH . 'wp-admin/admin.php' );
|
||||
|
||||
header( 'Content-Type: text/plain; charset=' . get_option( 'blog_charset' ) );
|
||||
header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
|
||||
|
||||
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
|
||||
include( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
|
||||
|
||||
@@ -764,6 +764,7 @@ img.emoji {
|
||||
|
||||
/* @todo can we combine these into a class or use an existing dashicon one? */
|
||||
.welcome-panel .welcome-panel-close:before,
|
||||
.try-gutenberg-panel .try-gutenberg-panel-close:before,
|
||||
.tagchecklist .ntdelbutton .remove-tag-icon:before,
|
||||
#bulk-titles div a:before,
|
||||
.notice-dismiss:before {
|
||||
|
||||
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
@@ -764,6 +764,7 @@ img.emoji {
|
||||
|
||||
/* @todo can we combine these into a class or use an existing dashicon one? */
|
||||
.welcome-panel .welcome-panel-close:before,
|
||||
.try-gutenberg-panel .try-gutenberg-panel-close:before,
|
||||
.tagchecklist .ntdelbutton .remove-tag-icon:before,
|
||||
#bulk-titles div a:before,
|
||||
.notice-dismiss:before {
|
||||
|
||||
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
@@ -98,7 +98,8 @@
|
||||
}
|
||||
|
||||
/* Welcome Panel */
|
||||
.welcome-panel {
|
||||
.welcome-panel,
|
||||
.try-gutenberg-panel {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
margin: 16px 0;
|
||||
@@ -110,7 +111,8 @@
|
||||
line-height: 2.1em;
|
||||
}
|
||||
|
||||
.welcome-panel h2 {
|
||||
.welcome-panel h2,
|
||||
.try-gutenberg-panel h2 {
|
||||
margin: 0;
|
||||
font-size: 21px;
|
||||
font-weight: 400;
|
||||
@@ -122,24 +124,41 @@
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.welcome-panel li {
|
||||
.try-gutenberg-panel h3 {
|
||||
margin: 17px 0 0;
|
||||
font-size: 16px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.welcome-panel li,
|
||||
.try-gutenberg-panel li {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.welcome-panel p {
|
||||
.welcome-panel p,
|
||||
.try-gutenberg-panel p {
|
||||
color: #72777c;
|
||||
}
|
||||
|
||||
.welcome-panel a {
|
||||
.welcome-panel a,
|
||||
.try-gutenberg-action a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.welcome-panel .about-description {
|
||||
.welcome-panel .about-description,
|
||||
.try-gutenberg-panel .about-description {
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.welcome-panel .welcome-panel-close {
|
||||
.try-gutenberg-panel-content hr {
|
||||
margin: 20px -23px 0 -23px;
|
||||
border-top: 1px solid #f3f4f5;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.welcome-panel .welcome-panel-close,
|
||||
.try-gutenberg-panel .try-gutenberg-panel-close {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: 10px;
|
||||
@@ -150,7 +169,8 @@
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.welcome-panel .welcome-panel-close:before {
|
||||
.welcome-panel .welcome-panel-close:before,
|
||||
.try-gutenberg-panel .try-gutenberg-panel-close:before {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 0;
|
||||
@@ -165,11 +185,23 @@
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.welcome-panel-content {
|
||||
.welcome-panel-content,
|
||||
.try-gutenberg-panel-content {
|
||||
margin: 0 13px;
|
||||
max-width: 1500px;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel img {
|
||||
margin-top: 23px;
|
||||
width: calc( 100% - 40px );
|
||||
border: 1px solid #f3f4f5;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .install-now.updating-message:before,
|
||||
.try-gutenberg-panel .install-now.updated-message:before {
|
||||
margin-top: 11px;
|
||||
}
|
||||
|
||||
.welcome-panel .welcome-panel-column-container {
|
||||
clear: both;
|
||||
position: relative;
|
||||
@@ -181,6 +213,10 @@
|
||||
float: right;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column > * {
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.ie8 .welcome-panel .welcome-panel-column {
|
||||
min-width: 230px;
|
||||
}
|
||||
@@ -189,11 +225,63 @@
|
||||
width: 36%;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column-container {
|
||||
display: flex;
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
|
||||
@supports (display: grid) {
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column-container {
|
||||
display: -ms-grid;
|
||||
display: grid;
|
||||
-ms-grid-columns: 36% 32% 32%;
|
||||
grid-template-columns: 36% 32% 32%;
|
||||
}
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-image-column {
|
||||
width: 36%;
|
||||
}
|
||||
|
||||
@supports (display: grid) {
|
||||
.try-gutenberg-panel .try-gutenberg-panel-image-column {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 32%;
|
||||
}
|
||||
|
||||
@supports (display: grid) {
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
|
||||
display: -ms-grid;
|
||||
display: grid;
|
||||
-ms-grid-rows: auto 100px;
|
||||
grid-template-rows: auto 100px;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-action {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
@supports (display: grid) {
|
||||
.try-gutenberg-panel .try-gutenberg-action {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.welcome-panel-column p.hide-if-no-customize {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.welcome-panel-column p {
|
||||
.welcome-panel-column p,
|
||||
.try-gutenberg-panel-column p {
|
||||
margin-top: 7px;
|
||||
color: #444;
|
||||
}
|
||||
@@ -1208,6 +1296,27 @@ a.rsswidget {
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column-container {
|
||||
-ms-grid-columns: 50% 50%;
|
||||
grid-template-columns: 50% 50%;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-image-column {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
@supports (display: grid) {
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 870px) {
|
||||
.welcome-panel .welcome-panel-column,
|
||||
.welcome-panel .welcome-panel-column:first-child {
|
||||
@@ -1216,6 +1325,21 @@ a.rsswidget {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column-container {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@supports (display: grid) {
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column-container {
|
||||
-ms-grid-columns: 100%;
|
||||
grid-template-columns: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.welcome-panel .welcome-panel-column li {
|
||||
display: inline-block;
|
||||
margin-left: 13px;
|
||||
@@ -1266,7 +1390,8 @@ a.rsswidget {
|
||||
/* Smartphone */
|
||||
@media screen and (max-width: 600px) {
|
||||
/* Keep the close icon from overlapping the Welcome text. */
|
||||
.welcome-panel .welcome-panel-close {
|
||||
.welcome-panel .welcome-panel-close,
|
||||
.try-gutenberg-panel .try-gutenberg-panel-close {
|
||||
overflow: hidden;
|
||||
text-indent: 40px;
|
||||
white-space: nowrap;
|
||||
@@ -1278,7 +1403,8 @@ a.rsswidget {
|
||||
}
|
||||
|
||||
/* Make the close icon larger for tappability. */
|
||||
.welcome-panel .welcome-panel-close:before {
|
||||
.welcome-panel .welcome-panel-close:before,
|
||||
.try-gutenberg-panel .try-gutenberg-panel-close:before {
|
||||
font-size: 20px;
|
||||
top: 5px;
|
||||
right: -35px;
|
||||
|
||||
2
wp-admin/css/dashboard-rtl.min.css
vendored
2
wp-admin/css/dashboard-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -98,7 +98,8 @@
|
||||
}
|
||||
|
||||
/* Welcome Panel */
|
||||
.welcome-panel {
|
||||
.welcome-panel,
|
||||
.try-gutenberg-panel {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
margin: 16px 0;
|
||||
@@ -110,7 +111,8 @@
|
||||
line-height: 2.1em;
|
||||
}
|
||||
|
||||
.welcome-panel h2 {
|
||||
.welcome-panel h2,
|
||||
.try-gutenberg-panel h2 {
|
||||
margin: 0;
|
||||
font-size: 21px;
|
||||
font-weight: 400;
|
||||
@@ -122,24 +124,41 @@
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.welcome-panel li {
|
||||
.try-gutenberg-panel h3 {
|
||||
margin: 17px 0 0;
|
||||
font-size: 16px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.welcome-panel li,
|
||||
.try-gutenberg-panel li {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.welcome-panel p {
|
||||
.welcome-panel p,
|
||||
.try-gutenberg-panel p {
|
||||
color: #72777c;
|
||||
}
|
||||
|
||||
.welcome-panel a {
|
||||
.welcome-panel a,
|
||||
.try-gutenberg-action a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.welcome-panel .about-description {
|
||||
.welcome-panel .about-description,
|
||||
.try-gutenberg-panel .about-description {
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.welcome-panel .welcome-panel-close {
|
||||
.try-gutenberg-panel-content hr {
|
||||
margin: 20px -23px 0 -23px;
|
||||
border-top: 1px solid #f3f4f5;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.welcome-panel .welcome-panel-close,
|
||||
.try-gutenberg-panel .try-gutenberg-panel-close {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: 10px;
|
||||
@@ -150,7 +169,8 @@
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.welcome-panel .welcome-panel-close:before {
|
||||
.welcome-panel .welcome-panel-close:before,
|
||||
.try-gutenberg-panel .try-gutenberg-panel-close:before {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 0;
|
||||
@@ -165,11 +185,23 @@
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.welcome-panel-content {
|
||||
.welcome-panel-content,
|
||||
.try-gutenberg-panel-content {
|
||||
margin: 0 13px;
|
||||
max-width: 1500px;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel img {
|
||||
margin-top: 23px;
|
||||
width: calc( 100% - 40px );
|
||||
border: 1px solid #f3f4f5;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .install-now.updating-message:before,
|
||||
.try-gutenberg-panel .install-now.updated-message:before {
|
||||
margin-top: 11px;
|
||||
}
|
||||
|
||||
.welcome-panel .welcome-panel-column-container {
|
||||
clear: both;
|
||||
position: relative;
|
||||
@@ -181,6 +213,10 @@
|
||||
float: left;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column > * {
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
.ie8 .welcome-panel .welcome-panel-column {
|
||||
min-width: 230px;
|
||||
}
|
||||
@@ -189,11 +225,63 @@
|
||||
width: 36%;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column-container {
|
||||
display: flex;
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
|
||||
@supports (display: grid) {
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column-container {
|
||||
display: -ms-grid;
|
||||
display: grid;
|
||||
-ms-grid-columns: 36% 32% 32%;
|
||||
grid-template-columns: 36% 32% 32%;
|
||||
}
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-image-column {
|
||||
width: 36%;
|
||||
}
|
||||
|
||||
@supports (display: grid) {
|
||||
.try-gutenberg-panel .try-gutenberg-panel-image-column {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 32%;
|
||||
}
|
||||
|
||||
@supports (display: grid) {
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
|
||||
display: -ms-grid;
|
||||
display: grid;
|
||||
-ms-grid-rows: auto 100px;
|
||||
grid-template-rows: auto 100px;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-action {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
@supports (display: grid) {
|
||||
.try-gutenberg-panel .try-gutenberg-action {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.welcome-panel-column p.hide-if-no-customize {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.welcome-panel-column p {
|
||||
.welcome-panel-column p,
|
||||
.try-gutenberg-panel-column p {
|
||||
margin-top: 7px;
|
||||
color: #444;
|
||||
}
|
||||
@@ -1208,6 +1296,27 @@ a.rsswidget {
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column-container {
|
||||
-ms-grid-columns: 50% 50%;
|
||||
grid-template-columns: 50% 50%;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-image-column {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
@supports (display: grid) {
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 870px) {
|
||||
.welcome-panel .welcome-panel-column,
|
||||
.welcome-panel .welcome-panel-column:first-child {
|
||||
@@ -1216,6 +1325,21 @@ a.rsswidget {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column-container {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@supports (display: grid) {
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column-container {
|
||||
-ms-grid-columns: 100%;
|
||||
grid-template-columns: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.welcome-panel .welcome-panel-column li {
|
||||
display: inline-block;
|
||||
margin-right: 13px;
|
||||
@@ -1266,7 +1390,8 @@ a.rsswidget {
|
||||
/* Smartphone */
|
||||
@media screen and (max-width: 600px) {
|
||||
/* Keep the close icon from overlapping the Welcome text. */
|
||||
.welcome-panel .welcome-panel-close {
|
||||
.welcome-panel .welcome-panel-close,
|
||||
.try-gutenberg-panel .try-gutenberg-panel-close {
|
||||
overflow: hidden;
|
||||
text-indent: 40px;
|
||||
white-space: nowrap;
|
||||
@@ -1278,7 +1403,8 @@ a.rsswidget {
|
||||
}
|
||||
|
||||
/* Make the close icon larger for tappability. */
|
||||
.welcome-panel .welcome-panel-close:before {
|
||||
.welcome-panel .welcome-panel-close:before,
|
||||
.try-gutenberg-panel .try-gutenberg-panel-close:before {
|
||||
font-size: 20px;
|
||||
top: 5px;
|
||||
left: -35px;
|
||||
|
||||
2
wp-admin/css/dashboard.min.css
vendored
2
wp-admin/css/dashboard.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1070,8 +1070,6 @@ 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 {
|
||||
@@ -1486,6 +1484,19 @@ function wp_ajax_update_welcome_panel() {
|
||||
wp_die( 1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax handler for updating whether to display the Try Gutenberg panel.
|
||||
*
|
||||
* @since 4.9.8
|
||||
*/
|
||||
function wp_ajax_update_try_gutenberg_panel() {
|
||||
check_ajax_referer( 'try-gutenberg-panel-nonce', 'trygutenbergpanelnonce' );
|
||||
|
||||
update_user_meta( get_current_user_id(), 'show_try_gutenberg_panel', empty( $_POST['visible'] ) ? 0 : 1 );
|
||||
|
||||
wp_die( 1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax handler for retrieving menu meta boxes.
|
||||
*
|
||||
@@ -2070,7 +2081,7 @@ function wp_ajax_upload_attachment() {
|
||||
'success' => false,
|
||||
'data' => array(
|
||||
'message' => __( 'Sorry, you are not allowed to upload files.' ),
|
||||
'filename' => esc_html( $_FILES['async-upload']['name'] ),
|
||||
'filename' => $_FILES['async-upload']['name'],
|
||||
)
|
||||
) );
|
||||
|
||||
@@ -2084,7 +2095,7 @@ function wp_ajax_upload_attachment() {
|
||||
'success' => false,
|
||||
'data' => array(
|
||||
'message' => __( 'Sorry, you are not allowed to attach files to this post.' ),
|
||||
'filename' => esc_html( $_FILES['async-upload']['name'] ),
|
||||
'filename' => $_FILES['async-upload']['name'],
|
||||
)
|
||||
) );
|
||||
|
||||
@@ -2108,7 +2119,7 @@ function wp_ajax_upload_attachment() {
|
||||
'success' => false,
|
||||
'data' => array(
|
||||
'message' => __( 'The uploaded file is not a valid image. Please try again.' ),
|
||||
'filename' => esc_html( $_FILES['async-upload']['name'] ),
|
||||
'filename' => $_FILES['async-upload']['name'],
|
||||
)
|
||||
) );
|
||||
|
||||
@@ -2123,7 +2134,7 @@ function wp_ajax_upload_attachment() {
|
||||
'success' => false,
|
||||
'data' => array(
|
||||
'message' => $attachment_id->get_error_message(),
|
||||
'filename' => esc_html( $_FILES['async-upload']['name'] ),
|
||||
'filename' => $_FILES['async-upload']['name'],
|
||||
)
|
||||
) );
|
||||
|
||||
|
||||
@@ -1034,6 +1034,23 @@ final class WP_Screen {
|
||||
echo _x( 'Welcome', 'Welcome panel' ) . "</label>\n";
|
||||
}
|
||||
|
||||
if ( 'dashboard' === $this->id && has_action( 'try_gutenberg_panel' ) ) {
|
||||
if ( isset( $_GET['try_gutenberg'] ) ) {
|
||||
$try_gutenberg_checked = empty( $_GET['try_gutenberg'] ) ? 0 : 1;
|
||||
update_user_meta( get_current_user_id(), 'show_try_gutenberg_panel', $try_gutenberg_checked );
|
||||
} else {
|
||||
$try_gutenberg_checked = get_user_meta( get_current_user_id(), 'show_try_gutenberg_panel', true );
|
||||
if ( '' === $try_gutenberg_checked ) {
|
||||
$try_gutenberg_checked = '1';
|
||||
}
|
||||
if ( '2' === $try_gutenberg_checked && wp_get_current_user()->user_email != get_option( 'admin_email' ) ) {
|
||||
$try_gutenberg_checked = false;
|
||||
}
|
||||
}
|
||||
echo '<label for="wp_try_gutenberg_panel-hide">';
|
||||
echo '<input type="checkbox" id="wp_try_gutenberg_panel-hide"' . checked( (bool) $try_gutenberg_checked, true, false ) . ' />';
|
||||
echo __( 'New Editor' ) . "</label>\n";
|
||||
}
|
||||
?>
|
||||
</fieldset>
|
||||
<?php
|
||||
|
||||
@@ -24,6 +24,18 @@ function wp_dashboard_setup() {
|
||||
|
||||
/* Register Widgets and Controls */
|
||||
|
||||
// Try Gutenberg
|
||||
|
||||
// If Gutenberg isn't activated, only show the panel to users who can install and activate it.
|
||||
$plugins = get_plugins();
|
||||
if ( is_plugin_inactive( 'gutenberg/gutenberg.php' ) && ! current_user_can( 'install_plugins' ) ) {
|
||||
remove_action( 'try_gutenberg_panel', 'wp_try_gutenberg_panel' );
|
||||
}
|
||||
// If Gutenberg is activated, only show it to users who can use it.
|
||||
if ( is_plugin_active( 'gutenberg/gutenberg.php' ) && ! current_user_can( 'edit_posts' ) ) {
|
||||
remove_action( 'try_gutenberg_panel', 'wp_try_gutenberg_panel' );
|
||||
}
|
||||
|
||||
$response = wp_check_browser_version();
|
||||
|
||||
if ( $response && $response['upgrade'] ) {
|
||||
@@ -1619,3 +1631,140 @@ function wp_welcome_panel() {
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a Try Gutenberg Panel, to introduce people to Gutenberg
|
||||
*
|
||||
* @since 4.9.8
|
||||
*/
|
||||
function wp_try_gutenberg_panel() {
|
||||
$plugins = get_plugins();
|
||||
$action = $url = $classes = '';
|
||||
$classic_action = $classic_url = $classic_classes = '';
|
||||
|
||||
if ( current_user_can( 'install_plugins' ) ) {
|
||||
if ( empty( $plugins['gutenberg/gutenberg.php'] ) ) {
|
||||
if ( get_filesystem_method( array(), WP_PLUGIN_DIR ) === 'direct' ) {
|
||||
$action = __( 'Install Gutenberg' );
|
||||
$url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=gutenberg' ), 'install-plugin_gutenberg' );
|
||||
$classes = ' install-now';
|
||||
}
|
||||
} else if ( is_plugin_inactive( 'gutenberg/gutenberg.php' ) ) {
|
||||
$action = __( 'Activate Gutenberg' );
|
||||
$url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=gutenberg/gutenberg.php&from=try-gutenberg' ), 'activate-plugin_gutenberg/gutenberg.php' );
|
||||
$classes = ' activate-now';
|
||||
}
|
||||
|
||||
if ( empty( $plugins['classic-editor/classic-editor.php'] ) ) {
|
||||
if ( get_filesystem_method( array(), WP_PLUGIN_DIR ) === 'direct' ) {
|
||||
$classic_action = __( 'Install the Classic Editor' );
|
||||
$classic_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=classic-editor' ), 'install-plugin_classic-editor' );
|
||||
$classic_classes = ' install-now';
|
||||
}
|
||||
} else if ( is_plugin_inactive( 'classic-editor/classic-editor.php' ) ) {
|
||||
$classic_action = __( 'Activate the Classic Editor' );
|
||||
$classic_url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=classic-editor/classic-editor.php&from=try-gutenberg' ), 'activate-plugin_classic-editor/classic-editor.php' );
|
||||
$classic_classes = ' activate-now';
|
||||
} else {
|
||||
$classic_action = __( 'The Classic Editor is activated' );
|
||||
$classic_url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=classic-editor/classic-editor.php&from=try-gutenberg' ), 'activate-plugin_classic-editor/classic-editor.php' );;
|
||||
$classic_classes = ' button-disabled install-now updated-message';
|
||||
}
|
||||
}
|
||||
|
||||
if ( current_user_can( 'edit_posts' ) && is_plugin_active( 'gutenberg/gutenberg.php' ) ) {
|
||||
$action = __( 'Try Gutenberg' );
|
||||
$url = admin_url( 'admin.php?page=gutenberg' );
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="try-gutenberg-panel-content">
|
||||
<h2><?php _e( 'A new, modern publishing experience is coming soon.' ); ?></h2>
|
||||
|
||||
<p class="about-description"><?php _e( "Take your words, media, and layout in new directions with Gutenberg, the WordPress editor we're currently building." ); ?></p>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="try-gutenberg-panel-column-container">
|
||||
<div class="try-gutenberg-panel-column try-gutenberg-panel-image-column">
|
||||
<picture>
|
||||
<source srcset="about:blank" media="(max-width: 1024px)">
|
||||
<img src="https://s.w.org/images/core/gutenberg-screenshot.png?<?php echo date( 'Ymd' ); ?>" alt="<?php esc_attr_e( 'Screenshot from the Gutenberg interface' ); ?>" />
|
||||
</picture>
|
||||
</div>
|
||||
<div class="try-gutenberg-panel-column plugin-card-gutenberg">
|
||||
|
||||
<div>
|
||||
<h3><?php _e( 'Test the new editor today.' ); ?></h3>
|
||||
|
||||
<p>
|
||||
<?php _e( "You can take Gutenberg for a spin (and share your feedback, if you’d like) before we officially release it, by installing it as a plugin." ); ?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: Gutenberg call for testing handbook link, 2: Gutenberg GitHub repository issues link, 3: Gutenberg GitHub repository CONTRIBUTING.md link */
|
||||
__( 'You can help by <a href="%1$s">testing</a>, <a href="%2$s">filing bugs</a>, or contributing on the <a href="%3$s">GitHub repository</a>.' ),
|
||||
'https://make.wordpress.org/test/handbook/call-for-testing/gutenberg-testing/',
|
||||
'https://github.com/WordPress/gutenberg/issues',
|
||||
'https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="try-gutenberg-action">
|
||||
<?php if ( $action ) { ?>
|
||||
<p><a class="button button-primary button-hero<?php echo $classes; ?>" href="<?php echo esc_url( $url ); ?>" data-name="<?php esc_attr_e( 'Gutenberg' ); ?>" data-slug="gutenberg"><?php echo $action; ?></a></p>
|
||||
<?php } ?>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
$learnmore = sprintf(
|
||||
/* translators: Link to https://wordpress.org/gutenberg/ */
|
||||
__( '<a href="%s">Learn more about Gutenberg</a>' ),
|
||||
__( 'https://wordpress.org/gutenberg/' )
|
||||
);
|
||||
|
||||
/**
|
||||
* Filters the "Learn more" link in the Try Gutenberg panel.
|
||||
*
|
||||
* It allows hosts or site owners to change the link, to provide extra
|
||||
* information about Gutenberg, specific to their service.
|
||||
*
|
||||
* WARNING: This filter will only exist in the 4.9.x series, it will not be
|
||||
* added to WordPress 5.0 and later.
|
||||
*
|
||||
* @since 4.9.8
|
||||
*/
|
||||
echo apply_filters( 'try_gutenberg_learn_more_link', $learnmore );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="try-gutenberg-panel-column plugin-card-classic-editor">
|
||||
|
||||
<div>
|
||||
<h3><?php _e( 'Not quite ready?' ); ?></h3>
|
||||
|
||||
<p>
|
||||
<?php _e( 'The new editor will be enabled by default in the next major release of WordPress. If you’re not sure how compatible your current themes and plugins are, we’ve got you covered.' ); ?>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: Link to the Classic Editor plugin page */
|
||||
__( 'Install the <a href="%s">Classic Editor plugin</a> to keep using the current editor until you’re ready to make the switch.' ),
|
||||
__( 'https://wordpress.org/plugins/classic-editor' )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php if ( $classic_action ) { ?>
|
||||
<div class="try-gutenberg-action">
|
||||
<p><a class="button button-secondary button-hero<?php echo $classic_classes; ?>" href="<?php echo esc_url( $classic_url ); ?>" data-name="<?php esc_attr_e( 'Classic Editor' ); ?>" data-slug="classic-editor"><?php echo $classic_action; ?></a></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -2831,11 +2831,8 @@ 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( format_to_edit( $post->post_content ), 'attachment_content', $editor_args ); ?>
|
||||
} ?></label>
|
||||
<?php wp_editor( $post->post_content, 'attachment_content', $editor_args ); ?>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
|
||||
@@ -620,46 +620,24 @@ function set_screen_options() {
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
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 bool $keep Whether to save or skip saving the screen option value.
|
||||
* Default false.
|
||||
* @param string $option The option name.
|
||||
* @param int $value The number of rows to use.
|
||||
*/
|
||||
$value = apply_filters( 'set-screen-option', false, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters a screen option value before it is set.
|
||||
*
|
||||
* The dynamic portion of the hook, `$option`, refers to the option name.
|
||||
* 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 5.4.2
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @see set_screen_options()
|
||||
*
|
||||
* @param bool $keep Whether to save or skip saving the screen option value.
|
||||
* Default false.
|
||||
* @param string $option The option name.
|
||||
* @param int $value The number of rows to use.
|
||||
* @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.
|
||||
*/
|
||||
$value = apply_filters( "set_screen_option_{$option}", false, $option, $value );
|
||||
$value = apply_filters( 'set-screen-option', false, $option, $value );
|
||||
|
||||
if ( false === $value )
|
||||
return;
|
||||
|
||||
@@ -103,6 +103,32 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<div class="wrap">
|
||||
<h1><?php echo esc_html( $title ); ?></h1>
|
||||
|
||||
<?php if ( has_action( 'try_gutenberg_panel' ) ) :
|
||||
$classes = 'try-gutenberg-panel';
|
||||
|
||||
$option = get_user_meta( get_current_user_id(), 'show_try_gutenberg_panel', true );
|
||||
// 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner
|
||||
$hide = '0' === $option || ( '2' === $option && wp_get_current_user()->user_email !== get_option( 'admin_email' ) );
|
||||
if ( $hide )
|
||||
$classes .= ' hidden'; ?>
|
||||
|
||||
<div id="try-gutenberg-panel" class="<?php echo esc_attr( $classes ); ?>">
|
||||
<?php wp_nonce_field( 'try-gutenberg-panel-nonce', 'trygutenbergpanelnonce', false ); ?>
|
||||
<a class="try-gutenberg-panel-close" href="<?php echo esc_url( admin_url( '?try_gutenberg=0' ) ); ?>" aria-label="<?php esc_attr_e( 'Dismiss the Try Gutenberg panel' ); ?>"><?php _e( 'Dismiss' ); ?></a>
|
||||
<?php
|
||||
/**
|
||||
* Add content to the Try Gutenberg panel on the admin dashboard.
|
||||
*
|
||||
* To remove the Try Gutenberg panel, use remove_action():
|
||||
*
|
||||
* remove_action( 'try_gutenberg_panel', 'wp_try_gutenberg_panel' );
|
||||
*
|
||||
* @since 4.9.8
|
||||
*/
|
||||
do_action( 'try_gutenberg_panel' );
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) :
|
||||
$classes = 'welcome-panel';
|
||||
|
||||
|
||||
@@ -31,6 +31,49 @@ jQuery(document).ready( function($) {
|
||||
updateWelcomePanel( this.checked ? 1 : 0 );
|
||||
});
|
||||
|
||||
var tryGutenbergPanel = $( '#try-gutenberg-panel' ),
|
||||
tryGutenbergPanelHide = $('#wp_try_gutenberg_panel-hide'),
|
||||
updateTryGutenbergPanel, installGutenbergSuccess;
|
||||
|
||||
updateTryGutenbergPanel = function( visible ) {
|
||||
$.post( ajaxurl, {
|
||||
action: 'update-try-gutenberg-panel',
|
||||
visible: visible,
|
||||
trygutenbergpanelnonce: $( '#trygutenbergpanelnonce' ).val()
|
||||
});
|
||||
};
|
||||
|
||||
installGutenbergSuccess = function( response ) {
|
||||
response.activateUrl += '&from=try-gutenberg';
|
||||
response.activateLabel = wp.updates.l10n.activatePluginLabel.replace( '%s', response.pluginName );
|
||||
wp.updates.installPluginSuccess( response );
|
||||
};
|
||||
|
||||
if ( tryGutenbergPanel.hasClass( 'hidden' ) && tryGutenbergPanelHide.prop( 'checked' ) ) {
|
||||
tryGutenbergPanel.removeClass( 'hidden' );
|
||||
}
|
||||
|
||||
$( '.try-gutenberg-panel-close, .try-gutenberg-panel-dismiss a', tryGutenbergPanel ).click( function( e ) {
|
||||
e.preventDefault();
|
||||
tryGutenbergPanel.addClass( 'hidden' );
|
||||
updateTryGutenbergPanel( 0 );
|
||||
$('#wp_try_gutenberg_panel-hide').prop( 'checked', false );
|
||||
});
|
||||
|
||||
tryGutenbergPanelHide.click( function() {
|
||||
tryGutenbergPanel.toggleClass( 'hidden', ! this.checked );
|
||||
updateTryGutenbergPanel( this.checked ? 1 : 0 );
|
||||
});
|
||||
|
||||
tryGutenbergPanel.on( 'click', '.install-now', function( e ) {
|
||||
e.preventDefault();
|
||||
var args = {
|
||||
slug: $( e.target ).data( 'slug' ),
|
||||
success: installGutenbergSuccess
|
||||
};
|
||||
wp.updates.installPlugin( args );
|
||||
} );
|
||||
|
||||
// These widgets are sometimes populated via ajax
|
||||
ajaxWidgets = ['dashboard_primary'];
|
||||
|
||||
|
||||
2
wp-admin/js/dashboard.min.js
vendored
2
wp-admin/js/dashboard.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -65,6 +65,12 @@ if ( $action ) {
|
||||
wp_redirect( self_admin_url("import.php?import=" . str_replace('-importer', '', dirname($plugin))) ); // overrides the ?error=true one above and redirects to the Imports page, stripping the -importer suffix
|
||||
} else if ( isset($_GET['from']) && 'press-this' == $_GET['from'] ) {
|
||||
wp_redirect( self_admin_url( "press-this.php") );
|
||||
} else if ( isset( $_GET['from'] ) && 'try-gutenberg' == $_GET['from'] ) {
|
||||
if ( 'gutenberg/gutenberg.php' === $plugin ) {
|
||||
wp_redirect( self_admin_url( "admin.php?page=gutenberg" ) );
|
||||
} else {
|
||||
wp_redirect( self_admin_url() );
|
||||
}
|
||||
} else {
|
||||
wp_redirect( self_admin_url("plugins.php?activate=true&plugin_status=$status&paged=$page&s=$s") ); // overrides the ?error=true one above
|
||||
}
|
||||
|
||||
@@ -337,7 +337,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' ) : esc_html( $broken_theme->get_stylesheet() ); ?></td>
|
||||
<td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : $broken_theme->get_stylesheet(); ?></td>
|
||||
<td><?php echo $broken_theme->errors()->get_error_message(); ?></td>
|
||||
<?php
|
||||
if ( $can_delete ) {
|
||||
|
||||
@@ -668,7 +668,7 @@ class WP_Object_Cache {
|
||||
echo "</p>";
|
||||
echo '<ul>';
|
||||
foreach ($this->cache as $group => $cache) {
|
||||
echo '<li><strong>Group:</strong> ' . esc_html( $group ) . ' - ( ' . number_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 ) . 'k )</li>';
|
||||
echo "<li><strong>Group:</strong> $group - ( " . number_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 ) . 'k )</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
@@ -2859,12 +2859,13 @@ final class WP_Customize_Manager {
|
||||
$this->store_changeset_revision = $allow_revision;
|
||||
add_filter( 'wp_save_post_revision_post_has_changed', array( $this, '_filter_revision_post_has_changed' ), 5, 3 );
|
||||
|
||||
/*
|
||||
* Update the changeset post. The publish_customize_changeset action will cause the settings in the
|
||||
* changeset to be saved via WP_Customize_Setting::save(). Updating a post with publish status will
|
||||
* trigger WP_Customize_Manager::publish_changeset_values().
|
||||
*/
|
||||
add_filter( 'wp_insert_post_data', array( $this, 'preserve_insert_changeset_post_content' ), 5, 3 );
|
||||
// Update the changeset post. The publish_customize_changeset action will cause the settings in the changeset to be saved via WP_Customize_Setting::save().
|
||||
$has_kses = ( false !== has_filter( 'content_save_pre', 'wp_filter_post_kses' ) );
|
||||
if ( $has_kses ) {
|
||||
kses_remove_filters(); // Prevent KSES from corrupting JSON in post_content.
|
||||
}
|
||||
|
||||
// Note that updating a post with publish status will trigger WP_Customize_Manager::publish_changeset_values().
|
||||
if ( $changeset_post_id ) {
|
||||
if ( $args['autosave'] && 'auto-draft' !== get_post_status( $changeset_post_id ) ) {
|
||||
// See _wp_translate_postdata() for why this is required as it will use the edit_post meta capability.
|
||||
@@ -2891,9 +2892,9 @@ final class WP_Customize_Manager {
|
||||
$this->_changeset_post_id = $r; // Update cached post ID for the loaded changeset.
|
||||
}
|
||||
}
|
||||
|
||||
remove_filter( 'wp_insert_post_data', array( $this, 'preserve_insert_changeset_post_content' ), 5 );
|
||||
|
||||
if ( $has_kses ) {
|
||||
kses_init_filters();
|
||||
}
|
||||
$this->_changeset_data = null; // Reset so WP_Customize_Manager::changeset_data() will re-populate with updated contents.
|
||||
|
||||
remove_filter( 'wp_save_post_revision_post_has_changed', array( $this, '_filter_revision_post_has_changed' ) );
|
||||
@@ -2910,51 +2911,6 @@ final class WP_Customize_Manager {
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Preserve the initial JSON post_content passed to save into the post.
|
||||
*
|
||||
* This is needed to prevent KSES and other {@see 'content_save_pre'} filters
|
||||
* from corrupting JSON data.
|
||||
*
|
||||
* Note that WP_Customize_Manager::validate_setting_values() have already
|
||||
* run on the setting values being serialized as JSON into the post content
|
||||
* so it is pre-sanitized.
|
||||
*
|
||||
* Also, the sanitization logic is re-run through the respective
|
||||
* WP_Customize_Setting::sanitize() method when being read out of the
|
||||
* changeset, via WP_Customize_Manager::post_value(), and this sanitized
|
||||
* value will also be sent into WP_Customize_Setting::update() for
|
||||
* persisting to the DB.
|
||||
*
|
||||
* Multiple users can collaborate on a single changeset, where one user may
|
||||
* have the unfiltered_html capability but another may not. A user with
|
||||
* unfiltered_html may add a script tag to some field which needs to be kept
|
||||
* intact even when another user updates the changeset to modify another field
|
||||
* when they do not have unfiltered_html.
|
||||
*
|
||||
* @since 5.4.1
|
||||
*
|
||||
* @param array $data An array of slashed and processed post data.
|
||||
* @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data.
|
||||
* @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed post data as originally passed to wp_insert_post().
|
||||
* @return array Filtered post data.
|
||||
*/
|
||||
public function preserve_insert_changeset_post_content( $data, $postarr, $unsanitized_postarr ) {
|
||||
if (
|
||||
isset( $data['post_type'] ) &&
|
||||
isset( $unsanitized_postarr['post_content'] ) &&
|
||||
'customize_changeset' === $data['post_type'] ||
|
||||
(
|
||||
'revision' === $data['post_type'] &&
|
||||
! empty( $data['post_parent'] ) &&
|
||||
'customize_changeset' === get_post_type( $data['post_parent'] )
|
||||
)
|
||||
) {
|
||||
$data['post_content'] = $unsanitized_postarr['post_content'];
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Trash or delete a changeset post.
|
||||
*
|
||||
|
||||
@@ -529,6 +529,7 @@ class WP_Query {
|
||||
, 'attachment'
|
||||
, 'attachment_id'
|
||||
, 'name'
|
||||
, 'static'
|
||||
, 'pagename'
|
||||
, 'page_id'
|
||||
, 'second'
|
||||
@@ -759,7 +760,11 @@ class WP_Query {
|
||||
$this->is_single = true;
|
||||
} elseif ( $qv['p'] ) {
|
||||
$this->is_single = true;
|
||||
} elseif ( '' != $qv['pagename'] || !empty($qv['page_id']) ) {
|
||||
} elseif ( ('' !== $qv['hour']) && ('' !== $qv['minute']) &&('' !== $qv['second']) && ('' != $qv['year']) && ('' != $qv['monthnum']) && ('' != $qv['day']) ) {
|
||||
// If year, month, day, hour, minute, and second are set, a single
|
||||
// post is being queried.
|
||||
$this->is_single = true;
|
||||
} elseif ( '' != $qv['static'] || '' != $qv['pagename'] || !empty($qv['page_id']) ) {
|
||||
$this->is_page = true;
|
||||
$this->is_single = false;
|
||||
} else {
|
||||
|
||||
@@ -14,7 +14,7 @@ class WP {
|
||||
* @since 2.0.0
|
||||
* @var array
|
||||
*/
|
||||
public $public_query_vars = array( 'm', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'pagename', 'page_id', 'error', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type', 'embed' );
|
||||
public $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type', 'embed' );
|
||||
|
||||
/**
|
||||
* Private query variables.
|
||||
|
||||
@@ -3110,8 +3110,6 @@ function wp_handle_comment_submission( $comment_data ) {
|
||||
) {
|
||||
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 {
|
||||
|
||||
@@ -318,6 +318,7 @@ add_action( 'transition_post_status', '_transition_post_status',
|
||||
add_action( 'transition_post_status', '_update_term_count_on_transition_post_status', 10, 3 );
|
||||
add_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce' );
|
||||
add_action( 'admin_init', 'send_frame_options_header', 10, 0 );
|
||||
add_action( 'try_gutenberg_panel', 'wp_try_gutenberg_panel' );
|
||||
add_action( 'welcome_panel', 'wp_welcome_panel' );
|
||||
|
||||
// Privacy
|
||||
|
||||
@@ -1776,24 +1776,6 @@ function remove_accents( $string ) {
|
||||
function sanitize_file_name( $filename ) {
|
||||
$filename_raw = $filename;
|
||||
$special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", "%", "+", chr(0));
|
||||
|
||||
// Check for support for utf8 in the installed PCRE library once and store the result in a static.
|
||||
static $utf8_pcre = null;
|
||||
if ( ! isset( $utf8_pcre ) ) {
|
||||
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
|
||||
$utf8_pcre = @preg_match( '/^./u', 'a' );
|
||||
}
|
||||
|
||||
if ( ! seems_utf8( $filename ) ) {
|
||||
$_ext = pathinfo( $filename, PATHINFO_EXTENSION );
|
||||
$_name = pathinfo( $filename, PATHINFO_FILENAME );
|
||||
$filename = sanitize_title_with_dashes( $_name ) . '.' . $_ext;
|
||||
}
|
||||
|
||||
if ( $utf8_pcre ) {
|
||||
$filename = preg_replace( "#\x{00a0}#siu", ' ', $filename );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the list of characters to remove from a filename.
|
||||
*
|
||||
@@ -1803,6 +1785,7 @@ function sanitize_file_name( $filename ) {
|
||||
* @param string $filename_raw Filename as it was passed into sanitize_file_name().
|
||||
*/
|
||||
$special_chars = apply_filters( 'sanitize_file_name_chars', $special_chars, $filename_raw );
|
||||
$filename = preg_replace( "#\x{00a0}#siu", ' ', $filename );
|
||||
$filename = str_replace( $special_chars, '', $filename );
|
||||
$filename = str_replace( array( '%20', '+' ), '-', $filename );
|
||||
$filename = preg_replace( '/[\r\n\t -]+/', '-', $filename );
|
||||
@@ -2764,19 +2747,17 @@ function wp_rel_nofollow( $text ) {
|
||||
*/
|
||||
function wp_rel_nofollow_callback( $matches ) {
|
||||
$text = $matches[1];
|
||||
$atts = wp_kses_hair( $matches[1], wp_allowed_protocols() );
|
||||
$atts = shortcode_parse_atts( $matches[1] );
|
||||
$rel = 'nofollow';
|
||||
|
||||
if ( ! empty( $atts['href'] ) ) {
|
||||
if ( in_array( strtolower( wp_parse_url( $atts['href']['value'], PHP_URL_SCHEME ) ), array( 'http', 'https' ), true ) ) {
|
||||
if ( strtolower( wp_parse_url( $atts['href']['value'], PHP_URL_HOST ) ) === strtolower( wp_parse_url( home_url(), PHP_URL_HOST ) ) ) {
|
||||
return "<a $text>";
|
||||
}
|
||||
}
|
||||
if ( preg_match( '%href=["\'](' . preg_quote( set_url_scheme( home_url(), 'http' ) ) . ')%i', $text ) ||
|
||||
preg_match( '%href=["\'](' . preg_quote( set_url_scheme( home_url(), 'https' ) ) . ')%i', $text )
|
||||
) {
|
||||
return "<a $text>";
|
||||
}
|
||||
|
||||
if ( ! empty( $atts['rel'] ) ) {
|
||||
$parts = array_map( 'trim', explode( ' ', $atts['rel']['value'] ) );
|
||||
$parts = array_map( 'trim', explode( ' ', $atts['rel'] ) );
|
||||
if ( false === array_search( 'nofollow', $parts ) ) {
|
||||
$parts[] = 'nofollow';
|
||||
}
|
||||
@@ -2785,15 +2766,11 @@ function wp_rel_nofollow_callback( $matches ) {
|
||||
|
||||
$html = '';
|
||||
foreach ( $atts as $name => $value ) {
|
||||
if ( isset( $value['vless'] ) && 'y' === $value['vless'] ) {
|
||||
$html .= $name . ' ';
|
||||
} else {
|
||||
$html .= "{$name}=\"" . esc_attr( $value['value'] ) . '" ';
|
||||
}
|
||||
$html .= "{$name}=\"$value\" ";
|
||||
}
|
||||
$text = trim( $html );
|
||||
}
|
||||
return "<a $text rel=\"" . esc_attr( $rel ) . "\">";
|
||||
return "<a $text rel=\"$rel\">";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1613,11 +1613,6 @@ function wp_mkdir_p( $target ) {
|
||||
if ( file_exists( $target ) )
|
||||
return @is_dir( $target );
|
||||
|
||||
// Do not allow path traversals.
|
||||
if ( false !== strpos( $target, '../' ) || false !== strpos( $target, '..' . DIRECTORY_SEPARATOR ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We need to find the permissions of the parent folder that exists and inherit that.
|
||||
$target_parent = dirname( $target );
|
||||
while ( '.' != $target_parent && ! is_dir( $target_parent ) && dirname( $target_parent ) !== $target_parent ) {
|
||||
|
||||
@@ -541,9 +541,8 @@ function wp_http_validate_url( $url ) {
|
||||
$ip = $host;
|
||||
} else {
|
||||
$ip = gethostbyname( $host );
|
||||
if ( $ip === $host ) { // Error condition for gethostbyname()
|
||||
return false;
|
||||
}
|
||||
if ( $ip === $host ) // Error condition for gethostbyname()
|
||||
$ip = false;
|
||||
}
|
||||
if ( $ip ) {
|
||||
$parts = array_map( 'intval', explode( '.', $ip ) );
|
||||
|
||||
10
wp-includes/js/jquery/jquery.js
vendored
10
wp-includes/js/jquery/jquery.js
vendored
File diff suppressed because one or more lines are too long
@@ -1384,8 +1384,7 @@ function wp_kses_html_error($string) {
|
||||
* @return string Sanitized content
|
||||
*/
|
||||
function wp_kses_bad_protocol_once($string, $allowed_protocols, $count = 1 ) {
|
||||
$string = preg_replace( '/(�*58(?![;0-9])|�*3a(?![;a-f0-9]))/i', '$1;', $string );
|
||||
$string2 = preg_split( '/:|�*58;|�*3a;|:/i', $string, 2 );
|
||||
$string2 = preg_split( '/:|�*58;|�*3a;/i', $string, 2 );
|
||||
if ( isset($string2[1]) && ! preg_match('%/\?%', $string2[0]) ) {
|
||||
$string = trim( $string2[1] );
|
||||
$protocol = wp_kses_bad_protocol_once2( $string2[0], $allowed_protocols );
|
||||
|
||||
@@ -1079,7 +1079,7 @@ if ( !function_exists('check_admin_referer') ) :
|
||||
* 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.
|
||||
*/
|
||||
function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
|
||||
if ( -1 === $action )
|
||||
if ( -1 == $action )
|
||||
_doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
|
||||
|
||||
$adminurl = strtolower(admin_url());
|
||||
@@ -1097,7 +1097,7 @@ function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
|
||||
*/
|
||||
do_action( 'check_admin_referer', $action, $result );
|
||||
|
||||
if ( ! $result && ! ( -1 === $action && strpos( $referer, $adminurl ) === 0 ) ) {
|
||||
if ( ! $result && ! ( -1 == $action && strpos( $referer, $adminurl ) === 0 ) ) {
|
||||
wp_nonce_ays( $action );
|
||||
die();
|
||||
}
|
||||
@@ -1323,7 +1323,7 @@ if ( !function_exists('wp_validate_redirect') ) :
|
||||
* @return string redirect-sanitized URL
|
||||
**/
|
||||
function wp_validate_redirect($location, $default = '') {
|
||||
$location = wp_sanitize_redirect( trim( $location, " \t\n\r\0\x08\x0B" ) );
|
||||
$location = trim( $location, " \t\n\r\0\x08\x0B" );
|
||||
// browsers will assume 'http' is your protocol, and will obey a redirect to a URL starting with '//'
|
||||
if ( substr($location, 0, 2) == '//' )
|
||||
$location = 'http:' . $location;
|
||||
@@ -1342,14 +1342,6 @@ function wp_validate_redirect($location, $default = '') {
|
||||
if ( isset($lp['scheme']) && !('http' == $lp['scheme'] || 'https' == $lp['scheme']) )
|
||||
return $default;
|
||||
|
||||
if ( ! isset( $lp['host'] ) && ! empty( $lp['path'] ) && '/' !== $lp['path'][0] ) {
|
||||
$path = '';
|
||||
if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
|
||||
$path = dirname( parse_url( 'http://placeholder' . $_SERVER['REQUEST_URI'], PHP_URL_PATH ) . '?' );
|
||||
}
|
||||
$location = '/' . ltrim( $path . '/', '/' ) . $location;
|
||||
}
|
||||
|
||||
// Reject if certain components are set but host is not. This catches urls like https:host.com for which parse_url does not set the host field.
|
||||
if ( ! isset( $lp['host'] ) && ( isset( $lp['scheme'] ) || isset( $lp['user'] ) || isset( $lp['pass'] ) || isset( $lp['port'] ) ) ) {
|
||||
return $default;
|
||||
@@ -2645,3 +2637,4 @@ function wp_text_diff( $left_string, $right_string, $args = null ) {
|
||||
return $r;
|
||||
}
|
||||
endif;
|
||||
|
||||
|
||||
@@ -324,9 +324,25 @@ function get_the_content( $more_link_text = null, $strip_teaser = false ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $preview ) // Preview fix for JavaScript bug with foreign languages.
|
||||
$output = preg_replace_callback( '/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output );
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Preview fix for JavaScript bug with foreign languages.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @access private
|
||||
*
|
||||
* @param array $match Match array from preg_replace_callback.
|
||||
* @return string
|
||||
*/
|
||||
function _convert_urlencoded_to_entities( $match ) {
|
||||
return '&#' . base_convert( $match[1], 16, 10 ) . ';';
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the post excerpt.
|
||||
*
|
||||
|
||||
@@ -3136,9 +3136,6 @@ function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
|
||||
function wp_insert_post( $postarr, $wp_error = false ) {
|
||||
global $wpdb;
|
||||
|
||||
// Capture original pre-sanitized array for passing into filters.
|
||||
$unsanitized_postarr = $postarr;
|
||||
|
||||
$user_id = get_current_user_id();
|
||||
|
||||
$defaults = array(
|
||||
@@ -3435,27 +3432,21 @@ function wp_insert_post( $postarr, $wp_error = false ) {
|
||||
* Filters attachment post data before it is updated in or added to the database.
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @since 5.4.1 `$unsanitized_postarr` argument added.
|
||||
*
|
||||
* @param array $data An array of slashed, sanitized, and processed attachment post data.
|
||||
* @param array $postarr An array of slashed and sanitized attachment post data, but not processed.
|
||||
* @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed attachment post data
|
||||
* as originally passed to wp_insert_post().
|
||||
* @param array $data An array of sanitized attachment post data.
|
||||
* @param array $postarr An array of unsanitized attachment post data.
|
||||
*/
|
||||
$data = apply_filters( 'wp_insert_attachment_data', $data, $postarr, $unsanitized_postarr );
|
||||
$data = apply_filters( 'wp_insert_attachment_data', $data, $postarr );
|
||||
} else {
|
||||
/**
|
||||
* Filters slashed post data just before it is inserted into the database.
|
||||
*
|
||||
* @since 2.7.0
|
||||
* @since 5.4.1 `$unsanitized_postarr` argument added.
|
||||
*
|
||||
* @param array $data An array of slashed, sanitized, and processed post data.
|
||||
* @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data.
|
||||
* @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed post data as
|
||||
* originally passed to wp_insert_post().
|
||||
* @param array $data An array of slashed post data.
|
||||
* @param array $postarr An array of sanitized, but otherwise unmodified post data.
|
||||
*/
|
||||
$data = apply_filters( 'wp_insert_post_data', $data, $postarr, $unsanitized_postarr );
|
||||
$data = apply_filters( 'wp_insert_post_data', $data, $postarr );
|
||||
}
|
||||
$data = wp_unslash( $data );
|
||||
$where = array( 'ID' => $post_ID );
|
||||
|
||||
@@ -544,9 +544,7 @@ function rest_send_cors_headers( $value ) {
|
||||
header( 'Access-Control-Allow-Origin: ' . $origin );
|
||||
header( 'Access-Control-Allow-Methods: OPTIONS, GET, POST, PUT, PATCH, DELETE' );
|
||||
header( 'Access-Control-Allow-Credentials: true' );
|
||||
header( 'Vary: Origin', false );
|
||||
} elseif ( ! headers_sent() && 'GET' === $_SERVER['REQUEST_METHOD'] && ! is_user_logged_in() ) {
|
||||
header( 'Vary: Origin', false );
|
||||
header( 'Vary: Origin' );
|
||||
}
|
||||
|
||||
return $value;
|
||||
|
||||
@@ -491,7 +491,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
return new WP_Error( 'rest_cannot_edit_others', __( 'Sorry, you are not allowed to create posts as this user.' ), array( 'status' => rest_authorization_required_code() ) );
|
||||
}
|
||||
|
||||
if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) && ! current_user_can( $post_type->cap->publish_posts ) ) {
|
||||
if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) ) {
|
||||
return new WP_Error( 'rest_cannot_assign_sticky', __( 'Sorry, you are not allowed to make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) );
|
||||
}
|
||||
|
||||
@@ -633,7 +633,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
return new WP_Error( 'rest_cannot_edit_others', __( 'Sorry, you are not allowed to update posts as this user.' ), array( 'status' => rest_authorization_required_code() ) );
|
||||
}
|
||||
|
||||
if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) && ! current_user_can( $post_type->cap->publish_posts ) ) {
|
||||
if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) ) {
|
||||
return new WP_Error( 'rest_cannot_assign_sticky', __( 'Sorry, you are not allowed to make posts sticky.' ), array( 'status' => rest_authorization_required_code() ) );
|
||||
}
|
||||
|
||||
@@ -922,7 +922,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
* @return stdClass|WP_Error Post object or WP_Error.
|
||||
*/
|
||||
protected function prepare_item_for_database( $request ) {
|
||||
$prepared_post = new stdClass();
|
||||
$prepared_post = new stdClass;
|
||||
|
||||
// Post ID.
|
||||
if ( isset( $request['id'] ) ) {
|
||||
|
||||
@@ -1692,7 +1692,7 @@ function wp_insert_user( $userdata ) {
|
||||
$data = apply_filters( 'wp_pre_insert_user_data', $data, $update, $update ? (int) $ID : null );
|
||||
|
||||
if ( $update ) {
|
||||
if ( $user_email !== $old_user_data->user_email || $user_pass !== $old_user_data->user_pass ) {
|
||||
if ( $user_email !== $old_user_data->user_email ) {
|
||||
$data['user_activation_key'] = '';
|
||||
}
|
||||
$wpdb->update( $wpdb->users, $data, compact( 'ID' ) );
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9.15';
|
||||
$wp_version = '4.9.9';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user