Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29ffbff370 | ||
|
|
553d6fdbe0 | ||
|
|
35b40d1001 | ||
|
|
a5f8e0917f | ||
|
|
73615e0bc4 | ||
|
|
567de560e9 | ||
|
|
ff85340727 | ||
|
|
ecf8680978 | ||
|
|
36282a2a9c | ||
|
|
44eb69904d | ||
|
|
ce6b628972 | ||
|
|
0110751ddc | ||
|
|
5e736b62e0 | ||
|
|
eb18399c10 | ||
|
|
c268b2f28c | ||
|
|
15b14c30c1 | ||
|
|
0d7f326477 | ||
|
|
062ab0b0c8 | ||
|
|
46c75fbaf7 | ||
|
|
11e007c502 | ||
|
|
b0c557fbb2 | ||
|
|
277261edeb | ||
|
|
1b39843b11 | ||
|
|
6cc5d01d17 | ||
|
|
523fcaca2e | ||
|
|
a647fbead2 | ||
|
|
389166f9aa | ||
|
|
af74789be0 | ||
|
|
ca12fb6710 | ||
|
|
707a3196f7 | ||
|
|
e6a91f7ccf | ||
|
|
bbef4fd178 | ||
|
|
fcb3e4d712 |
@@ -53,7 +53,9 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
</div>
|
||||
|
||||
<div class="floating-header-section">
|
||||
<h2><?php _e( 'Customizer Workflow Improved' ); ?></h2>
|
||||
<div class="section-header">
|
||||
<h2><?php _e( 'Customizer Workflow Improved' ); ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="section-item">
|
||||
@@ -88,7 +90,9 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
</div>
|
||||
|
||||
<div class="floating-header-section">
|
||||
<h2><?php _e( 'Coding Enhancements' ); ?></h2>
|
||||
<div class="section-header">
|
||||
<h2><?php _e( 'Coding Enhancements' ); ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="section-item">
|
||||
@@ -116,7 +120,9 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
</div>
|
||||
|
||||
<div class="floating-header-section">
|
||||
<h2><?php _e( 'Even More Widget Updates' ); ?></h2>
|
||||
<div class="section-header">
|
||||
<h2><?php _e( 'Even More Widget Updates' ); ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="section-item">
|
||||
@@ -137,7 +143,9 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
</div>
|
||||
|
||||
<div class="floating-header-section">
|
||||
<h2><?php _e( 'Site Building Improvements' ); ?></h2>
|
||||
<div class="section-header">
|
||||
<h2><?php _e( 'Site Building Improvements' ); ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="section-item">
|
||||
@@ -211,7 +219,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<p><?php _e( 'WordPress 4.9 includes an upgraded version of MediaElement.js, which removes dependencies on jQuery, improves accessibility, modernizes the UI, and fixes many bugs.' ); ?></p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3><a href="https://make.wordpress.org/core/2017/10/15/improvements-for-roles-and-capabilities-in-4-9/"><?php _e( 'Roles and Capability Improvements' ); ?></a></h3>
|
||||
<h3><a href="https://make.wordpress.org/core/2017/10/15/improvements-for-roles-and-capabilities-in-4-9/"><?php _e( 'Improvements to Roles and Capabilities' ); ?></a></h3>
|
||||
<p><?php _e( 'New capabilities have been introduced that allow granular management of plugins and translation files. In addition, the site switching process in multisite has been fine-tuned to update the available roles and capabilities in a more reliable and coherent way.' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -242,34 +250,78 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
offset += $adminbar.height();
|
||||
}
|
||||
|
||||
var adjustScrollClass = _.throttle( function adjustScrollClass() {
|
||||
function setup() {
|
||||
$sections.each( function( i, section ) {
|
||||
var $section = $( section );
|
||||
// If the title is long, switch the layout
|
||||
var $title = $section.find( 'h2' );
|
||||
if ( $title.innerWidth() > 300 ) {
|
||||
$section.addClass( 'has-long-title' );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
var adjustScrollPosition = _.throttle( function adjustScrollPosition() {
|
||||
$sections.each( function( i, section ) {
|
||||
var $section = $( section );
|
||||
var $header = $section.find( 'h2' );
|
||||
var width = $header.innerWidth();
|
||||
var height = $header.innerHeight();
|
||||
|
||||
if ( $section.hasClass( 'has-long-title' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var sectionStart = $section.offset().top - offset;
|
||||
var sectionEnd = sectionStart + $section.innerHeight() - 60;
|
||||
var sectionEnd = sectionStart + $section.innerHeight();
|
||||
var scrollPos = $window.scrollTop();
|
||||
|
||||
// If we're scrolled into a section, stick the header
|
||||
if ( $window.scrollTop() >= sectionStart && $window.scrollTop() < sectionEnd ) {
|
||||
$header.addClass( 'header-fixed' );
|
||||
$header.css( { top: offset + 'px', width: width + 'px' } );
|
||||
if ( scrollPos >= sectionStart && scrollPos < sectionEnd - height ) {
|
||||
$header.css( {
|
||||
position: 'fixed',
|
||||
top: offset + 'px',
|
||||
bottom: 'auto',
|
||||
width: width + 'px'
|
||||
} );
|
||||
// If we're at the end of the section, stick the header to the bottom
|
||||
} else if ( scrollPos >= sectionEnd - height && scrollPos < sectionEnd ) {
|
||||
$header.css( {
|
||||
position: 'absolute',
|
||||
top: 'auto',
|
||||
bottom: 0,
|
||||
width: width + 'px'
|
||||
} );
|
||||
// Unstick the header
|
||||
} else {
|
||||
$header.removeClass( 'header-fixed' );
|
||||
$header.css( { top: 0, width: 'auto' } );
|
||||
$header.css( {
|
||||
position: 'static',
|
||||
top: 'auto',
|
||||
bottom: 'auto',
|
||||
width: 'auto'
|
||||
} );
|
||||
}
|
||||
} );
|
||||
}, 100 );
|
||||
|
||||
function enableFixedHeaders() {
|
||||
if ( $window.width() > 782 ) {
|
||||
adjustScrollClass();
|
||||
$window.on( 'scroll', adjustScrollClass );
|
||||
setup();
|
||||
adjustScrollPosition();
|
||||
$window.on( 'scroll', adjustScrollPosition );
|
||||
} else {
|
||||
$window.off( 'scroll', adjustScrollClass );
|
||||
$window.off( 'scroll', adjustScrollPosition );
|
||||
$sections.find( '.section-header' )
|
||||
.css( {
|
||||
width: 'auto'
|
||||
} );
|
||||
$sections.find( 'h2' )
|
||||
.removeClass( 'header-fixed' )
|
||||
.css( { top: 0, width: 'auto' } );
|
||||
.css( {
|
||||
position: 'static',
|
||||
top: 'auto',
|
||||
bottom: 'auto',
|
||||
width: 'auto'
|
||||
} );
|
||||
}
|
||||
}
|
||||
$( window ).resize( enableFixedHeaders );
|
||||
|
||||
@@ -20,7 +20,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
|
||||
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
|
||||
|
||||
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s adds more ways for you to express yourself and represent your brand.' ), $display_version ); ?></p>
|
||||
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s will smooth your design workflow and keep you safe from coding errors.' ), $display_version ); ?></p>
|
||||
|
||||
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
|
||||
|
||||
|
||||
@@ -172,8 +172,6 @@
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
justify-content: space-between;
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@@ -262,8 +260,10 @@
|
||||
|
||||
.about-wrap .two-col-text {
|
||||
-webkit-column-count: 2;
|
||||
-moz-column-count: 2;
|
||||
column-count: 2;
|
||||
-webkit-column-gap: 40px;
|
||||
-moz-column-gap: 40px;
|
||||
column-gap: 40px;
|
||||
}
|
||||
|
||||
@@ -357,37 +357,87 @@
|
||||
/* 2.3 Floating Header Layout */
|
||||
|
||||
.about-wrap .floating-header-section {
|
||||
display: -ms-grid;
|
||||
display: grid;
|
||||
grid-gap: 0 60px;
|
||||
-ms-grid-columns: 5fr 11fr;
|
||||
grid-template-columns: 5fr 11fr;
|
||||
max-width: 1020px;
|
||||
margin: 0 auto 120px;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section h2 {
|
||||
.about-wrap .floating-header-section .section-header {
|
||||
-ms-grid-column: 1;
|
||||
grid-column: 1;
|
||||
text-align: right;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
min-width: 230px;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .header-fixed {
|
||||
position: fixed;
|
||||
width: 300px;
|
||||
.about-wrap .floating-header-section h2 {
|
||||
margin: 0;
|
||||
text-align: right;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .section-content {
|
||||
display: grid;
|
||||
grid-gap: 60px;
|
||||
grid-template-columns: 5fr 5fr;
|
||||
-ms-grid-column: 2;
|
||||
grid-column: 2;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
justify-content: space-between;
|
||||
-webkit-box-align: start;
|
||||
align-items: flex-start;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
flex-flow: row wrap;
|
||||
-webkit-box-flex: 2;
|
||||
flex-grow: 2;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .section-item:nth-of-type(odd) {
|
||||
grid-column: 1;
|
||||
.about-wrap .floating-header-section .section-item {
|
||||
-webkit-box-flex: 1;
|
||||
flex-grow: 1;
|
||||
max-width: calc(50% - 30px);
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .section-item:nth-of-type(even) {
|
||||
grid-column: 2;
|
||||
.about-wrap .floating-header-section .section-item:nth-child(1),
|
||||
.about-wrap .floating-header-section .section-item:nth-child(2) {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .section-item:nth-child(1):nth-last-child(2),
|
||||
.about-wrap .floating-header-section .section-item:nth-child(2):nth-last-child(1) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title .section-header {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title h2 {
|
||||
position: static;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title .section-content {
|
||||
-webkit-box-pack: start;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title .section-item {
|
||||
max-width: 300px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title .section-item + .section-item {
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
@@ -409,7 +459,7 @@
|
||||
}
|
||||
|
||||
.about-wrap .compact {
|
||||
margin-bottom: 0
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.about-wrap .wp-person {
|
||||
@@ -481,9 +531,27 @@
|
||||
4.0 - Media Queries
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
@media screen and ( max-width: 782px ) {
|
||||
@media screen and (max-width: 1250px) {
|
||||
.about-wrap .floating-header-section.has-long-title .section-item:nth-child(1),
|
||||
.about-wrap .floating-header-section.has-long-title .section-item:nth-child(2) {
|
||||
margin: 0 0 60px;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title .section-item:nth-child(3),
|
||||
.about-wrap .floating-header-section.has-long-title .section-item:nth-child(4) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title .section-item:nth-child(2),
|
||||
.about-wrap .floating-header-section.has-long-title .section-item:nth-child(4) {
|
||||
margin-right: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 782px) {
|
||||
.about-wrap .two-col-text {
|
||||
-webkit-column-count: 1;
|
||||
-moz-column-count: 1;
|
||||
column-count: 1;
|
||||
}
|
||||
|
||||
@@ -498,13 +566,17 @@
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section {
|
||||
grid-template-columns: 1fr;
|
||||
grid-gap: 60px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section h2,
|
||||
.about-wrap .floating-header-section .section-header,
|
||||
.about-wrap .floating-header-section .section-content {
|
||||
grid-column: 1;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section h2 {
|
||||
position: static;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,12 +632,15 @@
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .section-content {
|
||||
grid-template-columns: 1fr;
|
||||
grid-gap: 60px 0;
|
||||
.about-wrap .floating-header-section h2 {
|
||||
word-break: break-all;
|
||||
-webkit-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .section-content .section-item {
|
||||
grid-column: 1;
|
||||
max-width: 100%;
|
||||
margin: 0 0 60px;
|
||||
}
|
||||
}
|
||||
|
||||
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
@@ -172,8 +172,6 @@
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
justify-content: space-between;
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@@ -262,8 +260,10 @@
|
||||
|
||||
.about-wrap .two-col-text {
|
||||
-webkit-column-count: 2;
|
||||
-moz-column-count: 2;
|
||||
column-count: 2;
|
||||
-webkit-column-gap: 40px;
|
||||
-moz-column-gap: 40px;
|
||||
column-gap: 40px;
|
||||
}
|
||||
|
||||
@@ -357,37 +357,87 @@
|
||||
/* 2.3 Floating Header Layout */
|
||||
|
||||
.about-wrap .floating-header-section {
|
||||
display: -ms-grid;
|
||||
display: grid;
|
||||
grid-gap: 0 60px;
|
||||
-ms-grid-columns: 5fr 11fr;
|
||||
grid-template-columns: 5fr 11fr;
|
||||
max-width: 1020px;
|
||||
margin: 0 auto 120px;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section h2 {
|
||||
.about-wrap .floating-header-section .section-header {
|
||||
-ms-grid-column: 1;
|
||||
grid-column: 1;
|
||||
text-align: left;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
min-width: 230px;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .header-fixed {
|
||||
position: fixed;
|
||||
width: 300px;
|
||||
.about-wrap .floating-header-section h2 {
|
||||
margin: 0;
|
||||
text-align: left;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .section-content {
|
||||
display: grid;
|
||||
grid-gap: 60px;
|
||||
grid-template-columns: 5fr 5fr;
|
||||
-ms-grid-column: 2;
|
||||
grid-column: 2;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
justify-content: space-between;
|
||||
-webkit-box-align: start;
|
||||
align-items: flex-start;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
flex-flow: row wrap;
|
||||
-webkit-box-flex: 2;
|
||||
flex-grow: 2;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .section-item:nth-of-type(odd) {
|
||||
grid-column: 1;
|
||||
.about-wrap .floating-header-section .section-item {
|
||||
-webkit-box-flex: 1;
|
||||
flex-grow: 1;
|
||||
max-width: calc(50% - 30px);
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .section-item:nth-of-type(even) {
|
||||
grid-column: 2;
|
||||
.about-wrap .floating-header-section .section-item:nth-child(1),
|
||||
.about-wrap .floating-header-section .section-item:nth-child(2) {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .section-item:nth-child(1):nth-last-child(2),
|
||||
.about-wrap .floating-header-section .section-item:nth-child(2):nth-last-child(1) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title .section-header {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title h2 {
|
||||
position: static;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title .section-content {
|
||||
-webkit-box-pack: start;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title .section-item {
|
||||
max-width: 300px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title .section-item + .section-item {
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
@@ -409,7 +459,7 @@
|
||||
}
|
||||
|
||||
.about-wrap .compact {
|
||||
margin-bottom: 0
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.about-wrap .wp-person {
|
||||
@@ -481,9 +531,27 @@
|
||||
4.0 - Media Queries
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
@media screen and ( max-width: 782px ) {
|
||||
@media screen and (max-width: 1250px) {
|
||||
.about-wrap .floating-header-section.has-long-title .section-item:nth-child(1),
|
||||
.about-wrap .floating-header-section.has-long-title .section-item:nth-child(2) {
|
||||
margin: 0 0 60px;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title .section-item:nth-child(3),
|
||||
.about-wrap .floating-header-section.has-long-title .section-item:nth-child(4) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section.has-long-title .section-item:nth-child(2),
|
||||
.about-wrap .floating-header-section.has-long-title .section-item:nth-child(4) {
|
||||
margin-left: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 782px) {
|
||||
.about-wrap .two-col-text {
|
||||
-webkit-column-count: 1;
|
||||
-moz-column-count: 1;
|
||||
column-count: 1;
|
||||
}
|
||||
|
||||
@@ -498,13 +566,17 @@
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section {
|
||||
grid-template-columns: 1fr;
|
||||
grid-gap: 60px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section h2,
|
||||
.about-wrap .floating-header-section .section-header,
|
||||
.about-wrap .floating-header-section .section-content {
|
||||
grid-column: 1;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section h2 {
|
||||
position: static;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,12 +632,15 @@
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .section-content {
|
||||
grid-template-columns: 1fr;
|
||||
grid-gap: 60px 0;
|
||||
.about-wrap .floating-header-section h2 {
|
||||
word-break: break-all;
|
||||
-webkit-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
.about-wrap .floating-header-section .section-content .section-item {
|
||||
grid-column: 1;
|
||||
max-width: 100%;
|
||||
margin: 0 0 60px;
|
||||
}
|
||||
}
|
||||
|
||||
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
2
wp-admin/css/colors/light/colors-rtl.min.css
vendored
2
wp-admin/css/colors/light/colors-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/css/colors/light/colors.min.css
vendored
2
wp-admin/css/colors/light/colors.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -860,7 +860,7 @@ hr {
|
||||
#media-items a.delete,
|
||||
#media-items a.delete-permanently,
|
||||
#nav-menu-footer .menu-delete,
|
||||
#delete-link a.delete {
|
||||
#delete-link a.delete {
|
||||
color: #a00;
|
||||
}
|
||||
|
||||
@@ -1700,7 +1700,7 @@ form.upgrade .hint {
|
||||
|
||||
.toggle-arrow {
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
background-position: top right;
|
||||
background-color: transparent;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
@@ -1708,7 +1708,7 @@ form.upgrade .hint {
|
||||
}
|
||||
|
||||
.toggle-arrow-active {
|
||||
background-position: bottom left;
|
||||
background-position: bottom right;
|
||||
}
|
||||
|
||||
#screen-options-wrap h5, /* Back-compat for old plugins */
|
||||
@@ -3042,6 +3042,7 @@ img {
|
||||
min-height: 60vh;
|
||||
height: calc( 100vh - 295px );
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#templateside > h2 {
|
||||
@@ -3060,8 +3061,8 @@ img {
|
||||
margin-top: 0;
|
||||
overflow: auto;
|
||||
padding: 0;
|
||||
min-height: calc(60vh + 2px);
|
||||
height: calc(100vh - 293px);
|
||||
min-height: 60vh;
|
||||
height: calc(100vh - 295px);
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #ddd;
|
||||
border-right: none;
|
||||
@@ -3240,17 +3241,21 @@ img {
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
#templateside li a,
|
||||
#templateside li:not(.howto) a,
|
||||
.theme-editor-php .highlight {
|
||||
display: block;
|
||||
padding: 3px 12px 3px 0;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#templateside li > a:first-of-type {
|
||||
#templateside li:not(.howto) > a:first-of-type {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#templateside li.howto {
|
||||
padding: 6px 12px 12px 12px;
|
||||
}
|
||||
|
||||
.theme-editor-php .highlight {
|
||||
margin: -3px -12px -3px 3px;
|
||||
}
|
||||
@@ -3756,17 +3761,17 @@ img {
|
||||
}
|
||||
|
||||
/* Theme/Plugin File Editor */
|
||||
|
||||
#template textarea,
|
||||
|
||||
#template textarea,
|
||||
#template .CodeMirror {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
#templateside {
|
||||
float: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
||||
#templateside > ul {
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
@@ -3775,10 +3780,13 @@ img {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#templateside li a {
|
||||
#templateside li:not(.howto) a {
|
||||
display: block;
|
||||
padding: 5px;
|
||||
}
|
||||
#templateside li.howto {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
#templateside .highlight {
|
||||
padding: 5px;
|
||||
@@ -3834,31 +3842,31 @@ img {
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
.fileedit-sub .alignright label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.fileedit-sub #theme,
|
||||
|
||||
.fileedit-sub #theme,
|
||||
.fileedit-sub #plugin {
|
||||
margin-right: 0;
|
||||
max-width: 70%;
|
||||
max-width: 70%;
|
||||
}
|
||||
|
||||
|
||||
.fileedit-sub input[type="submit"] {
|
||||
margin-bottom: 0px;
|
||||
padding: 8px 18px;
|
||||
}
|
||||
|
||||
|
||||
#documentation label[for="docs-list"] {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
#documentation select[name="docs-list"] {
|
||||
margin-right: 0;
|
||||
max-width: 60%;
|
||||
}
|
||||
|
||||
|
||||
#documentation input[type="button"] {
|
||||
margin-bottom: 0;
|
||||
padding: 8px 18px;
|
||||
|
||||
4
wp-admin/css/common-rtl.min.css
vendored
4
wp-admin/css/common-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -860,7 +860,7 @@ hr {
|
||||
#media-items a.delete,
|
||||
#media-items a.delete-permanently,
|
||||
#nav-menu-footer .menu-delete,
|
||||
#delete-link a.delete {
|
||||
#delete-link a.delete {
|
||||
color: #a00;
|
||||
}
|
||||
|
||||
@@ -3042,6 +3042,7 @@ img {
|
||||
min-height: 60vh;
|
||||
height: calc( 100vh - 295px );
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#templateside > h2 {
|
||||
@@ -3060,8 +3061,8 @@ img {
|
||||
margin-top: 0;
|
||||
overflow: auto;
|
||||
padding: 0;
|
||||
min-height: calc(60vh + 2px);
|
||||
height: calc(100vh - 293px);
|
||||
min-height: 60vh;
|
||||
height: calc(100vh - 295px);
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #ddd;
|
||||
border-left: none;
|
||||
@@ -3240,17 +3241,21 @@ img {
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
#templateside li a,
|
||||
#templateside li:not(.howto) a,
|
||||
.theme-editor-php .highlight {
|
||||
display: block;
|
||||
padding: 3px 0 3px 12px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#templateside li > a:first-of-type {
|
||||
#templateside li:not(.howto) > a:first-of-type {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#templateside li.howto {
|
||||
padding: 6px 12px 12px 12px;
|
||||
}
|
||||
|
||||
.theme-editor-php .highlight {
|
||||
margin: -3px 3px -3px -12px;
|
||||
}
|
||||
@@ -3756,17 +3761,17 @@ img {
|
||||
}
|
||||
|
||||
/* Theme/Plugin File Editor */
|
||||
|
||||
#template textarea,
|
||||
|
||||
#template textarea,
|
||||
#template .CodeMirror {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
#templateside {
|
||||
float: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
||||
#templateside > ul {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
@@ -3775,10 +3780,13 @@ img {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#templateside li a {
|
||||
#templateside li:not(.howto) a {
|
||||
display: block;
|
||||
padding: 5px;
|
||||
}
|
||||
#templateside li.howto {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
#templateside .highlight {
|
||||
padding: 5px;
|
||||
@@ -3834,31 +3842,31 @@ img {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
.fileedit-sub .alignright label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.fileedit-sub #theme,
|
||||
|
||||
.fileedit-sub #theme,
|
||||
.fileedit-sub #plugin {
|
||||
margin-left: 0;
|
||||
max-width: 70%;
|
||||
max-width: 70%;
|
||||
}
|
||||
|
||||
|
||||
.fileedit-sub input[type="submit"] {
|
||||
margin-bottom: 0px;
|
||||
padding: 8px 18px;
|
||||
}
|
||||
|
||||
|
||||
#documentation label[for="docs-list"] {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
#documentation select[name="docs-list"] {
|
||||
margin-left: 0;
|
||||
max-width: 60%;
|
||||
}
|
||||
|
||||
|
||||
#documentation input[type="button"] {
|
||||
margin-bottom: 0;
|
||||
padding: 8px 18px;
|
||||
|
||||
4
wp-admin/css/common.min.css
vendored
4
wp-admin/css/common.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -2706,6 +2706,7 @@ body.adding-widget .add-new-widget:before,
|
||||
}
|
||||
|
||||
#available-menu-items-search .search-icon:after,
|
||||
#available-widgets-filter .search-icon:after,
|
||||
.themes-filter-bar .search-icon:after {
|
||||
content: "\f179";
|
||||
font: normal 20px/1 dashicons;
|
||||
|
||||
2
wp-admin/css/customize-controls-rtl.min.css
vendored
2
wp-admin/css/customize-controls-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -2706,6 +2706,7 @@ body.adding-widget .add-new-widget:before,
|
||||
}
|
||||
|
||||
#available-menu-items-search .search-icon:after,
|
||||
#available-widgets-filter .search-icon:after,
|
||||
.themes-filter-bar .search-icon:after {
|
||||
content: "\f179";
|
||||
font: normal 20px/1 dashicons;
|
||||
|
||||
2
wp-admin/css/customize-controls.min.css
vendored
2
wp-admin/css/customize-controls.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -330,7 +330,7 @@ form#tags-filter {
|
||||
}
|
||||
|
||||
#content-resize-handle {
|
||||
background: transparent url(../images/resize.gif) no-repeat scroll right bottom;
|
||||
background: transparent url(../images/resize.gif) no-repeat scroll left bottom;
|
||||
width: 12px;
|
||||
cursor: row-resize;
|
||||
}
|
||||
@@ -1299,7 +1299,7 @@ table.links-table {
|
||||
(min-resolution: 120dpi) {
|
||||
#content-resize-handle,
|
||||
#post-body .wp_themeSkin .mceStatusbar a.mceResize {
|
||||
background: transparent url(../images/resize-2x.gif) no-repeat scroll right bottom;
|
||||
background: transparent url(../images/resize-2x.gif) no-repeat scroll left bottom;
|
||||
background-size: 11px 11px;
|
||||
}
|
||||
|
||||
|
||||
2
wp-admin/css/edit-rtl.min.css
vendored
2
wp-admin/css/edit-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -897,7 +897,7 @@ table.form-table td .updated p {
|
||||
|
||||
.options-general-php .spinner {
|
||||
float: none;
|
||||
margin: 0 3px;
|
||||
margin: -3px 3px 0;
|
||||
}
|
||||
|
||||
.settings-php .language-install-spinner,
|
||||
|
||||
2
wp-admin/css/forms-rtl.min.css
vendored
2
wp-admin/css/forms-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -897,7 +897,7 @@ table.form-table td .updated p {
|
||||
|
||||
.options-general-php .spinner {
|
||||
float: none;
|
||||
margin: 0 3px;
|
||||
margin: -3px 3px 0;
|
||||
}
|
||||
|
||||
.settings-php .language-install-spinner,
|
||||
|
||||
2
wp-admin/css/forms.min.css
vendored
2
wp-admin/css/forms.min.css
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/css/login-rtl.min.css
vendored
2
wp-admin/css/login-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/css/login.min.css
vendored
2
wp-admin/css/login.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -154,7 +154,8 @@
|
||||
top: 30px;
|
||||
}
|
||||
|
||||
.media-frame #embed-url-field.invalid {
|
||||
.media-frame #embed-url-field.invalid,
|
||||
.media-widget-image-link > .link:invalid {
|
||||
border: 1px solid #dc3232;
|
||||
}
|
||||
|
||||
|
||||
2
wp-admin/css/widgets-rtl.min.css
vendored
2
wp-admin/css/widgets-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -154,7 +154,8 @@
|
||||
top: 30px;
|
||||
}
|
||||
|
||||
.media-frame #embed-url-field.invalid {
|
||||
.media-frame #embed-url-field.invalid,
|
||||
.media-widget-image-link > .link:invalid {
|
||||
border: 1px solid #dc3232;
|
||||
}
|
||||
|
||||
|
||||
2
wp-admin/css/widgets.min.css
vendored
2
wp-admin/css/widgets.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -42,10 +42,34 @@ if ( $wp_customize->changeset_post_id() ) {
|
||||
get_post_time( 'G', true, $changeset_post ) < time()
|
||||
);
|
||||
if ( $missed_schedule ) {
|
||||
wp_publish_post( $changeset_post->ID );
|
||||
/*
|
||||
* Note that an Ajax request spawns here instead of just calling `wp_publish_post( $changeset_post->ID )`.
|
||||
*
|
||||
* Because WP_Customize_Manager is not instantiated for customize.php with the `settings_previewed=false`
|
||||
* argument, settings cannot be reliably saved. Some logic short-circuits if the current value is the
|
||||
* same as the value being saved. This is particularly true for options via `update_option()`.
|
||||
*
|
||||
* By opening an Ajax request, this is avoided and the changeset is published. See #39221.
|
||||
*/
|
||||
$nonces = $wp_customize->get_nonces();
|
||||
$request_args = array(
|
||||
'nonce' => $nonces['save'],
|
||||
'customize_changeset_uuid' => $wp_customize->changeset_uuid(),
|
||||
'wp_customize' => 'on',
|
||||
'customize_changeset_status' => 'publish',
|
||||
);
|
||||
ob_start();
|
||||
?>
|
||||
<?php wp_print_scripts( array( 'wp-util' ) ); ?>
|
||||
<script>
|
||||
wp.ajax.post( 'customize_save', <?php echo wp_json_encode( $request_args ); ?> );
|
||||
</script>
|
||||
<?php
|
||||
$script = ob_get_clean();
|
||||
|
||||
wp_die(
|
||||
'<h1>' . __( 'Your scheduled changes just published' ) . '</h1>' .
|
||||
'<p><a href="' . esc_url( remove_query_arg( 'changeset_uuid' ) ) . '">' . __( 'Customize New Changes' ) . '</a></p>',
|
||||
'<p><a href="' . esc_url( remove_query_arg( 'changeset_uuid' ) ) . '">' . __( 'Customize New Changes' ) . '</a></p>' . $script,
|
||||
200
|
||||
);
|
||||
}
|
||||
|
||||
@@ -639,7 +639,7 @@ if ( post_type_supports($post_type, 'editor') ) {
|
||||
'resize' => false,
|
||||
'wp_autoresize_on' => $_wp_editor_expand,
|
||||
'add_unload_trigger' => false,
|
||||
'wp_keep_scroll_position' => true,
|
||||
'wp_keep_scroll_position' => ! $is_IE,
|
||||
),
|
||||
) ); ?>
|
||||
<table id="post-status-info"><tbody><tr>
|
||||
|
||||
@@ -19,7 +19,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
|
||||
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
|
||||
|
||||
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s adds more ways for you to express yourself and represent your brand.' ), $display_version ); ?></p>
|
||||
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s will smooth your design workflow and keep you safe from coding errors.' ), $display_version ); ?></p>
|
||||
|
||||
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
|
||||
|
||||
|
||||
@@ -1567,14 +1567,14 @@ function wp_welcome_panel() {
|
||||
<p class="about-description"><?php _e( 'We’ve assembled some links to get you started:' ); ?></p>
|
||||
<div class="welcome-panel-column-container">
|
||||
<div class="welcome-panel-column">
|
||||
<?php if ( current_user_can( 'customize' ) ):
|
||||
$customize_themes_link = add_query_arg( 'autofocus[panel]', 'themes', admin_url( 'customize.php' ) ); ?>
|
||||
<?php if ( current_user_can( 'customize' ) ) : ?>
|
||||
<h3><?php _e( 'Get Started' ); ?></h3>
|
||||
<a class="button button-primary button-hero load-customize hide-if-no-customize" href="<?php echo wp_customize_url(); ?>"><?php _e( 'Customize Your Site' ); ?></a>
|
||||
<?php endif; ?>
|
||||
<a class="button button-primary button-hero hide-if-customize" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Customize Your Site' ); ?></a>
|
||||
<?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array( 'allowed' => true ) ) ) > 1 ) ) : ?>
|
||||
<p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), $customize_themes_link ); ?></p>
|
||||
<?php $themes_link = current_user_can( 'customize' ) ? add_query_arg( 'autofocus[panel]', 'themes', admin_url( 'customize.php' ) ) : admin_url( 'themes.php' ); ?>
|
||||
<p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s">change your theme completely</a>' ), $themes_link ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="welcome-panel-column">
|
||||
|
||||
@@ -51,7 +51,7 @@ function options_general_add_js() {
|
||||
|
||||
$("input[name='date_format']").click(function(){
|
||||
if ( "date_format_custom_radio" != $(this).attr("id") )
|
||||
$( "input[name='date_format_custom']" ).val( $( this ).val() ).siblings( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() );
|
||||
$( 'input[name="date_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() );
|
||||
});
|
||||
$( 'input[name="date_format_custom"]' ).on( 'click input', function() {
|
||||
$( '#date_format_custom_radio' ).prop( 'checked', true );
|
||||
@@ -59,18 +59,23 @@ function options_general_add_js() {
|
||||
|
||||
$("input[name='time_format']").click(function(){
|
||||
if ( "time_format_custom_radio" != $(this).attr("id") )
|
||||
$( "input[name='time_format_custom']" ).val( $( this ).val() ).siblings( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() );
|
||||
$( 'input[name="time_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() );
|
||||
});
|
||||
$( 'input[name="time_format_custom"]' ).on( 'click input', function() {
|
||||
$( '#time_format_custom_radio' ).prop( 'checked', true );
|
||||
});
|
||||
$("input[name='date_format_custom'], input[name='time_format_custom']").change( function() {
|
||||
var format = $(this);
|
||||
format.siblings( '.spinner' ).addClass( 'is-active' );
|
||||
$.post(ajaxurl, {
|
||||
action: 'date_format_custom' == format.attr('name') ? 'date_format' : 'time_format',
|
||||
var format = $( this ),
|
||||
fieldset = format.closest( 'fieldset' ),
|
||||
example = fieldset.find( '.example' ),
|
||||
spinner = fieldset.find( '.spinner' );
|
||||
|
||||
spinner.addClass( 'is-active' );
|
||||
|
||||
$.post( ajaxurl, {
|
||||
action: 'date_format_custom' == format.attr( 'name' ) ? 'date_format' : 'time_format',
|
||||
date : format.val()
|
||||
}, function(d) { format.siblings( '.spinner' ).removeClass( 'is-active' ); format.siblings('.example').text(d); } );
|
||||
}, function( d ) { spinner.removeClass( 'is-active' ); example.text( d ); } );
|
||||
});
|
||||
|
||||
var languageSelect = $( '#WPLANG' );
|
||||
|
||||
@@ -1457,8 +1457,9 @@ function get_settings_errors( $setting = '', $sanitize = false ) {
|
||||
}
|
||||
|
||||
// Check global in case errors have been added on this pageload.
|
||||
if ( ! count( $wp_settings_errors ) )
|
||||
if ( empty( $wp_settings_errors ) ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
// Filter the results to those of a specific setting if one was set.
|
||||
if ( $setting ) {
|
||||
|
||||
@@ -1867,6 +1867,9 @@
|
||||
// Search terms.
|
||||
debounced = _.debounce( section.checkTerm, 500 ); // Wait until there is no input for 500 milliseconds to initiate a search.
|
||||
section.contentContainer.on( 'input', '.wp-filter-search', function() {
|
||||
if ( ! api.panel( 'themes' ).expanded() ) {
|
||||
return;
|
||||
}
|
||||
debounced( section );
|
||||
if ( ! section.expanded() ) {
|
||||
section.expand();
|
||||
@@ -5280,6 +5283,27 @@
|
||||
codemirror: $.Deferred()
|
||||
} );
|
||||
api.Control.prototype.initialize.call( control, id, options );
|
||||
|
||||
// Note that rendering is debounced so the props will be used when rendering happens after add event.
|
||||
control.notifications.bind( 'add', function( notification ) {
|
||||
|
||||
// Skip if control notification is not from setting csslint_error notification.
|
||||
if ( notification.code !== control.setting.id + ':csslint_error' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Customize the template and behavior of csslint_error notifications.
|
||||
notification.templateId = 'customize-code-editor-lint-error-notification';
|
||||
notification.render = (function( render ) {
|
||||
return function() {
|
||||
var li = render.call( this );
|
||||
li.find( 'input[type=checkbox]' ).on( 'click', function() {
|
||||
control.setting.notifications.remove( 'csslint_error' );
|
||||
} );
|
||||
return li;
|
||||
};
|
||||
})( notification.render );
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -8248,7 +8272,7 @@
|
||||
|
||||
// Set up initial notifications.
|
||||
(function() {
|
||||
var removedQueryParams = [];
|
||||
var removedQueryParams = [], autosaveDismissed = false;
|
||||
|
||||
/**
|
||||
* Obtain the URL to restore the autosave.
|
||||
@@ -8294,6 +8318,25 @@
|
||||
history.replaceState( {}, document.title, urlParser.href );
|
||||
}
|
||||
|
||||
/**
|
||||
* Dismiss autosave.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function dismissAutosave() {
|
||||
if ( autosaveDismissed ) {
|
||||
return;
|
||||
}
|
||||
wp.ajax.post( 'customize_dismiss_autosave_or_lock', {
|
||||
wp_customize: 'on',
|
||||
customize_theme: api.settings.theme.stylesheet,
|
||||
customize_changeset_uuid: api.settings.changeset.uuid,
|
||||
nonce: api.settings.nonce.dismiss_autosave_or_lock,
|
||||
dismiss_autosave: true
|
||||
} );
|
||||
autosaveDismissed = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add notification regarding the availability of an autosave to restore.
|
||||
*
|
||||
@@ -8319,15 +8362,7 @@
|
||||
} );
|
||||
|
||||
// Handle dismissal of notice.
|
||||
li.find( '.notice-dismiss' ).on( 'click', function() {
|
||||
wp.ajax.post( 'customize_dismiss_autosave_or_lock', {
|
||||
wp_customize: 'on',
|
||||
customize_theme: api.settings.theme.stylesheet,
|
||||
customize_changeset_uuid: api.settings.changeset.uuid,
|
||||
nonce: api.settings.nonce.dismiss_autosave_or_lock,
|
||||
dismiss_autosave: true
|
||||
} );
|
||||
} );
|
||||
li.find( '.notice-dismiss' ).on( 'click', dismissAutosave );
|
||||
|
||||
return li;
|
||||
}
|
||||
@@ -8335,6 +8370,7 @@
|
||||
|
||||
// Remove the notification once the user starts making changes.
|
||||
onStateChange = function() {
|
||||
dismissAutosave();
|
||||
api.notifications.remove( code );
|
||||
api.unbind( 'change', onStateChange );
|
||||
api.state( 'changesetStatus' ).unbind( onStateChange );
|
||||
@@ -9191,12 +9227,14 @@
|
||||
|
||||
api.unbind( 'change', startAutosaving ); // Ensure startAutosaving only fires once.
|
||||
|
||||
api.state( 'saved' ).bind( function( isSaved ) {
|
||||
function onChangeSaved( isSaved ) {
|
||||
if ( ! isSaved && ! api.settings.changeset.autosaved ) {
|
||||
api.settings.changeset.autosaved = true; // Once a change is made then autosaving kicks in.
|
||||
api.previewer.send( 'autosaving' );
|
||||
}
|
||||
} );
|
||||
}
|
||||
api.state( 'saved' ).bind( onChangeSaved );
|
||||
onChangeSaved( api.state( 'saved' ).get() );
|
||||
|
||||
/**
|
||||
* Request changeset update and then re-schedule the next changeset update time.
|
||||
|
||||
8
wp-admin/js/customize-controls.min.js
vendored
8
wp-admin/js/customize-controls.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -537,33 +537,37 @@
|
||||
var menuItem,
|
||||
itemName = $( '#custom-menu-item-name' ),
|
||||
itemUrl = $( '#custom-menu-item-url' ),
|
||||
urlRegex,
|
||||
urlValue;
|
||||
urlRegex;
|
||||
|
||||
if ( ! this.currentMenuControl ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010-2013 Diego Perini, MIT licensed
|
||||
* https://gist.github.com/dperini/729294
|
||||
* see also https://mathiasbynens.be/demo/url-regex
|
||||
* modified to allow protocol-relative URLs
|
||||
* Allow URLs including:
|
||||
* - http://example.com/
|
||||
* - //example.com
|
||||
* - /directory/
|
||||
* - ?query-param
|
||||
* - #target
|
||||
* - mailto:foo@example.com
|
||||
*
|
||||
* Any further validation will be handled on the server when the setting is attempted to be saved,
|
||||
* so this pattern does not need to be complete.
|
||||
*/
|
||||
urlRegex = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i;
|
||||
urlRegex = /^((\w+:)?\/\/\w.*|\w+:(?!\/\/$)|\/|\?|#)/;
|
||||
|
||||
urlValue = itemUrl.val();
|
||||
if ( '' === itemName.val() ) {
|
||||
itemName.addClass( 'invalid' );
|
||||
return;
|
||||
} else if ( '' === urlValue || 'http://' === urlValue || ! ( '/' === urlValue[0] || urlRegex.test( urlValue ) ) ) {
|
||||
} else if ( ! urlRegex.test( itemUrl.val() ) ) {
|
||||
itemUrl.addClass( 'invalid' );
|
||||
return;
|
||||
}
|
||||
|
||||
menuItem = {
|
||||
'title': itemName.val(),
|
||||
'url': urlValue,
|
||||
'url': itemUrl.val(),
|
||||
'type': 'custom',
|
||||
'type_label': api.Menus.data.l10n.custom_label,
|
||||
'object': 'custom'
|
||||
|
||||
4
wp-admin/js/customize-nav-menus.min.js
vendored
4
wp-admin/js/customize-nav-menus.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -270,7 +270,7 @@ window.wp = window.wp || {};
|
||||
if ( shortcodes ) {
|
||||
for ( var i = 0; i < shortcodes.length; i++ ) {
|
||||
var shortcode = shortcodes[ i ].replace( /^\[+/g, '' );
|
||||
|
||||
|
||||
if ( result.indexOf( shortcode ) === -1 ) {
|
||||
result.push( shortcode );
|
||||
}
|
||||
@@ -581,6 +581,8 @@ window.wp = window.wp || {};
|
||||
|
||||
removeSelectionMarker( startNode );
|
||||
removeSelectionMarker( endNode );
|
||||
|
||||
editor.save();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -623,7 +625,9 @@ window.wp = window.wp || {};
|
||||
|
||||
edTools = $( '#wp-content-editor-tools' ),
|
||||
edToolsHeight = 0,
|
||||
edToolsOffsetTop = 0;
|
||||
edToolsOffsetTop = 0,
|
||||
|
||||
$scrollArea;
|
||||
|
||||
if ( edTools.length ) {
|
||||
edToolsHeight = edTools.height();
|
||||
@@ -635,6 +639,11 @@ window.wp = window.wp || {};
|
||||
selectionPosition = TinyMCEContentAreaTop + elementTop,
|
||||
visibleAreaHeight = windowHeight - ( edToolsHeight + toolbarHeight );
|
||||
|
||||
// There's no need to scroll if the selection is inside the visible area.
|
||||
if ( selectionPosition < visibleAreaHeight ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* The minimum scroll height should be to the top of the editor, to offer a consistent
|
||||
* experience.
|
||||
@@ -643,9 +652,16 @@ window.wp = window.wp || {};
|
||||
* subtracting the height. This gives the scroll position where the top of the editor tools aligns with
|
||||
* the top of the viewport (under the Master Bar)
|
||||
*/
|
||||
var adjustedScroll = Math.max( selectionPosition - visibleAreaHeight / 2, edToolsOffsetTop - edToolsHeight );
|
||||
var adjustedScroll;
|
||||
if ( editor.settings.wp_autoresize_on ) {
|
||||
$scrollArea = $( 'html,body' );
|
||||
adjustedScroll = Math.max( selectionPosition - visibleAreaHeight / 2, edToolsOffsetTop - edToolsHeight );
|
||||
} else {
|
||||
$scrollArea = $( editor.contentDocument ).find( 'html,body' );
|
||||
adjustedScroll = elementTop;
|
||||
}
|
||||
|
||||
$( 'html,body' ).animate( {
|
||||
$scrollArea.animate( {
|
||||
scrollTop: parseInt( adjustedScroll, 10 )
|
||||
}, 100 );
|
||||
}
|
||||
@@ -852,19 +868,16 @@ window.wp = window.wp || {};
|
||||
end = selection.end || selection.start;
|
||||
|
||||
if ( textArea.focus ) {
|
||||
// focus and scroll to the position
|
||||
// Wait for the Visual editor to be hidden, then focus and scroll to the position
|
||||
setTimeout( function() {
|
||||
textArea.setSelectionRange( start, end );
|
||||
if ( textArea.blur ) {
|
||||
// defocus before focusing
|
||||
textArea.blur();
|
||||
}
|
||||
textArea.focus();
|
||||
}, 100 );
|
||||
|
||||
textArea.focus();
|
||||
}
|
||||
|
||||
textArea.setSelectionRange( start, end );
|
||||
}
|
||||
|
||||
// Restore the selection when the editor is initialized. Needed when the Text editor is the default.
|
||||
@@ -1035,10 +1048,6 @@ window.wp = window.wp || {};
|
||||
// Normalize line breaks.
|
||||
text = text.replace( /\r\n|\r/g, '\n' );
|
||||
|
||||
if ( text.indexOf( '\n' ) === -1 ) {
|
||||
return text;
|
||||
}
|
||||
|
||||
// Remove line breaks from <object>.
|
||||
if ( text.indexOf( '<object' ) !== -1 ) {
|
||||
text = text.replace( /<object[\s\S]+?<\/object>/g, function( a ) {
|
||||
|
||||
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
@@ -19,7 +19,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
|
||||
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
|
||||
|
||||
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s helps you get your site set up the way you want it.' ), $display_version ); ?></p>
|
||||
<p class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s will smooth your design workflow and keep you safe from coding errors.' ), $display_version ); ?></p>
|
||||
|
||||
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
|
||||
|
||||
|
||||
@@ -229,20 +229,20 @@ if ( $theme->errors() )
|
||||
?>
|
||||
<div id="templateside">
|
||||
<h2 id="theme-files-label"><?php _e( 'Theme Files' ); ?></h2>
|
||||
<?php
|
||||
if ( $has_templates || $theme->parent() ) :
|
||||
if ( $theme->parent() ) {
|
||||
/* translators: %s: link to edit parent theme */
|
||||
echo '<p class="howto">' . sprintf( __( 'This child theme inherits templates from a parent theme, %s.' ),
|
||||
sprintf( '<a href="%s">%s</a>',
|
||||
self_admin_url( 'theme-editor.php?theme=' . urlencode( $theme->get_template() ) ),
|
||||
$theme->parent()->display( 'Name' )
|
||||
)
|
||||
) . "</p>\n";
|
||||
}
|
||||
endif;
|
||||
?>
|
||||
<ul role="tree" aria-labelledby="theme-files-label">
|
||||
<?php if ( ( $has_templates || $theme->parent() ) && $theme->parent() ) : ?>
|
||||
<li class="howto">
|
||||
<?php
|
||||
/* translators: %s: link to edit parent theme */
|
||||
echo sprintf( __( 'This child theme inherits templates from a parent theme, %s.' ),
|
||||
sprintf( '<a href="%s">%s</a>',
|
||||
self_admin_url( 'theme-editor.php?theme=' . urlencode( $theme->get_template() ) ),
|
||||
$theme->parent()->display( 'Name' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li role="treeitem" tabindex="-1" aria-expanded="true" aria-level="1" aria-posinset="1" aria-setsize="1">
|
||||
<ul role="group">
|
||||
<?php wp_print_theme_file_tree( wp_make_theme_file_tree( $allowed_files ) ); ?>
|
||||
|
||||
@@ -4125,6 +4125,18 @@ final class WP_Customize_Manager {
|
||||
</li>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="tmpl-customize-code-editor-lint-error-notification">
|
||||
<li class="notice notice-{{ data.type || 'info' }} {{ data.alt ? 'notice-alt' : '' }} {{ data.dismissible ? 'is-dismissible' : '' }} {{ data.containerClasses || '' }}" data-code="{{ data.code }}" data-type="{{ data.type }}">
|
||||
<div class="notification-message">{{{ data.message || data.code }}}</div>
|
||||
|
||||
<p>
|
||||
<# var elementId = 'el-' + String( Math.random() ); #>
|
||||
<input id="{{ elementId }}" type="checkbox">
|
||||
<label for="{{ elementId }}"><?php _e( 'Update anyway, even though it might break your site?' ); ?></label>
|
||||
</p>
|
||||
</li>
|
||||
</script>
|
||||
|
||||
<?php
|
||||
/* The following template is obsolete in core but retained for plugins. */
|
||||
?>
|
||||
|
||||
@@ -49,6 +49,7 @@ final class WP_Customize_Nav_Menus {
|
||||
add_action( 'customize_register', array( $this, 'customize_register' ), 11 );
|
||||
add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_dynamic_setting_args' ), 10, 2 );
|
||||
add_filter( 'customize_dynamic_setting_class', array( $this, 'filter_dynamic_setting_class' ), 10, 3 );
|
||||
add_action( 'customize_save_nav_menus_created_posts', array( $this, 'save_nav_menus_created_posts' ) );
|
||||
|
||||
// Skip remaining hooks when the user can't manage nav menus anyway.
|
||||
if ( ! current_user_can( 'edit_theme_options' ) ) {
|
||||
@@ -64,7 +65,6 @@ final class WP_Customize_Nav_Menus {
|
||||
add_action( 'customize_controls_print_footer_scripts', array( $this, 'available_items_template' ) );
|
||||
add_action( 'customize_preview_init', array( $this, 'customize_preview_init' ) );
|
||||
add_action( 'customize_preview_init', array( $this, 'make_auto_draft_status_previewable' ) );
|
||||
add_action( 'customize_save_nav_menus_created_posts', array( $this, 'save_nav_menus_created_posts' ) );
|
||||
|
||||
// Selective Refresh partials.
|
||||
add_filter( 'customize_dynamic_partial_args', array( $this, 'customize_dynamic_partial_args' ), 10, 2 );
|
||||
|
||||
24
wp-includes/js/tinymce/tinymce.min.js
vendored
24
wp-includes/js/tinymce/tinymce.min.js
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -476,10 +476,11 @@ function wp_default_scripts( &$scripts ) {
|
||||
did_action( 'init' ) && $scripts->add_inline_script( 'wp-theme-plugin-editor', sprintf( 'wp.themePluginEditor.l10n = %s;', wp_json_encode( array(
|
||||
'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
|
||||
'saveError' => __( 'Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP.' ),
|
||||
'lintError' => wp_array_slice_assoc(
|
||||
'lintError' => array(
|
||||
/* translators: %d: error count */
|
||||
_n_noop( 'There is %d error which must be fixed before you can update this file.', 'There are %d errors which must be fixed before you can update this file.' ),
|
||||
array( 'singular', 'plural' )
|
||||
'singular' => _n( 'There is %d error which must be fixed before you can update this file.', 'There are %d errors which must be fixed before you can update this file.', 1 ),
|
||||
/* translators: %d: error count */
|
||||
'plural' => _n( 'There is %d error which must be fixed before you can update this file.', 'There are %d errors which must be fixed before you can update this file.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491.
|
||||
),
|
||||
) ) ) );
|
||||
|
||||
@@ -580,16 +581,18 @@ function wp_default_scripts( &$scripts ) {
|
||||
'videoHeaderNotice' => __( 'This theme doesn’t support video headers on this page. Navigate to the front page or another page that supports video headers.' ),
|
||||
// Used for overriding the file types allowed in plupload.
|
||||
'allowedFiles' => __( 'Allowed Files' ),
|
||||
'customCssError' => wp_array_slice_assoc(
|
||||
'customCssError' => array(
|
||||
/* translators: %d: error count */
|
||||
_n_noop( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.' ),
|
||||
array( 'singular', 'plural' )
|
||||
'singular' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 1 ),
|
||||
/* translators: %d: error count */
|
||||
'plural' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491.
|
||||
),
|
||||
'pageOnFrontError' => __( 'Homepage and posts page must be different.' ),
|
||||
'saveBlockedError' => wp_array_slice_assoc(
|
||||
'saveBlockedError' => array(
|
||||
/* translators: %s: number of invalid settings */
|
||||
_n_noop( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.' ),
|
||||
array( 'singular', 'plural' )
|
||||
'singular' => _n( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.', 1 ),
|
||||
/* translators: %s: number of invalid settings */
|
||||
'plural' => _n( 'Unable to save due to %s invalid setting.', 'Unable to save due to %s invalid settings.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491.
|
||||
),
|
||||
'scheduleDescription' => __( 'Schedule your customization changes to publish ("go live") at a future date.' ),
|
||||
'themePreviewUnavailable' => __( 'Sorry, you can’t preview new themes when you have changes scheduled or saved as a draft. Please publish your changes, or wait until they publish to preview new themes.' ),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-RC2-42125';
|
||||
$wp_version = '4.9';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
@@ -18,7 +18,7 @@ $wp_db_version = 38590;
|
||||
*
|
||||
* @global string $tinymce_version
|
||||
*/
|
||||
$tinymce_version = '4607-20170918';
|
||||
$tinymce_version = '4607-20171116';
|
||||
|
||||
/**
|
||||
* Holds the required PHP version
|
||||
|
||||
@@ -80,16 +80,49 @@ class WP_Widget_Custom_HTML extends WP_Widget {
|
||||
add_action( 'admin_head-widgets.php', array( 'WP_Widget_Custom_HTML', 'add_help_text' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter gallery shortcode attributes.
|
||||
*
|
||||
* Prevents all of a site's attachments from being shown in a gallery displayed on a
|
||||
* non-singular template where a $post context is not available.
|
||||
*
|
||||
* @since 4.9.0
|
||||
*
|
||||
* @param array $attrs Attributes.
|
||||
* @return array Attributes.
|
||||
*/
|
||||
public function _filter_gallery_shortcode_attrs( $attrs ) {
|
||||
if ( ! is_singular() && empty( $attrs['id'] ) && empty( $attrs['include'] ) ) {
|
||||
$attrs['id'] = -1;
|
||||
}
|
||||
return $attrs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the content for the current Custom HTML widget instance.
|
||||
*
|
||||
* @since 4.8.1
|
||||
*
|
||||
* @global WP_Post $post
|
||||
* @param array $args Display arguments including 'before_title', 'after_title',
|
||||
* 'before_widget', and 'after_widget'.
|
||||
* @param array $instance Settings for the current Custom HTML widget instance.
|
||||
*/
|
||||
public function widget( $args, $instance ) {
|
||||
global $post;
|
||||
|
||||
// Override global $post so filters (and shortcodes) apply in a consistent context.
|
||||
$original_post = $post;
|
||||
if ( is_singular() ) {
|
||||
// Make sure post is always the queried object on singular queries (not from another sub-query that failed to clean up the global $post).
|
||||
$post = get_queried_object();
|
||||
} else {
|
||||
// Nullify the $post global during widget rendering to prevent shortcodes from running with the unexpected context on archive queries.
|
||||
$post = null;
|
||||
}
|
||||
|
||||
// Prevent dumping out all attachments from the media library.
|
||||
add_filter( 'shortcode_atts_gallery', array( $this, '_filter_gallery_shortcode_attrs' ) );
|
||||
|
||||
$instance = array_merge( $this->default_instance, $instance );
|
||||
|
||||
@@ -118,6 +151,10 @@ class WP_Widget_Custom_HTML extends WP_Widget {
|
||||
*/
|
||||
$content = apply_filters( 'widget_custom_html_content', $content, $instance, $this );
|
||||
|
||||
// Restore post global.
|
||||
$post = $original_post;
|
||||
remove_filter( 'shortcode_atts_gallery', array( $this, '_filter_gallery_shortcode_attrs' ) );
|
||||
|
||||
// Inject the Text widget's container class name alongside this widget's class name for theme styling compatibility.
|
||||
$args['before_widget'] = preg_replace( '/(?<=\sclass=["\'])/', 'widget_text ', $args['before_widget'] );
|
||||
|
||||
@@ -175,10 +212,11 @@ class WP_Widget_Custom_HTML extends WP_Widget {
|
||||
wp_add_inline_script( 'custom-html-widgets', sprintf( 'wp.customHtmlWidgets.init( %s );', wp_json_encode( $settings ) ), 'after' );
|
||||
|
||||
$l10n = array(
|
||||
'errorNotice' => wp_array_slice_assoc(
|
||||
'errorNotice' => array(
|
||||
/* translators: %d: error count */
|
||||
_n_noop( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.' ),
|
||||
array( 'singular', 'plural' )
|
||||
'singular' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 1 ),
|
||||
/* translators: %d: error count */
|
||||
'plural' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491.
|
||||
),
|
||||
);
|
||||
wp_add_inline_script( 'custom-html-widgets', sprintf( 'jQuery.extend( wp.customHtmlWidgets.l10n, %s );', wp_json_encode( $l10n ) ), 'after' );
|
||||
|
||||
@@ -178,6 +178,24 @@ class WP_Widget_Text extends WP_Widget {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter gallery shortcode attributes.
|
||||
*
|
||||
* Prevents all of a site's attachments from being shown in a gallery displayed on a
|
||||
* non-singular template where a $post context is not available.
|
||||
*
|
||||
* @since 4.9.0
|
||||
*
|
||||
* @param array $attrs Attributes.
|
||||
* @return array Attributes.
|
||||
*/
|
||||
public function _filter_gallery_shortcode_attrs( $attrs ) {
|
||||
if ( ! is_singular() && empty( $attrs['id'] ) && empty( $attrs['include'] ) ) {
|
||||
$attrs['id'] = -1;
|
||||
}
|
||||
return $attrs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the content for the current Text widget instance.
|
||||
*
|
||||
@@ -221,13 +239,19 @@ class WP_Widget_Text extends WP_Widget {
|
||||
remove_filter( 'widget_text', 'do_shortcode', $widget_text_do_shortcode_priority );
|
||||
}
|
||||
|
||||
// Nullify the $post global during widget rendering to prevent shortcodes from running with the unexpected context.
|
||||
$suspended_post = null;
|
||||
if ( isset( $post ) ) {
|
||||
$suspended_post = $post;
|
||||
// Override global $post so filters (and shortcodes) apply in a consistent context.
|
||||
$original_post = $post;
|
||||
if ( is_singular() ) {
|
||||
// Make sure post is always the queried object on singular queries (not from another sub-query that failed to clean up the global $post).
|
||||
$post = get_queried_object();
|
||||
} else {
|
||||
// Nullify the $post global during widget rendering to prevent shortcodes from running with the unexpected context on archive queries.
|
||||
$post = null;
|
||||
}
|
||||
|
||||
// Prevent dumping out all attachments from the media library.
|
||||
add_filter( 'shortcode_atts_gallery', array( $this, '_filter_gallery_shortcode_attrs' ) );
|
||||
|
||||
/**
|
||||
* Filters the content of the Text widget.
|
||||
*
|
||||
@@ -278,9 +302,8 @@ class WP_Widget_Text extends WP_Widget {
|
||||
}
|
||||
|
||||
// Restore post global.
|
||||
if ( isset( $suspended_post ) ) {
|
||||
$post = $suspended_post;
|
||||
}
|
||||
$post = $original_post;
|
||||
remove_filter( 'shortcode_atts_gallery', array( $this, '_filter_gallery_shortcode_attrs' ) );
|
||||
|
||||
// Undo suspension of legacy plugin-supplied shortcode handling.
|
||||
if ( $should_suspend_legacy_shortcode_support ) {
|
||||
|
||||
Reference in New Issue
Block a user