Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe24185f48 | ||
|
|
c4a15959f5 | ||
|
|
b4a3edc859 | ||
|
|
e75247a179 | ||
|
|
45874b5050 | ||
|
|
ecd15e008a | ||
|
|
594456341d | ||
|
|
ec63674dfc | ||
|
|
4ae2ee9869 | ||
|
|
0236fd226e | ||
|
|
9fe3e9edf0 | ||
|
|
e1095eeb9f | ||
|
|
68cb5b6f05 | ||
|
|
6dc1dd28f5 | ||
|
|
4cb8d10856 | ||
|
|
97ba6be232 | ||
|
|
cee7720939 | ||
|
|
b09cebf575 | ||
|
|
66a3d52431 | ||
|
|
85d9b63062 | ||
|
|
75ab7d2124 | ||
|
|
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 |
@@ -30,6 +30,28 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
|
||||
</h2>
|
||||
|
||||
<div class="changelog point-releases">
|
||||
<h3><?php _e( 'Maintenance and Security Releases' ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: WordPress version number, 2: plural number of bugs. */
|
||||
_n(
|
||||
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.',
|
||||
11
|
||||
),
|
||||
'4.9.1',
|
||||
number_format_i18n( 11 )
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
/* translators: %s: Codex URL */
|
||||
printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.9.1' );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="feature-section one-col">
|
||||
<div class="col">
|
||||
<h2>
|
||||
@@ -53,7 +75,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 +112,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 +142,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 +165,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 +241,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 +272,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>
|
||||
|
||||
|
||||
@@ -342,7 +342,8 @@ class WP_Upgrader {
|
||||
if ( ! empty( $details['files'] ) ) {
|
||||
$children = $this->flatten_dirlist( $details['files'], $path . $name . '/' );
|
||||
|
||||
$files = array_merge( $files, $children );
|
||||
// Merge keeping possible numeric keys, which array_merge() will reindex from 0..n
|
||||
$files = $files + $children;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -445,7 +445,8 @@ function wp_edit_theme_plugin_file( $args ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( 0 !== validate_file( $real_file, $allowed_files ) ) {
|
||||
// Compare based on relative paths
|
||||
if ( 0 !== validate_file( $file, array_keys( $allowed_files ) ) ) {
|
||||
return new WP_Error( 'disallowed_theme_file', __( 'Sorry, that file cannot be edited.' ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -903,7 +903,7 @@ $default_title = apply_filters( 'default_page_template_title', __( 'Default Tem
|
||||
/**
|
||||
* Fires before the help hint text in the 'Page Attributes' meta box.
|
||||
*
|
||||
* @since 4.8.0
|
||||
* @since 4.9.0
|
||||
*
|
||||
* @param WP_Post $post The current post.
|
||||
*/
|
||||
|
||||
@@ -77,12 +77,12 @@ function extract_from_markers( $filename, $marker ) {
|
||||
foreach ( $markerdata as $markerline ) {
|
||||
if ( false !== strpos( $markerline, '# END ' . $marker ) ) {
|
||||
$state = false;
|
||||
if ( $state ) {
|
||||
$result[] = $markerline;
|
||||
}
|
||||
if ( false !== strpos( $markerline, '# BEGIN ' . $marker ) ) {
|
||||
$state = true;
|
||||
}
|
||||
}
|
||||
if ( $state ) {
|
||||
$result[] = $markerline;
|
||||
}
|
||||
if ( false !== strpos( $markerline, '# BEGIN ' . $marker ) ) {
|
||||
$state = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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' );
|
||||
|
||||
@@ -194,17 +194,6 @@ function get_plugin_files( $plugin ) {
|
||||
$plugin_file = WP_PLUGIN_DIR . '/' . $plugin;
|
||||
$dir = dirname( $plugin_file );
|
||||
|
||||
$data = get_plugin_data( $plugin_file );
|
||||
$label = isset( $data['Version'] )
|
||||
? sanitize_key( 'files_' . $plugin . '-' . $data['Version'] )
|
||||
: sanitize_key( 'files_' . $plugin );
|
||||
$transient_key = substr( $label, 0, 29 ) . md5( $label );
|
||||
|
||||
$plugin_files = get_transient( $transient_key );
|
||||
if ( false !== $plugin_files ) {
|
||||
return $plugin_files;
|
||||
}
|
||||
|
||||
$plugin_files = array( plugin_basename( $plugin_file ) );
|
||||
|
||||
if ( is_dir( $dir ) && WP_PLUGIN_DIR !== $dir ) {
|
||||
@@ -225,8 +214,6 @@ function get_plugin_files( $plugin ) {
|
||||
$plugin_files = array_values( array_unique( $plugin_files ) );
|
||||
}
|
||||
|
||||
set_transient( $transient_key, $plugin_files, HOUR_IN_SECONDS );
|
||||
|
||||
return $plugin_files;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -435,11 +435,11 @@ function wp_upgrade() {
|
||||
if ( is_multisite() ) {
|
||||
$site_id = get_current_blog_id();
|
||||
|
||||
if ( $wpdb->get_row( $wpdb->prepare( 'SELECT blog_id FROM %s WHERE blog_id = %d', $wpdb->blog_versions, $site_id ) ) ) {
|
||||
$wpdb->query( $wpdb->prepare( 'UPDATE %s SET db_version = %d WHERE blog_id = %d', $wpdb->blog_versions, $wp_db_version, $site_id ) );
|
||||
} else {
|
||||
$wpdb->query( $wpdb->prepare( 'INSERT INTO %s ( `blog_id` , `db_version` , `last_updated` ) VALUES ( %d, %d, %s);', $wpdb->blog_versions, $site_id, $wp_db_version, NOW() ) );
|
||||
}
|
||||
if ( $wpdb->get_row( $wpdb->prepare( "SELECT blog_id FROM {$wpdb->blog_versions} WHERE blog_id = %d", $site_id ) ) ) {
|
||||
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->blog_versions} SET db_version = %d WHERE blog_id = %d", $wp_db_version, $site_id ) );
|
||||
} else {
|
||||
$wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->blog_versions} ( `blog_id` , `db_version` , `last_updated` ) VALUES ( %d, %d, NOW() );", $site_id, $wp_db_version ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
@@ -102,7 +102,7 @@ themes.view.Appearance = wp.Backbone.View.extend({
|
||||
collection: self.collection,
|
||||
parent: this
|
||||
});
|
||||
self.searchView = view;
|
||||
self.SearchView = view;
|
||||
|
||||
// Render and append after screen title
|
||||
view.render();
|
||||
@@ -1448,7 +1448,7 @@ themes.Run = {
|
||||
this.render();
|
||||
|
||||
// Start debouncing user searches after Backbone.history.start().
|
||||
this.view.searchView.doSearch = _.debounce( this.view.searchView.doSearch, 500 );
|
||||
this.view.SearchView.doSearch = _.debounce( this.view.SearchView.doSearch, 500 );
|
||||
},
|
||||
|
||||
render: function() {
|
||||
@@ -1924,7 +1924,7 @@ themes.RunInstaller = {
|
||||
this.render();
|
||||
|
||||
// Start debouncing user searches after Backbone.history.start().
|
||||
this.view.searchView.doSearch = _.debounce( this.view.searchView.doSearch, 500 );
|
||||
this.view.SearchView.doSearch = _.debounce( this.view.SearchView.doSearch, 500 );
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
||||
2
wp-admin/js/theme.min.js
vendored
2
wp-admin/js/theme.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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 ) ); ?>
|
||||
@@ -322,7 +322,7 @@ if ( ! in_array( 'theme_editor_notice', $dismissed_pointers, true ) ) :
|
||||
echo sprintf(
|
||||
/* translators: %s: Codex URL */
|
||||
__( 'You appear to be making direct edits to your theme in the WordPress dashboard. We recommend that you don’t! Editing your theme directly could break your site and your changes may be lost in future updates. If you need to tweak more than your theme’s CSS, you might want to try <a href="%s">making a child theme</a>.' ),
|
||||
esc_url( 'https://codex.wordpress.org/Child_Themes' )
|
||||
esc_url( __( 'https://codex.wordpress.org/Child_Themes' ) )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
@@ -75,7 +75,7 @@ if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
|
||||
$redirect = add_query_arg( array( 'update' => 'could_not_add' ), 'user-new.php' );
|
||||
}
|
||||
} else {
|
||||
$newuser_key = substr( md5( $user_id ), 0, 5 );
|
||||
$newuser_key = wp_generate_password( 20, false );
|
||||
add_option( 'new_user_' . $newuser_key, array( 'user_id' => $user_id, 'email' => $user_details->user_email, 'role' => $_REQUEST[ 'role' ] ) );
|
||||
|
||||
$roles = get_editable_roles();
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -984,34 +984,10 @@ final class WP_Theme implements ArrayAccess {
|
||||
* being absolute paths.
|
||||
*/
|
||||
public function get_files( $type = null, $depth = 0, $search_parent = false ) {
|
||||
// get and cache all theme files to start with.
|
||||
$label = sanitize_key( 'files_' . $this->cache_hash . '-' . $this->get( 'Version' ) );
|
||||
$transient_key = substr( $label, 0, 29 ) . md5( $label );
|
||||
$files = (array) self::scandir( $this->get_stylesheet_directory(), $type, $depth );
|
||||
|
||||
$all_files = get_transient( $transient_key );
|
||||
if ( false === $all_files ) {
|
||||
$all_files = (array) self::scandir( $this->get_stylesheet_directory(), null, -1 );
|
||||
|
||||
if ( $search_parent && $this->parent() ) {
|
||||
$all_files += (array) self::scandir( $this->get_template_directory(), null, -1 );
|
||||
}
|
||||
|
||||
set_transient( $transient_key, $all_files, HOUR_IN_SECONDS );
|
||||
}
|
||||
|
||||
// Filter $all_files by $type & $depth.
|
||||
$files = array();
|
||||
if ( $type ) {
|
||||
$type = (array) $type;
|
||||
$_extensions = implode( '|', $type );
|
||||
}
|
||||
foreach ( $all_files as $key => $file ) {
|
||||
if ( $depth >= 0 && substr_count( $key, '/' ) > $depth ) {
|
||||
continue; // Filter by depth.
|
||||
}
|
||||
if ( ! $type || preg_match( '~\.(' . $_extensions . ')$~', $file ) ) { // Filter by type.
|
||||
$files[ $key ] = $file;
|
||||
}
|
||||
if ( $search_parent && $this->parent() ) {
|
||||
$files += (array) self::scandir( $this->get_template_directory(), $type, $depth );
|
||||
}
|
||||
|
||||
return $files;
|
||||
|
||||
@@ -476,7 +476,7 @@ function rss_enclosure() {
|
||||
*
|
||||
* @param string $html_link_tag The HTML link tag with a URI and other attributes.
|
||||
*/
|
||||
echo apply_filters( 'rss_enclosure', '<enclosure url="' . trim( htmlspecialchars( $enclosure[0] ) ) . '" length="' . trim( $enclosure[1] ) . '" type="' . $type . '" />' . "\n" );
|
||||
echo apply_filters( 'rss_enclosure', '<enclosure url="' . esc_url( trim( $enclosure[0] ) ) . '" length="' . absint( trim( $enclosure[1] ) ) . '" type="' . esc_attr( $type ) . '" />' . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -510,7 +510,7 @@ function atom_enclosure() {
|
||||
*
|
||||
* @param string $html_link_tag The HTML link tag with a URI and other attributes.
|
||||
*/
|
||||
echo apply_filters( 'atom_enclosure', '<link href="' . trim( htmlspecialchars( $enclosure[0] ) ) . '" rel="enclosure" length="' . trim( $enclosure[1] ) . '" type="' . trim( $enclosure[2] ) . '" />' . "\n" );
|
||||
echo apply_filters( 'atom_enclosure', '<link href="' . esc_url( trim( $enclosure[0] ) ) . '" rel="enclosure" length="' . absint( trim( $enclosure[1] ) ) . '" type="' . esc_attr( trim( $enclosure[2] ) ) . '" />' . "\n" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2561,8 +2561,9 @@ function get_allowed_mime_types( $user = null ) {
|
||||
if ( function_exists( 'current_user_can' ) )
|
||||
$unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' );
|
||||
|
||||
if ( empty( $unfiltered ) )
|
||||
unset( $t['htm|html'] );
|
||||
if ( empty( $unfiltered ) ) {
|
||||
unset( $t['htm|html'], $t['js'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters list of allowed mime types and file extensions.
|
||||
|
||||
@@ -703,7 +703,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
|
||||
*/
|
||||
$output = __( 'html_lang_attribute' );
|
||||
if ( 'html_lang_attribute' === $output || preg_match( '/[^a-zA-Z0-9-]/', $output ) ) {
|
||||
$output = get_locale();
|
||||
$output = is_admin() ? get_user_locale() : get_locale();
|
||||
$output = str_replace( '_', '-', $output );
|
||||
}
|
||||
break;
|
||||
@@ -3568,12 +3568,14 @@ function get_language_attributes( $doctype = 'html' ) {
|
||||
if ( function_exists( 'is_rtl' ) && is_rtl() )
|
||||
$attributes[] = 'dir="rtl"';
|
||||
|
||||
if ( $lang = get_bloginfo('language') ) {
|
||||
if ( get_option('html_type') == 'text/html' || $doctype == 'html' )
|
||||
$attributes[] = "lang=\"$lang\"";
|
||||
if ( $lang = get_bloginfo( 'language' ) ) {
|
||||
if ( get_option( 'html_type' ) == 'text/html' || $doctype == 'html' ) {
|
||||
$attributes[] = 'lang="' . esc_attr( $lang ) . '"';
|
||||
}
|
||||
|
||||
if ( get_option('html_type') != 'text/html' || $doctype == 'xhtml' )
|
||||
$attributes[] = "xml:lang=\"$lang\"";
|
||||
if ( get_option( 'html_type' ) != 'text/html' || $doctype == 'xhtml' ) {
|
||||
$attributes[] = 'xml:lang="' . esc_attr( $lang ) . '"';
|
||||
}
|
||||
}
|
||||
|
||||
$output = implode(' ', $attributes);
|
||||
|
||||
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.
@@ -357,7 +357,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'mediaelement-migrate', "/wp-includes/js/mediaelement/mediaelement-migrate$suffix.js", array(), false, 1);
|
||||
|
||||
did_action( 'init' ) && $scripts->add_inline_script( 'mediaelement-core', sprintf( 'var mejsL10n = %s;', wp_json_encode( array(
|
||||
'language' => strtolower( str_replace( '_', '-', is_admin() ? get_user_locale() : get_locale() ) ),
|
||||
'language' => strtolower( strtok( is_admin() ? get_user_locale() : get_locale(), '_-' ) ),
|
||||
'strings' => array(
|
||||
'mejs.install-flash' => __( 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/' ),
|
||||
'mejs.fullscreen-off' => __( 'Turn off Fullscreen' ),
|
||||
@@ -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.1';
|
||||
|
||||
/**
|
||||
* 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 ) {
|
||||
|
||||
@@ -1643,14 +1643,21 @@ class wpdb {
|
||||
$socket = null;
|
||||
$is_ipv6 = false;
|
||||
|
||||
// First peel off the socket parameter from the right, if it exists.
|
||||
$socket_pos = strpos( $host, ':/' );
|
||||
if ( $socket_pos !== false ) {
|
||||
$socket = substr( $host, $socket_pos + 1 );
|
||||
$host = substr( $host, 0, $socket_pos );
|
||||
}
|
||||
|
||||
// We need to check for an IPv6 address first.
|
||||
// An IPv6 address will always contain at least two colons.
|
||||
if ( substr_count( $host, ':' ) > 1 ) {
|
||||
$pattern = '#^(?:\[)?(?<host>[0-9a-fA-F:]+)(?:\]:(?<port>[\d]+))?(?:/(?<socket>.+))?#';
|
||||
$pattern = '#^(?:\[)?(?<host>[0-9a-fA-F:]+)(?:\]:(?<port>[\d]+))?#';
|
||||
$is_ipv6 = true;
|
||||
} else {
|
||||
// We seem to be dealing with an IPv4 address.
|
||||
$pattern = '#^(?<host>[^:/]*)(?::(?<port>[\d]+))?(?::(?<socket>.+))?#';
|
||||
$pattern = '#^(?<host>[^:/]*)(?::(?<port>[\d]+))?#';
|
||||
}
|
||||
|
||||
$matches = array();
|
||||
@@ -1662,7 +1669,7 @@ class wpdb {
|
||||
}
|
||||
|
||||
$host = '';
|
||||
foreach ( array( 'host', 'port', 'socket' ) as $component ) {
|
||||
foreach ( array( 'host', 'port' ) as $component ) {
|
||||
if ( ! empty( $matches[ $component ] ) ) {
|
||||
$$component = $matches[ $component ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user