Compare commits
126 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bba3c55fe3 | ||
|
|
2643287b2c | ||
|
|
8edf395b50 | ||
|
|
f709f56129 | ||
|
|
b7df04afe4 | ||
|
|
9201cc33cc | ||
|
|
dc9c4c4738 | ||
|
|
8d9813f6f6 | ||
|
|
a07ed5c926 | ||
|
|
a271c43cdb | ||
|
|
d7291a5435 | ||
|
|
ab139de982 | ||
|
|
3798ce6757 | ||
|
|
2c492ab774 | ||
|
|
ff4c656579 | ||
|
|
09a5894a92 | ||
|
|
519f479887 | ||
|
|
f0fd88a7f5 | ||
|
|
4224f6e214 | ||
|
|
f29bf78748 | ||
|
|
4d2fabc973 | ||
|
|
3cc1a69391 | ||
|
|
366e0ada72 | ||
|
|
723d0f2669 | ||
|
|
5220bad266 | ||
|
|
4aee92bb1c | ||
|
|
bbb8a324c7 | ||
|
|
bd00d61353 | ||
|
|
124bdbb0cd | ||
|
|
8662725a4b | ||
|
|
54194f2ec6 | ||
|
|
83dc4c9339 | ||
|
|
dd777e0e14 | ||
|
|
98764508db | ||
|
|
906bc34226 | ||
|
|
c4277abb33 | ||
|
|
6ba9d07723 | ||
|
|
db02fcb8f8 | ||
|
|
385f70dc96 | ||
|
|
54d1631126 | ||
|
|
3ed6b9efd4 | ||
|
|
2441c3c3f1 | ||
|
|
2e8c881ff4 | ||
|
|
0685e3e2f3 | ||
|
|
d9bf3e5e60 | ||
|
|
4c4d1ecbe5 | ||
|
|
be9734cbee | ||
|
|
4abf1b12c9 | ||
|
|
5e9186aaa5 | ||
|
|
e77f8257ea | ||
|
|
3bc41df4e4 | ||
|
|
d72fbf753f | ||
|
|
b6d9609fa9 | ||
|
|
84bd75ea88 | ||
|
|
9026b41b3b | ||
|
|
77ce550e5c | ||
|
|
3c9f3effb0 | ||
|
|
397b2de6e5 | ||
|
|
b8ebacbf82 | ||
|
|
089aa052fb | ||
|
|
25dea6d03a | ||
|
|
5973b3a5e1 | ||
|
|
a6e75ee0b7 | ||
|
|
25bfff959f | ||
|
|
af4f4f860e | ||
|
|
fadd733746 | ||
|
|
160e61fddf | ||
|
|
0a429ab309 | ||
|
|
030f429e78 | ||
|
|
c637f0c94f | ||
|
|
aedaea9209 | ||
|
|
edb61cba2e | ||
|
|
2afecbb253 | ||
|
|
1fdfabf74c | ||
|
|
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 |
@@ -1,6 +1,6 @@
|
||||
WordPress - Web publishing software
|
||||
|
||||
Copyright 2011-2017 by the contributors
|
||||
Copyright 2011-2018 by the contributors
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -30,6 +30,64 @@ 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 %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed %2$s bugs.',
|
||||
34
|
||||
),
|
||||
'4.9.3',
|
||||
number_format_i18n( 34 )
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
/* translators: %s: Codex URL */
|
||||
printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.9.3' );
|
||||
?>
|
||||
</p>
|
||||
<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.',
|
||||
22
|
||||
),
|
||||
'4.9.2',
|
||||
number_format_i18n( 22 )
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
/* translators: %s: Codex URL */
|
||||
printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.9.2' );
|
||||
?>
|
||||
</p>
|
||||
<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 +111,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 +148,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 +178,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 +201,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 +277,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 +308,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;
|
||||
}
|
||||
|
||||
@@ -1188,11 +1188,19 @@ th.action-links {
|
||||
|
||||
.filter-drawer .filter-group-feature input,
|
||||
.filter-drawer .filter-group-feature label {
|
||||
display: inline-block;
|
||||
margin: 7px 0 7px 4px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.filter-drawer .filter-group-feature input {
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.filter-group .filter-group-feature label {
|
||||
display: block;
|
||||
margin: 14px 23px 14px 0px;
|
||||
}
|
||||
|
||||
.filter-drawer .buttons {
|
||||
clear: both;
|
||||
margin-bottom: 20px;
|
||||
@@ -1700,7 +1708,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 +1716,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 +3050,7 @@ img {
|
||||
min-height: 60vh;
|
||||
height: calc( 100vh - 295px );
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#templateside > h2 {
|
||||
@@ -3060,8 +3069,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 +3249,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 +3769,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 +3788,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 +3850,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;
|
||||
@@ -3881,6 +3897,10 @@ img {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.filter-drawer .filter-group-feature label {
|
||||
margin-right: 32px;
|
||||
}
|
||||
|
||||
.wp-filter .button.drawer-toggle {
|
||||
font-size: 13px;
|
||||
line-height: 26px;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1188,11 +1188,19 @@ th.action-links {
|
||||
|
||||
.filter-drawer .filter-group-feature input,
|
||||
.filter-drawer .filter-group-feature label {
|
||||
display: inline-block;
|
||||
margin: 7px 4px 7px 0;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.filter-drawer .filter-group-feature input {
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.filter-group .filter-group-feature label {
|
||||
display: block;
|
||||
margin: 14px 0px 14px 23px;
|
||||
}
|
||||
|
||||
.filter-drawer .buttons {
|
||||
clear: both;
|
||||
margin-bottom: 20px;
|
||||
@@ -3042,6 +3050,7 @@ img {
|
||||
min-height: 60vh;
|
||||
height: calc( 100vh - 295px );
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#templateside > h2 {
|
||||
@@ -3060,8 +3069,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 +3249,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 +3769,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 +3788,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 +3850,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;
|
||||
@@ -3881,6 +3897,10 @@ img {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.filter-drawer .filter-group-feature label {
|
||||
margin-left: 32px;
|
||||
}
|
||||
|
||||
.wp-filter .button.drawer-toggle {
|
||||
font-size: 13px;
|
||||
line-height: 26px;
|
||||
|
||||
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
@@ -216,6 +216,10 @@
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
.menu-location-settings .customize-control-checkbox .theme-location-set {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.customize-control-nav_menu_auto_add label {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
2
wp-admin/css/customize-nav-menus-rtl.min.css
vendored
2
wp-admin/css/customize-nav-menus-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -216,6 +216,10 @@
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
.menu-location-settings .customize-control-checkbox .theme-location-set {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.customize-control-nav_menu_auto_add label {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
2
wp-admin/css/customize-nav-menus.min.css
vendored
2
wp-admin/css/customize-nav-menus.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
}
|
||||
|
||||
@@ -176,9 +177,7 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.media-widget-preview.media_image,
|
||||
.media-widget-preview.media_audio,
|
||||
.attachment-media-view {
|
||||
.media-widget-preview .placeholder {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
@@ -189,7 +188,7 @@
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.media-widget-gallery-preview .gallery-item .gallery-icon {
|
||||
.media-widget-gallery-preview .gallery-item .gallery-icon {
|
||||
margin: 4.5%;
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -176,9 +177,7 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.media-widget-preview.media_image,
|
||||
.media-widget-preview.media_audio,
|
||||
.attachment-media-view {
|
||||
.media-widget-preview .placeholder {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
@@ -189,7 +188,7 @@
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.media-widget-gallery-preview .gallery-item .gallery-icon {
|
||||
.media-widget-gallery-preview .gallery-item .gallery-icon {
|
||||
margin: 4.5%;
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
);
|
||||
}
|
||||
@@ -53,7 +77,7 @@ if ( $wp_customize->changeset_post_id() ) {
|
||||
if ( in_array( get_post_status( $changeset_post->ID ), array( 'publish', 'trash' ), true ) ) {
|
||||
wp_die(
|
||||
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
|
||||
'<p>' . __( 'This changeset has already been published and cannot be further modified.' ) . '</p>' .
|
||||
'<p>' . __( 'This changeset cannot be further modified.' ) . '</p>' .
|
||||
'<p><a href="' . esc_url( remove_query_arg( 'changeset_uuid' ) ) . '">' . __( 'Customize New Changes' ) . '</a></p>',
|
||||
403
|
||||
);
|
||||
|
||||
@@ -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.' ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@ function wp_read_image_metadata( $file ) {
|
||||
if ( ! file_exists( $file ) )
|
||||
return false;
|
||||
|
||||
list( , , $sourceImageType ) = getimagesize( $file );
|
||||
list( , , $sourceImageType ) = @getimagesize( $file );
|
||||
|
||||
/*
|
||||
* EXIF contains a bunch of data we'll probably never need formatted in ways
|
||||
@@ -372,10 +372,10 @@ function wp_read_image_metadata( $file ) {
|
||||
* as caption, description etc.
|
||||
*/
|
||||
if ( is_callable( 'iptcparse' ) ) {
|
||||
getimagesize( $file, $info );
|
||||
@getimagesize( $file, $info );
|
||||
|
||||
if ( ! empty( $info['APP13'] ) ) {
|
||||
$iptc = iptcparse( $info['APP13'] );
|
||||
$iptc = @iptcparse( $info['APP13'] );
|
||||
|
||||
// Headline, "A brief synopsis of the caption."
|
||||
if ( ! empty( $iptc['2#105'][0] ) ) {
|
||||
|
||||
@@ -355,7 +355,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override
|
||||
}
|
||||
|
||||
// Use image exif/iptc data for title and caption defaults if possible.
|
||||
} elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = @wp_read_image_metadata( $file ) ) {
|
||||
} elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = wp_read_image_metadata( $file ) ) {
|
||||
if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) {
|
||||
$title = $image_meta['title'];
|
||||
}
|
||||
@@ -419,7 +419,7 @@ function media_handle_sideload( $file_array, $post_id, $desc = null, $post_data
|
||||
$content = '';
|
||||
|
||||
// Use image exif/iptc data for title and caption defaults if possible.
|
||||
if ( $image_meta = @wp_read_image_metadata($file) ) {
|
||||
if ( $image_meta = wp_read_image_metadata( $file ) ) {
|
||||
if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) )
|
||||
$title = $image_meta['title'];
|
||||
if ( trim( $image_meta['caption'] ) )
|
||||
|
||||
@@ -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' );
|
||||
|
||||
@@ -628,7 +628,7 @@ function install_plugin_information() {
|
||||
) );
|
||||
?>
|
||||
<div class="counter-container">
|
||||
<span class="counter-label"><a href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>"
|
||||
<span class="counter-label"><a href="https://wordpress.org/support/plugin/<?php echo $api->slug; ?>/reviews/?filter=<?php echo $key; ?>"
|
||||
target="_blank" aria-label="<?php echo $aria_label; ?>"><?php printf( _n( '%d star', '%d stars', $key ), $key ); ?></a></span>
|
||||
<span class="counter-back">
|
||||
<span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span>
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -743,6 +743,42 @@ $_old_files = array(
|
||||
'wp-includes/js/plupload/plupload.silverlight.xap',
|
||||
'wp-includes/js/swfupload/plugins',
|
||||
'wp-includes/js/swfupload/swfupload.swf',
|
||||
// 4.9.2
|
||||
'wp-includes/js/mediaelement/lang',
|
||||
'wp-includes/js/mediaelement/lang/ca.js',
|
||||
'wp-includes/js/mediaelement/lang/cs.js',
|
||||
'wp-includes/js/mediaelement/lang/de.js',
|
||||
'wp-includes/js/mediaelement/lang/es.js',
|
||||
'wp-includes/js/mediaelement/lang/fa.js',
|
||||
'wp-includes/js/mediaelement/lang/fr.js',
|
||||
'wp-includes/js/mediaelement/lang/hr.js',
|
||||
'wp-includes/js/mediaelement/lang/hu.js',
|
||||
'wp-includes/js/mediaelement/lang/it.js',
|
||||
'wp-includes/js/mediaelement/lang/ja.js',
|
||||
'wp-includes/js/mediaelement/lang/ko.js',
|
||||
'wp-includes/js/mediaelement/lang/nl.js',
|
||||
'wp-includes/js/mediaelement/lang/pl.js',
|
||||
'wp-includes/js/mediaelement/lang/pt.js',
|
||||
'wp-includes/js/mediaelement/lang/ro.js',
|
||||
'wp-includes/js/mediaelement/lang/ru.js',
|
||||
'wp-includes/js/mediaelement/lang/sk.js',
|
||||
'wp-includes/js/mediaelement/lang/sv.js',
|
||||
'wp-includes/js/mediaelement/lang/uk.js',
|
||||
'wp-includes/js/mediaelement/lang/zh-cn.js',
|
||||
'wp-includes/js/mediaelement/lang/zh.js',
|
||||
'wp-includes/js/mediaelement/mediaelement-flash-audio-ogg.swf',
|
||||
'wp-includes/js/mediaelement/mediaelement-flash-audio.swf',
|
||||
'wp-includes/js/mediaelement/mediaelement-flash-video-hls.swf',
|
||||
'wp-includes/js/mediaelement/mediaelement-flash-video-mdash.swf',
|
||||
'wp-includes/js/mediaelement/mediaelement-flash-video.swf',
|
||||
'wp-includes/js/mediaelement/renderers/dailymotion.js',
|
||||
'wp-includes/js/mediaelement/renderers/dailymotion.min.js',
|
||||
'wp-includes/js/mediaelement/renderers/facebook.js',
|
||||
'wp-includes/js/mediaelement/renderers/facebook.min.js',
|
||||
'wp-includes/js/mediaelement/renderers/soundcloud.js',
|
||||
'wp-includes/js/mediaelement/renderers/soundcloud.min.js',
|
||||
'wp-includes/js/mediaelement/renderers/twitch.js',
|
||||
'wp-includes/js/mediaelement/renderers/twitch.min.js',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -1118,7 +1154,11 @@ function update_core($from, $to) {
|
||||
$old_file = $to . $old_file;
|
||||
if ( !$wp_filesystem->exists($old_file) )
|
||||
continue;
|
||||
$wp_filesystem->delete($old_file, true);
|
||||
|
||||
// If the file isn't deleted, try writing an empty string to the file instead.
|
||||
if ( ! $wp_filesystem->delete( $old_file, true ) && $wp_filesystem->is_file( $old_file ) ) {
|
||||
$wp_filesystem->put_contents( $old_file, '' );
|
||||
}
|
||||
}
|
||||
|
||||
// Remove any Genericons example.html's from the filesystem
|
||||
|
||||
@@ -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();
|
||||
@@ -2561,7 +2564,7 @@
|
||||
|
||||
// Temporary special function since supplying SFTP credentials does not work yet. See #42184.
|
||||
function disableInstallButtons() {
|
||||
return disableSwitchButtons() || true === api.settings.theme._filesystemCredentialsNeeded;
|
||||
return disableSwitchButtons() || false === api.settings.theme._canInstall || true === api.settings.theme._filesystemCredentialsNeeded;
|
||||
}
|
||||
|
||||
section.overlay.find( 'button.preview, button.preview-theme' ).toggleClass( 'disabled', disableSwitchButtons() );
|
||||
@@ -3071,7 +3074,7 @@
|
||||
api.Panel.prototype.attachEvents.apply( panel );
|
||||
|
||||
// Temporary since supplying SFTP credentials does not work yet. See #42184
|
||||
if ( api.settings.theme._filesystemCredentialsNeeded ) {
|
||||
if ( api.settings.theme._canInstall && api.settings.theme._filesystemCredentialsNeeded ) {
|
||||
panel.notifications.add( new api.Notification( 'theme_install_unavailable', {
|
||||
message: api.l10n.themeInstallUnavailable,
|
||||
type: 'info',
|
||||
@@ -5129,7 +5132,7 @@
|
||||
|
||||
// Temporary special function since supplying SFTP credentials does not work yet. See #42184.
|
||||
function disableInstallButtons() {
|
||||
return disableSwitchButtons() || true === api.settings.theme._filesystemCredentialsNeeded;
|
||||
return disableSwitchButtons() || false === api.settings.theme._canInstall || true === api.settings.theme._filesystemCredentialsNeeded;
|
||||
}
|
||||
function updateButtons() {
|
||||
control.container.find( 'button.preview, button.preview-theme' ).toggleClass( 'disabled', disableSwitchButtons() );
|
||||
@@ -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 );
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -7907,7 +7931,7 @@
|
||||
previewerAlive = state.instance( 'previewerAlive' ),
|
||||
editShortcutVisibility = state.instance( 'editShortcutVisibility' ),
|
||||
changesetLocked = state.instance( 'changesetLocked' ),
|
||||
populateChangesetUuidParam;
|
||||
populateChangesetUuidParam, defaultSelectedChangesetStatus;
|
||||
|
||||
state.bind( 'change', function() {
|
||||
var canSave;
|
||||
@@ -7941,9 +7965,7 @@
|
||||
} else {
|
||||
saveBtn.val( api.l10n.schedule );
|
||||
}
|
||||
} else if ( ! api.settings.changeset.currentUserCanPublish ) {
|
||||
selectedChangesetStatus( 'draft' );
|
||||
} else {
|
||||
} else if ( api.settings.changeset.currentUserCanPublish ) {
|
||||
saveBtn.val( api.l10n.publish );
|
||||
}
|
||||
closeBtn.find( '.screen-reader-text' ).text( api.l10n.cancel );
|
||||
@@ -7965,12 +7987,14 @@
|
||||
return status;
|
||||
};
|
||||
|
||||
defaultSelectedChangesetStatus = api.settings.changeset.currentUserCanPublish ? 'publish' : 'draft';
|
||||
|
||||
// Set default states.
|
||||
changesetStatus( api.settings.changeset.status );
|
||||
changesetLocked( Boolean( api.settings.changeset.lockUser ) );
|
||||
changesetDate( api.settings.changeset.publishDate );
|
||||
selectedChangesetDate( api.settings.changeset.publishDate );
|
||||
selectedChangesetStatus( '' === api.settings.changeset.status || 'auto-draft' === api.settings.changeset.status ? 'publish' : api.settings.changeset.status );
|
||||
selectedChangesetStatus( '' === api.settings.changeset.status || 'auto-draft' === api.settings.changeset.status ? defaultSelectedChangesetStatus : api.settings.changeset.status );
|
||||
selectedChangesetStatus.link( changesetStatus ); // Ensure that direct updates to status on server via wp.customizer.previewer.save() will update selection.
|
||||
saved( true );
|
||||
if ( '' === changesetStatus() ) { // Handle case for loading starter content.
|
||||
@@ -8216,6 +8240,7 @@
|
||||
// Check for lock when sending heartbeat requests.
|
||||
$( document ).on( 'heartbeat-send.update_lock_notice', function( event, data ) {
|
||||
data.check_changeset_lock = true;
|
||||
data.changeset_uuid = api.settings.changeset.uuid;
|
||||
} );
|
||||
|
||||
// Handle heartbeat ticks.
|
||||
@@ -8248,7 +8273,7 @@
|
||||
|
||||
// Set up initial notifications.
|
||||
(function() {
|
||||
var removedQueryParams = [];
|
||||
var removedQueryParams = [], autosaveDismissed = false;
|
||||
|
||||
/**
|
||||
* Obtain the URL to restore the autosave.
|
||||
@@ -8294,6 +8319,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 +8363,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 +8371,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 +9228,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 );
|
||||
}
|
||||
@@ -280,30 +280,6 @@ window.wp = window.wp || {};
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Check if a shortcode has Live Preview enabled for it.
|
||||
*
|
||||
* Previewable shortcodes here refers to shortcodes that have Live Preview enabled.
|
||||
*
|
||||
* These shortcodes get rewritten when the editor is in Visual mode, which means that
|
||||
* we don't want to change anything inside them, i.e. inserting a selection marker
|
||||
* inside the shortcode will break it :(
|
||||
*
|
||||
* @link wp-includes/js/mce-view.js
|
||||
*
|
||||
* @param {string} shortcode The shortcode to check.
|
||||
* @return {boolean} If a shortcode has Live Preview or not
|
||||
*/
|
||||
function isShortcodePreviewable( shortcode ) {
|
||||
var defaultPreviewableShortcodes = [ 'caption' ];
|
||||
|
||||
return (
|
||||
defaultPreviewableShortcodes.indexOf( shortcode ) !== -1 ||
|
||||
wp.mce.views.get( shortcode ) !== undefined
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get all shortcodes and their positions in the content
|
||||
*
|
||||
@@ -340,23 +316,12 @@ window.wp = window.wp || {};
|
||||
*/
|
||||
var showAsPlainText = shortcodeMatch[1] === '[';
|
||||
|
||||
/**
|
||||
* For more context check the docs for:
|
||||
*
|
||||
* @link isShortcodePreviewable
|
||||
*
|
||||
* In addition, if the shortcode will get rendered as plain text ( see above ),
|
||||
* we can treat it as text and use the selection markers in it.
|
||||
*/
|
||||
var isPreviewable = ! showAsPlainText && isShortcodePreviewable( shortcodeMatch[2] );
|
||||
|
||||
shortcodeInfo = {
|
||||
shortcodeName: shortcodeMatch[2],
|
||||
showAsPlainText: showAsPlainText,
|
||||
startIndex: shortcodeMatch.index,
|
||||
endIndex: shortcodeMatch.index + shortcodeMatch[0].length,
|
||||
length: shortcodeMatch[0].length,
|
||||
isPreviewable: isPreviewable
|
||||
length: shortcodeMatch[0].length
|
||||
};
|
||||
|
||||
shortcodesDetails.push( shortcodeInfo );
|
||||
@@ -382,7 +347,6 @@ window.wp = window.wp || {};
|
||||
startIndex: shortcodeMatch.index,
|
||||
endIndex: shortcodeMatch.index + shortcodeMatch[ 0 ].length,
|
||||
length: shortcodeMatch[ 0 ].length,
|
||||
isPreviewable: true,
|
||||
urlAtStartOfContent: shortcodeMatch[ 1 ] === '',
|
||||
urlAtEndOfContent: shortcodeMatch[ 3 ] === ''
|
||||
};
|
||||
@@ -465,7 +429,7 @@ window.wp = window.wp || {};
|
||||
}
|
||||
|
||||
var isCursorStartInShortcode = getShortcodeWrapperInfo( content, cursorStart );
|
||||
if ( isCursorStartInShortcode && isCursorStartInShortcode.isPreviewable ) {
|
||||
if ( isCursorStartInShortcode && ! isCursorStartInShortcode.showAsPlainText ) {
|
||||
/**
|
||||
* If a URL is at the start or the end of the content,
|
||||
* the selection doesn't work, because it inserts a marker in the text,
|
||||
@@ -482,7 +446,7 @@ window.wp = window.wp || {};
|
||||
}
|
||||
|
||||
var isCursorEndInShortcode = getShortcodeWrapperInfo( content, cursorEnd );
|
||||
if ( isCursorEndInShortcode && isCursorEndInShortcode.isPreviewable ) {
|
||||
if ( isCursorEndInShortcode && ! isCursorEndInShortcode.showAsPlainText ) {
|
||||
if ( isCursorEndInShortcode.urlAtEndOfContent ) {
|
||||
cursorEnd = isCursorEndInShortcode.startIndex;
|
||||
} else {
|
||||
@@ -581,6 +545,8 @@ window.wp = window.wp || {};
|
||||
|
||||
removeSelectionMarker( startNode );
|
||||
removeSelectionMarker( endNode );
|
||||
|
||||
editor.save();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -623,7 +589,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 +603,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 +616,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 );
|
||||
}
|
||||
@@ -679,10 +659,10 @@ window.wp = window.wp || {};
|
||||
*/
|
||||
function findBookmarkedPosition( editor ) {
|
||||
// Get the TinyMCE `window` reference, since we need to access the raw selection.
|
||||
var TinyMCEWIndow = editor.getWin(),
|
||||
selection = TinyMCEWIndow.getSelection();
|
||||
var TinyMCEWindow = editor.getWin(),
|
||||
selection = TinyMCEWindow.getSelection();
|
||||
|
||||
if ( selection.rangeCount <= 0 ) {
|
||||
if ( ! selection || selection.rangeCount < 1 ) {
|
||||
// no selection, no need to continue.
|
||||
return;
|
||||
}
|
||||
@@ -852,19 +832,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 +1012,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
@@ -146,8 +146,13 @@ jQuery( document ).ready( function( $ ) {
|
||||
}
|
||||
}
|
||||
|
||||
// Open the Plugin details modal.
|
||||
$( '.thickbox.open-plugin-details-modal' ).on( 'click', function( e ) {
|
||||
/*
|
||||
* Open the Plugin details modal. The event is delegated to get also the links
|
||||
* in the plugins search tab, after the AJAX search rebuilds the HTML. It's
|
||||
* delegated on the closest ancestor and not on the body to avoid conflicts
|
||||
* with other handlers, see Trac ticket #43082.
|
||||
*/
|
||||
$( '.wrap' ).on( 'click', '.thickbox.open-plugin-details-modal', function( e ) {
|
||||
// The `data-title` attribute is used only in the Plugin screens.
|
||||
var title = $( this ).data( 'title' ) ? plugininstallL10n.plugin_information + ' ' + $( this ).data( 'title' ) : plugininstallL10n.plugin_modal_label;
|
||||
|
||||
|
||||
2
wp-admin/js/plugin-install.min.js
vendored
2
wp-admin/js/plugin-install.min.js
vendored
@@ -1 +1 @@
|
||||
var tb_position;jQuery(document).ready(function(a){function b(){var b=e.find("#TB_iframeContent");f=b.contents().find("body"),c(),h.focus(),a("#plugin-information-tabs a",f).on("click",function(){c()}),f.on("keydown",function(a){27===a.which&&tb_remove()})}function c(){var b;g=a(":tabbable",f),h=e.find("#TB_closeWindowButton"),i=g.last(),b=h.add(i),b.off("keydown.wp-plugin-details"),b.on("keydown.wp-plugin-details",function(a){d(a)})}function d(a){9===a.which&&(i[0]!==a.target||a.shiftKey?h[0]===a.target&&a.shiftKey&&(a.preventDefault(),i.focus()):(a.preventDefault(),h.focus()))}var e,f,g,h,i,j=a(),k=a(".upload-view-toggle"),l=a(".wrap"),m=a(document.body);tb_position=function(){var b=a(window).width(),c=a(window).height()-(792<b?60:20),d=792<b?772:b-20;return e=a("#TB_window"),e.length&&(e.width(d).height(c),a("#TB_iframeContent").width(d).height(c),e.css({"margin-left":"-"+parseInt(d/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&e.css({top:"30px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+d+"&height="+c))})},a(window).resize(function(){tb_position()}),m.on("thickbox:iframe:loaded",e,function(){e.hasClass("plugin-details-modal")&&b()}).on("thickbox:removed",function(){j.focus()}),a(".thickbox.open-plugin-details-modal").on("click",function(b){var c=a(this).data("title")?plugininstallL10n.plugin_information+" "+a(this).data("title"):plugininstallL10n.plugin_modal_label;b.preventDefault(),b.stopPropagation(),j=a(this),tb_click.call(this),e.attr({role:"dialog","aria-label":plugininstallL10n.plugin_modal_label}).addClass("plugin-details-modal"),e.find("#TB_iframeContent").attr("title",c)}),a("#plugin-information-tabs a").click(function(b){var c=a(this).attr("name");b.preventDefault(),a("#plugin-information-tabs a.current").removeClass("current"),a(this).addClass("current"),"description"!==c&&a(window).width()<772?a("#plugin-information-content").find(".fyi").hide():a("#plugin-information-content").find(".fyi").show(),a("#section-holder div.section").hide(),a("#section-"+c).show()}),l.hasClass("plugin-install-tab-upload")||k.attr({role:"button","aria-expanded":"false"}).on("click",function(a){a.preventDefault(),m.toggleClass("show-upload-view"),k.attr("aria-expanded",m.hasClass("show-upload-view"))})});
|
||||
var tb_position;jQuery(document).ready(function(a){function b(){var b=e.find("#TB_iframeContent");f=b.contents().find("body"),c(),h.focus(),a("#plugin-information-tabs a",f).on("click",function(){c()}),f.on("keydown",function(a){27===a.which&&tb_remove()})}function c(){var b;g=a(":tabbable",f),h=e.find("#TB_closeWindowButton"),i=g.last(),b=h.add(i),b.off("keydown.wp-plugin-details"),b.on("keydown.wp-plugin-details",function(a){d(a)})}function d(a){9===a.which&&(i[0]!==a.target||a.shiftKey?h[0]===a.target&&a.shiftKey&&(a.preventDefault(),i.focus()):(a.preventDefault(),h.focus()))}var e,f,g,h,i,j=a(),k=a(".upload-view-toggle"),l=a(".wrap"),m=a(document.body);tb_position=function(){var b=a(window).width(),c=a(window).height()-(792<b?60:20),d=792<b?772:b-20;return e=a("#TB_window"),e.length&&(e.width(d).height(c),a("#TB_iframeContent").width(d).height(c),e.css({"margin-left":"-"+parseInt(d/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&e.css({top:"30px","margin-top":"0"})),a("a.thickbox").each(function(){var b=a(this).attr("href");b&&(b=b.replace(/&width=[0-9]+/g,""),b=b.replace(/&height=[0-9]+/g,""),a(this).attr("href",b+"&width="+d+"&height="+c))})},a(window).resize(function(){tb_position()}),m.on("thickbox:iframe:loaded",e,function(){e.hasClass("plugin-details-modal")&&b()}).on("thickbox:removed",function(){j.focus()}),a(".wrap").on("click",".thickbox.open-plugin-details-modal",function(b){var c=a(this).data("title")?plugininstallL10n.plugin_information+" "+a(this).data("title"):plugininstallL10n.plugin_modal_label;b.preventDefault(),b.stopPropagation(),j=a(this),tb_click.call(this),e.attr({role:"dialog","aria-label":plugininstallL10n.plugin_modal_label}).addClass("plugin-details-modal"),e.find("#TB_iframeContent").attr("title",c)}),a("#plugin-information-tabs a").click(function(b){var c=a(this).attr("name");b.preventDefault(),a("#plugin-information-tabs a.current").removeClass("current"),a(this).addClass("current"),"description"!==c&&a(window).width()<772?a("#plugin-information-content").find(".fyi").hide():a("#plugin-information-content").find(".fyi").show(),a("#section-holder div.section").hide(),a("#section-"+c).show()}),l.hasClass("plugin-install-tab-upload")||k.attr({role:"button","aria-expanded":"false"}).on("click",function(a){a.preventDefault(),m.toggleClass("show-upload-view"),k.attr("aria-expanded",m.hasClass("show-upload-view"))})});
|
||||
@@ -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
@@ -2437,7 +2437,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 'undefined' === typeof message.action ) {
|
||||
if ( ! message || 'undefined' === typeof message.action ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
2
wp-admin/js/updates.min.js
vendored
2
wp-admin/js/updates.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -513,9 +513,10 @@ wpWidgets = {
|
||||
save : function( widget, del, animate, order ) {
|
||||
var self = this, data, a,
|
||||
sidebarId = widget.closest( 'div.widgets-sortables' ).attr( 'id' ),
|
||||
form = widget.find( 'form' );
|
||||
form = widget.find( 'form' ),
|
||||
isAdd = widget.find( 'input.add_new' ).val();
|
||||
|
||||
if ( ! del && form.prop( 'checkValidity' ) && ! form[0].checkValidity() ) {
|
||||
if ( ! del && ! isAdd && form.prop( 'checkValidity' ) && ! form[0].checkValidity() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
2
wp-admin/js/widgets.min.js
vendored
2
wp-admin/js/widgets.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -204,7 +204,7 @@ wp.customHtmlWidgets = ( function( $ ) {
|
||||
* @returns {void}
|
||||
*/
|
||||
onUpdateErrorNotice: function onUpdateErrorNotice( errorAnnotations ) {
|
||||
control.saveButton.toggleClass( 'validation-blocked disabled', errorAnnotations.length );
|
||||
control.saveButton.toggleClass( 'validation-blocked disabled', errorAnnotations.length > 0 );
|
||||
control.updateErrorNotice( errorAnnotations );
|
||||
}
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -83,7 +83,7 @@ if ( $_POST ) {
|
||||
);
|
||||
|
||||
// Handle translation installation.
|
||||
if ( ! empty( $_POST['WPLANG'] ) && current_user_can( 'install_languages' ) ) {
|
||||
if ( ! empty( $_POST['WPLANG'] ) && current_user_can( 'install_languages' ) && wp_can_install_language_pack() ) {
|
||||
$language = wp_download_language_pack( $_POST['WPLANG'] );
|
||||
if ( $language ) {
|
||||
$_POST['WPLANG'] = $language;
|
||||
@@ -374,14 +374,16 @@ if ( isset( $_GET['updated'] ) ) {
|
||||
$lang = '';
|
||||
}
|
||||
|
||||
wp_dropdown_languages( array(
|
||||
'name' => 'WPLANG',
|
||||
'id' => 'WPLANG',
|
||||
'selected' => $lang,
|
||||
'languages' => $languages,
|
||||
'translations' => $translations,
|
||||
'show_available_translations' => current_user_can( 'install_languages' ),
|
||||
) );
|
||||
wp_dropdown_languages(
|
||||
array(
|
||||
'name' => 'WPLANG',
|
||||
'id' => 'WPLANG',
|
||||
'selected' => $lang,
|
||||
'languages' => $languages,
|
||||
'translations' => $translations,
|
||||
'show_available_translations' => current_user_can( 'install_languages' ) && wp_can_install_language_pack(),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -68,7 +68,7 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
|
||||
$meta['WPLANG'] = ''; // en_US
|
||||
} elseif ( in_array( $_POST['WPLANG'], get_available_languages() ) ) {
|
||||
$meta['WPLANG'] = $_POST['WPLANG'];
|
||||
} elseif ( current_user_can( 'install_languages' ) ) {
|
||||
} elseif ( current_user_can( 'install_languages' ) && wp_can_install_language_pack() ) {
|
||||
$language = wp_download_language_pack( wp_unslash( $_POST['WPLANG'] ) );
|
||||
if ( $language ) {
|
||||
$meta['WPLANG'] = $language;
|
||||
@@ -230,14 +230,16 @@ if ( ! empty( $messages ) ) {
|
||||
$lang = '';
|
||||
}
|
||||
|
||||
wp_dropdown_languages( array(
|
||||
'name' => 'WPLANG',
|
||||
'id' => 'site-language',
|
||||
'selected' => $lang,
|
||||
'languages' => $languages,
|
||||
'translations' => $translations,
|
||||
'show_available_translations' => current_user_can( 'install_languages' ),
|
||||
) );
|
||||
wp_dropdown_languages(
|
||||
array(
|
||||
'name' => 'WPLANG',
|
||||
'id' => 'site-language',
|
||||
'selected' => $lang,
|
||||
'languages' => $languages,
|
||||
'translations' => $translations,
|
||||
'show_available_translations' => current_user_can( 'install_languages' ) && wp_can_install_language_pack(),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -158,7 +158,7 @@ if ( ! empty( $languages ) || ! empty( $translations ) ) {
|
||||
'selected' => $locale,
|
||||
'languages' => $languages,
|
||||
'translations' => $translations,
|
||||
'show_available_translations' => current_user_can( 'install_languages' ),
|
||||
'show_available_translations' => current_user_can( 'install_languages' ) && wp_can_install_language_pack(),
|
||||
) );
|
||||
|
||||
// Add note about deprecated WPLANG constant.
|
||||
|
||||
@@ -180,9 +180,11 @@ if ( 'update' == $action ) {
|
||||
if ( ! empty( $_POST['WPLANG'] ) && current_user_can( 'install_languages' ) ) {
|
||||
require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
|
||||
|
||||
$language = wp_download_language_pack( $_POST['WPLANG'] );
|
||||
if ( $language ) {
|
||||
$_POST['WPLANG'] = $language;
|
||||
if ( wp_can_install_language_pack() ) {
|
||||
$language = wp_download_language_pack( $_POST['WPLANG'] );
|
||||
if ( $language ) {
|
||||
$_POST['WPLANG'] = $language;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -207,7 +207,7 @@ include(ABSPATH . 'wp-admin/admin-header.php');
|
||||
foreach ( $features as $feature => $feature_name ) {
|
||||
$feature = esc_attr( $feature );
|
||||
echo '<input type="checkbox" id="filter-id-' . $feature . '" value="' . $feature . '" /> ';
|
||||
echo '<label for="filter-id-' . $feature . '">' . $feature_name . '</label><br>';
|
||||
echo '<label for="filter-id-' . $feature . '">' . $feature_name . '</label>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '</fieldset>';
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -22,7 +22,7 @@ get_header(); ?>
|
||||
while ( have_posts() ) : the_post();
|
||||
get_template_part( 'template-parts/page/content', 'front-page' );
|
||||
endwhile;
|
||||
else : // I'm not sure it's possible to have no posts when this page is shown, but WTH.
|
||||
else :
|
||||
get_template_part( 'template-parts/post/content', 'none' );
|
||||
endif; ?>
|
||||
|
||||
|
||||
@@ -432,15 +432,7 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
break;
|
||||
case 'install_languages':
|
||||
case 'update_languages':
|
||||
if ( ! function_exists( 'request_filesystem_credentials' ) ) {
|
||||
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'wp_can_install_language_pack' ) ) {
|
||||
require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
|
||||
}
|
||||
|
||||
if ( ! wp_can_install_language_pack() ) {
|
||||
if ( ! wp_is_file_mod_allowed( 'can_install_language_pack' ) ) {
|
||||
$caps[] = 'do_not_allow';
|
||||
} elseif ( is_multisite() && ! is_super_admin( $user_id ) ) {
|
||||
$caps[] = 'do_not_allow';
|
||||
|
||||
@@ -20,7 +20,7 @@ function get_category_link( $category ) {
|
||||
if ( ! is_object( $category ) )
|
||||
$category = (int) $category;
|
||||
|
||||
$category = get_term_link( $category, 'category' );
|
||||
$category = get_term_link( $category );
|
||||
|
||||
if ( is_wp_error( $category ) )
|
||||
return '';
|
||||
@@ -104,7 +104,7 @@ function get_the_category( $id = false ) {
|
||||
*/
|
||||
function get_the_category_by_ID( $cat_ID ) {
|
||||
$cat_ID = (int) $cat_ID;
|
||||
$category = get_term( $cat_ID, 'category' );
|
||||
$category = get_term( $cat_ID );
|
||||
|
||||
if ( is_wp_error( $category ) )
|
||||
return $category;
|
||||
@@ -1065,15 +1065,7 @@ function walk_category_dropdown_tree() {
|
||||
* @return string Link on success, empty string if tag does not exist.
|
||||
*/
|
||||
function get_tag_link( $tag ) {
|
||||
if ( ! is_object( $tag ) )
|
||||
$tag = (int) $tag;
|
||||
|
||||
$tag = get_term_link( $tag, 'post_tag' );
|
||||
|
||||
if ( is_wp_error( $tag ) )
|
||||
return '';
|
||||
|
||||
return $tag;
|
||||
return get_category_link( $tag );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1161,20 +1153,20 @@ function tag_description( $tag = 0 ) {
|
||||
* Retrieve term description.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @since 4.9.2 The `$taxonomy` parameter was deprecated.
|
||||
*
|
||||
* @param int $term Optional. Term ID. Will use global term ID by default.
|
||||
* @param string $taxonomy Optional taxonomy name. Defaults to 'post_tag'.
|
||||
* @param int $term Optional. Term ID. Will use global term ID by default.
|
||||
* @param null $deprecated Deprecated argument.
|
||||
* @return string Term description, available.
|
||||
*/
|
||||
function term_description( $term = 0, $taxonomy = 'post_tag' ) {
|
||||
function term_description( $term = 0, $deprecated = null ) {
|
||||
if ( ! $term && ( is_tax() || is_tag() || is_category() ) ) {
|
||||
$term = get_queried_object();
|
||||
if ( $term ) {
|
||||
$taxonomy = $term->taxonomy;
|
||||
$term = $term->term_id;
|
||||
}
|
||||
}
|
||||
$description = get_term_field( 'description', $term, $taxonomy );
|
||||
$description = get_term_field( 'description', $term );
|
||||
return is_wp_error( $description ) ? '' : $description;
|
||||
}
|
||||
|
||||
|
||||
@@ -607,8 +607,11 @@ final class WP_Customize_Manager {
|
||||
* enabled, then a new UUID will be generated.
|
||||
*
|
||||
* @since 4.9.0
|
||||
* @global string $pagenow
|
||||
*/
|
||||
public function establish_loaded_changeset() {
|
||||
global $pagenow;
|
||||
|
||||
if ( empty( $this->_changeset_uuid ) ) {
|
||||
$changeset_uuid = null;
|
||||
|
||||
@@ -635,7 +638,9 @@ final class WP_Customize_Manager {
|
||||
$this->_changeset_uuid = $changeset_uuid;
|
||||
}
|
||||
|
||||
$this->set_changeset_lock( $this->changeset_post_id() );
|
||||
if ( is_admin() && 'customize.php' === $pagenow ) {
|
||||
$this->set_changeset_lock( $this->changeset_post_id() );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1130,7 +1135,7 @@ final class WP_Customize_Manager {
|
||||
if ( ! $changeset_post_id ) {
|
||||
$this->_changeset_data = array();
|
||||
} else {
|
||||
if ( $this->autosaved() ) {
|
||||
if ( $this->autosaved() && is_user_logged_in() ) {
|
||||
$autosave_post = wp_get_post_autosave( $changeset_post_id, get_current_user_id() );
|
||||
if ( $autosave_post ) {
|
||||
$data = $this->get_changeset_post_data( $autosave_post->ID );
|
||||
@@ -2873,10 +2878,12 @@ final class WP_Customize_Manager {
|
||||
$post_array['edit_date'] = true; // Prevent date clearing.
|
||||
$r = wp_update_post( wp_slash( $post_array ), true );
|
||||
|
||||
// Delete autosave revision when the changeset is updated.
|
||||
$autosave_draft = wp_get_post_autosave( $changeset_post_id, get_current_user_id() );
|
||||
if ( $autosave_draft ) {
|
||||
wp_delete_post( $autosave_draft->ID, true );
|
||||
// Delete autosave revision for user when the changeset is updated.
|
||||
if ( ! empty( $args['user_id'] ) ) {
|
||||
$autosave_draft = wp_get_post_autosave( $changeset_post_id, $args['user_id'] );
|
||||
if ( $autosave_draft ) {
|
||||
wp_delete_post( $autosave_draft->ID, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -3163,15 +3170,26 @@ final class WP_Customize_Manager {
|
||||
* @return array The Heartbeat response.
|
||||
*/
|
||||
public function check_changeset_lock_with_heartbeat( $response, $data, $screen_id ) {
|
||||
if ( array_key_exists( 'check_changeset_lock', $data ) && 'customize' === $screen_id && current_user_can( 'customize' ) && $this->changeset_post_id() ) {
|
||||
$lock_user_id = wp_check_post_lock( $this->changeset_post_id() );
|
||||
if ( isset( $data['changeset_uuid'] ) ) {
|
||||
$changeset_post_id = $this->find_changeset_post_id( $data['changeset_uuid'] );
|
||||
} else {
|
||||
$changeset_post_id = $this->changeset_post_id();
|
||||
}
|
||||
|
||||
if (
|
||||
array_key_exists( 'check_changeset_lock', $data )
|
||||
&& 'customize' === $screen_id
|
||||
&& $changeset_post_id
|
||||
&& current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $changeset_post_id )
|
||||
) {
|
||||
$lock_user_id = wp_check_post_lock( $changeset_post_id );
|
||||
|
||||
if ( $lock_user_id ) {
|
||||
$response['customize_changeset_lock_user'] = $this->get_lock_user_data( $lock_user_id );
|
||||
} else {
|
||||
|
||||
// Refreshing time will ensure that the user is sitting on customizer and has not closed the customizer tab.
|
||||
$this->refresh_changeset_lock( $this->changeset_post_id() );
|
||||
$this->refresh_changeset_lock( $changeset_post_id );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3488,6 +3506,11 @@ final class WP_Customize_Manager {
|
||||
* @since 4.9.0
|
||||
*/
|
||||
public function handle_dismiss_autosave_or_lock_request() {
|
||||
// Calls to dismiss_user_auto_draft_changesets() and wp_get_post_autosave() require non-zero get_current_user_id().
|
||||
if ( ! is_user_logged_in() ) {
|
||||
wp_send_json_error( 'unauthenticated', 401 );
|
||||
}
|
||||
|
||||
if ( ! $this->is_preview() ) {
|
||||
wp_send_json_error( 'not_preview', 400 );
|
||||
}
|
||||
@@ -3939,6 +3962,22 @@ final class WP_Customize_Manager {
|
||||
* @since 4.1.0
|
||||
*/
|
||||
public function render_control_templates() {
|
||||
if ( $this->branching() ) {
|
||||
$l10n = array(
|
||||
/* translators: %s: User who is customizing the changeset in customizer. */
|
||||
'locked' => __( '%s is already customizing this changeset. Please wait until they are done to try customizing. Your latest changes have been autosaved.' ),
|
||||
/* translators: %s: User who is customizing the changeset in customizer. */
|
||||
'locked_allow_override' => __( '%s is already customizing this changeset. Do you want to take over?' ),
|
||||
);
|
||||
} else {
|
||||
$l10n = array(
|
||||
/* translators: %s: User who is customizing the changeset in customizer. */
|
||||
'locked' => __( '%s is already customizing this site. Please wait until they are done to try customizing. Your latest changes have been autosaved.' ),
|
||||
/* translators: %s: User who is customizing the changeset in customizer. */
|
||||
'locked_allow_override' => __( '%s is already customizing this site. Do you want to take over?' ),
|
||||
);
|
||||
}
|
||||
|
||||
foreach ( $this->registered_control_types as $control_type ) {
|
||||
$control = new $control_type( $this, 'temp', array(
|
||||
'settings' => array(),
|
||||
@@ -4101,13 +4140,11 @@ final class WP_Customize_Manager {
|
||||
{{{ data.message }}}
|
||||
<# } else if ( data.allowOverride ) { #>
|
||||
<?php
|
||||
/* translators: %s: User who is customizing the changeset in customizer. */
|
||||
printf( __( '%s is already customizing this site. Do you want to take over?' ), '{{ data.lockUser.name }}' );
|
||||
echo esc_html( sprintf( $l10n['locked_allow_override'], '{{ data.lockUser.name }}' ) );
|
||||
?>
|
||||
<# } else { #>
|
||||
<?php
|
||||
/* translators: %s: User who is customizing the changeset in customizer. */
|
||||
printf( __( '%s is already customizing this site. Please wait until they are done to try customizing. Your latest changes have been autosaved.' ), '{{ data.lockUser.name }}' );
|
||||
echo esc_html( sprintf( $l10n['locked'], '{{ data.lockUser.name }}' ) );
|
||||
?>
|
||||
<# } #>
|
||||
</p>
|
||||
@@ -4125,6 +4162,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. */
|
||||
?>
|
||||
@@ -4543,7 +4592,9 @@ final class WP_Customize_Manager {
|
||||
$changeset_post_id = $this->changeset_post_id();
|
||||
if ( ! $this->saved_starter_content_changeset && ! $this->autosaved() ) {
|
||||
if ( $changeset_post_id ) {
|
||||
$autosave_revision_post = wp_get_post_autosave( $changeset_post_id, get_current_user_id() );
|
||||
if ( is_user_logged_in() ) {
|
||||
$autosave_revision_post = wp_get_post_autosave( $changeset_post_id, get_current_user_id() );
|
||||
}
|
||||
} else {
|
||||
$autosave_autodraft_posts = $this->get_changeset_posts( array(
|
||||
'posts_per_page' => 1,
|
||||
@@ -4624,8 +4675,9 @@ final class WP_Customize_Manager {
|
||||
'previewFrameSensitivity' => 2000,
|
||||
),
|
||||
'theme' => array(
|
||||
'stylesheet' => $this->get_stylesheet(),
|
||||
'active' => $this->is_theme_active(),
|
||||
'stylesheet' => $this->get_stylesheet(),
|
||||
'active' => $this->is_theme_active(),
|
||||
'_canInstall' => current_user_can( 'install_themes' ),
|
||||
),
|
||||
'url' => array(
|
||||
'preview' => esc_url_raw( $this->get_preview_url() ),
|
||||
|
||||
@@ -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 );
|
||||
@@ -370,6 +370,22 @@ final class WP_Customize_Nav_Menus {
|
||||
}
|
||||
}
|
||||
|
||||
// Add "Home" link if search term matches. Treat as a page, but switch to custom on add.
|
||||
if ( isset( $args['s'] ) ) {
|
||||
$title = _x( 'Home', 'nav menu home label' );
|
||||
$matches = function_exists( 'mb_stripos' ) ? false !== mb_stripos( $title, $args['s'] ) : false !== stripos( $title, $args['s'] );
|
||||
if ( $matches ) {
|
||||
$items[] = array(
|
||||
'id' => 'home',
|
||||
'title' => $title,
|
||||
'type' => 'custom',
|
||||
'type_label' => __( 'Custom Link' ),
|
||||
'object' => '',
|
||||
'url' => home_url(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the available menu items during a search request.
|
||||
*
|
||||
|
||||
@@ -3032,7 +3032,15 @@ class WP_Query {
|
||||
*/
|
||||
$this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ) );
|
||||
} else {
|
||||
$this->found_posts = count( $this->posts );
|
||||
if ( is_array( $this->posts ) ) {
|
||||
$this->found_posts = count( $this->posts );
|
||||
} else {
|
||||
if ( null === $this->posts ) {
|
||||
$this->found_posts = 0;
|
||||
} else {
|
||||
$this->found_posts = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -730,10 +730,10 @@ div.mce-menu .mce-menu-item-sep,
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.mce-menubtn.mce-fixed-width button {
|
||||
.mce-menubtn.mce-fixed-width span {
|
||||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 110px;
|
||||
width: 82px;
|
||||
}
|
||||
|
||||
/* Charmap modal */
|
||||
|
||||
2
wp-includes/css/editor-rtl.min.css
vendored
2
wp-includes/css/editor-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -730,10 +730,10 @@ div.mce-menu .mce-menu-item-sep,
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.mce-menubtn.mce-fixed-width button {
|
||||
.mce-menubtn.mce-fixed-width span {
|
||||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 110px;
|
||||
width: 82px;
|
||||
}
|
||||
|
||||
/* Charmap modal */
|
||||
|
||||
2
wp-includes/css/editor.min.css
vendored
2
wp-includes/css/editor.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -35,11 +35,20 @@ class WP_Customize_Nav_Menu_Control extends WP_Customize_Control {
|
||||
* @since 4.3.0
|
||||
*/
|
||||
public function content_template() {
|
||||
$add_items = __( 'Add Items' );
|
||||
?>
|
||||
<p class="new-menu-item-invitation"><?php _e( 'Time to add some links! Click “Add menu items” to start putting pages, categories, and custom links in your menu. Add as many things as you’d like.' ); ?></p>
|
||||
<p class="new-menu-item-invitation">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: "Add Items" button text */
|
||||
__( 'Time to add some links! Click “%s” to start putting pages, categories, and custom links in your menu. Add as many things as you’d like.' ),
|
||||
$add_items
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<div class="customize-control-nav_menu-buttons">
|
||||
<button type="button" class="button add-new-menu-item" aria-label="<?php esc_attr_e( 'Add or remove menu items' ); ?>" aria-expanded="false" aria-controls="available-menu-items">
|
||||
<?php _e( 'Add Items' ); ?>
|
||||
<?php echo $add_items; ?>
|
||||
</button>
|
||||
<button type="button" class="button-link reorder-toggle" aria-label="<?php esc_attr_e( 'Reorder menu items' ); ?>" aria-describedby="reorder-items-desc-{{ data.menu_id }}">
|
||||
<span class="reorder"><?php _e( 'Reorder' ); ?></span>
|
||||
|
||||
@@ -163,7 +163,7 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
|
||||
<div class="filter-group-feature">
|
||||
<?php foreach ( $features as $feature => $feature_name ) : ?>
|
||||
<input type="checkbox" id="filter-id-<?php echo esc_attr( $feature ); ?>" value="<?php echo esc_attr( $feature ); ?>" />
|
||||
<label for="filter-id-<?php echo esc_attr( $feature ); ?>"><?php echo esc_html( $feature_name ); ?></label><br>
|
||||
<label for="filter-id-<?php echo esc_attr( $feature ); ?>"><?php echo esc_html( $feature_name ); ?></label>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -114,7 +114,7 @@ foreach ( array( 'single_post_title', 'single_cat_title', 'single_tag_title', 's
|
||||
}
|
||||
|
||||
// Format text area for display.
|
||||
foreach ( array( 'term_description', 'get_the_author_description', 'get_the_post_type_description' ) as $filter ) {
|
||||
foreach ( array( 'term_description', 'get_the_post_type_description' ) as $filter ) {
|
||||
add_filter( $filter, 'wptexturize' );
|
||||
add_filter( $filter, 'convert_chars' );
|
||||
add_filter( $filter, 'wpautop' );
|
||||
@@ -342,6 +342,10 @@ add_action( 'template_redirect', 'wp_old_slug_redirect' );
|
||||
add_action( 'post_updated', 'wp_check_for_changed_slugs', 12, 3 );
|
||||
add_action( 'attachment_updated', 'wp_check_for_changed_slugs', 12, 3 );
|
||||
|
||||
// Redirect Old Dates
|
||||
add_action( 'post_updated', 'wp_check_for_changed_dates', 12, 3 );
|
||||
add_action( 'attachment_updated', 'wp_check_for_changed_dates', 12, 3 );
|
||||
|
||||
// Nonce check for Post Previews
|
||||
add_action( 'init', '_show_post_preview' );
|
||||
|
||||
|
||||
@@ -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" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2449,6 +2449,7 @@ function wp_get_mime_types() {
|
||||
'ra|ram' => 'audio/x-realaudio',
|
||||
'wav' => 'audio/wav',
|
||||
'ogg|oga' => 'audio/ogg',
|
||||
'flac' => 'audio/flac',
|
||||
'mid|midi' => 'audio/midi',
|
||||
'wma' => 'audio/x-ms-wma',
|
||||
'wax' => 'audio/x-ms-wax',
|
||||
@@ -2534,7 +2535,7 @@ function wp_get_ext_types() {
|
||||
*/
|
||||
return apply_filters( 'ext2type', array(
|
||||
'image' => array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico' ),
|
||||
'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ),
|
||||
'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'flac', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ),
|
||||
'video' => array( '3g2', '3gp', '3gpp', 'asf', 'avi', 'divx', 'dv', 'flv', 'm4v', 'mkv', 'mov', 'mp4', 'mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt', 'rm', 'vob', 'wmv' ),
|
||||
'document' => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'xps', 'oxps', 'rtf', 'wp', 'wpd', 'psd', 'xcf' ),
|
||||
'spreadsheet' => array( 'numbers', 'ods', 'xls', 'xlsx', 'xlsm', 'xlsb' ),
|
||||
@@ -2561,8 +2562,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.
|
||||
@@ -5736,6 +5738,13 @@ function wp_cache_get_last_changed( $group ) {
|
||||
* @param string $option_name The relevant database option name.
|
||||
*/
|
||||
function wp_site_admin_email_change_notification( $old_email, $new_email, $option_name ) {
|
||||
$send = true;
|
||||
|
||||
// Don't send the notification to the default 'admin_email' value.
|
||||
if ( 'you@example.com' === $old_email ) {
|
||||
$send = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters whether to send the site admin email change notification email.
|
||||
*
|
||||
@@ -5745,7 +5754,7 @@ function wp_site_admin_email_change_notification( $old_email, $new_email, $optio
|
||||
* @param string $old_email The old site admin email address.
|
||||
* @param string $new_email The new site admin email address.
|
||||
*/
|
||||
$send = apply_filters( 'send_site_admin_email_change_email', true, $old_email, $new_email );
|
||||
$send = apply_filters( 'send_site_admin_email_change_email', $send, $old_email, $new_email );
|
||||
|
||||
if ( ! $send ) {
|
||||
return;
|
||||
|
||||
@@ -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;
|
||||
@@ -2885,7 +2885,7 @@ function wp_resource_hints() {
|
||||
* The path is removed in the foreach loop below.
|
||||
*/
|
||||
/** This filter is documented in wp-includes/formatting.php */
|
||||
$hints['dns-prefetch'][] = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2.3/svg/' );
|
||||
$hints['dns-prefetch'][] = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2.4/svg/' );
|
||||
|
||||
foreach ( $hints as $relation_type => $urls ) {
|
||||
$unique_urls = array();
|
||||
@@ -3029,7 +3029,7 @@ function user_can_richedit() {
|
||||
if ( $is_safari ) {
|
||||
$wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
|
||||
} elseif ( $is_IE ) {
|
||||
$wp_rich_edit = ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE ' ) === false );
|
||||
$wp_rich_edit = ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Trident/7.0;' ) !== false );
|
||||
} elseif ( $is_gecko || $is_chrome || $is_edge || ( $is_opera && !wp_is_mobile() ) ) {
|
||||
$wp_rich_edit = true;
|
||||
}
|
||||
@@ -3155,6 +3155,8 @@ function wp_enqueue_code_editor( $args ) {
|
||||
'Ctrl-/' => 'toggleComment',
|
||||
'Cmd-/' => 'toggleComment',
|
||||
'Alt-F' => 'findPersistent',
|
||||
'Ctrl-F' => 'findPersistent',
|
||||
'Cmd-F' => 'findPersistent',
|
||||
),
|
||||
'direction' => 'ltr', // Code is shown in LTR even in RTL languages.
|
||||
'gutters' => array(),
|
||||
@@ -3197,7 +3199,7 @@ function wp_enqueue_code_editor( $args ) {
|
||||
'htmlhint' => array(
|
||||
'tagname-lowercase' => true,
|
||||
'attr-lowercase' => true,
|
||||
'attr-value-double-quotes' => true,
|
||||
'attr-value-double-quotes' => false,
|
||||
'doctype-first' => false,
|
||||
'tag-pair' => true,
|
||||
'spec-char-escape' => true,
|
||||
@@ -3568,12 +3570,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);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -488,6 +488,10 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
|
||||
wp.mediaelement.initialize();
|
||||
}
|
||||
|
||||
if ( wp.playlist ) {
|
||||
wp.playlist.initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Announce when a partial's placement has been rendered so that dynamic elements can be re-built.
|
||||
*/
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -863,7 +863,7 @@
|
||||
|
||||
// Obtain the target width for the embed.
|
||||
if ( self.editor ) {
|
||||
maxwidth = self.editor.iframeElement.clientWidth - 20; // Minus the sum of horizontal margins and borders.
|
||||
maxwidth = self.editor.getBody().clientWidth;
|
||||
}
|
||||
|
||||
wp.ajax.post( this.action, {
|
||||
|
||||
2
wp-includes/js/mce-view.min.js
vendored
2
wp-includes/js/mce-view.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -4173,10 +4173,6 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
|
||||
tagName: 'div',
|
||||
template: wp.template('media-modal'),
|
||||
|
||||
attributes: {
|
||||
tabindex: 0
|
||||
},
|
||||
|
||||
events: {
|
||||
'click .media-modal-backdrop, .media-modal-close': 'escapeHandler',
|
||||
'keydown': 'keydown'
|
||||
@@ -4188,8 +4184,7 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
|
||||
_.defaults( this.options, {
|
||||
container: document.body,
|
||||
title: '',
|
||||
propagate: true,
|
||||
freeze: true
|
||||
propagate: true
|
||||
});
|
||||
|
||||
this.focusManager = new wp.media.view.FocusManager({
|
||||
@@ -4244,7 +4239,6 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
|
||||
*/
|
||||
open: function() {
|
||||
var $el = this.$el,
|
||||
options = this.options,
|
||||
mceEditor;
|
||||
|
||||
if ( $el.is(':visible') ) {
|
||||
@@ -4257,13 +4251,6 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
|
||||
this.attach();
|
||||
}
|
||||
|
||||
// If the `freeze` option is set, record the window's scroll position.
|
||||
if ( options.freeze ) {
|
||||
this._freeze = {
|
||||
scrollTop: $( window ).scrollTop()
|
||||
};
|
||||
}
|
||||
|
||||
// Disable page scrolling.
|
||||
$( 'body' ).addClass( 'modal-open' );
|
||||
|
||||
@@ -4271,7 +4258,7 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
|
||||
|
||||
// Try to close the onscreen keyboard
|
||||
if ( 'ontouchend' in document ) {
|
||||
if ( ( mceEditor = window.tinymce && window.tinymce.activeEditor ) && ! mceEditor.isHidden() && mceEditor.iframeElement ) {
|
||||
if ( ( mceEditor = window.tinymce && window.tinymce.activeEditor ) && ! mceEditor.isHidden() && mceEditor.iframeElement ) {
|
||||
mceEditor.iframeElement.focus();
|
||||
mceEditor.iframeElement.blur();
|
||||
|
||||
@@ -4281,7 +4268,8 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
|
||||
}
|
||||
}
|
||||
|
||||
this.$el.focus();
|
||||
// Set initial focus on the content instead of this view element, to avoid page scrolling.
|
||||
this.$( '.media-modal' ).focus();
|
||||
|
||||
return this.propagate('open');
|
||||
},
|
||||
@@ -4291,8 +4279,6 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
|
||||
* @returns {wp.media.view.Modal} Returns itself to allow chaining
|
||||
*/
|
||||
close: function( options ) {
|
||||
var freeze = this._freeze;
|
||||
|
||||
if ( ! this.views.attached || ! this.$el.is(':visible') ) {
|
||||
return this;
|
||||
}
|
||||
@@ -4312,11 +4298,6 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
|
||||
|
||||
this.propagate('close');
|
||||
|
||||
// If the `freeze` option is set, restore the container's scroll position.
|
||||
if ( freeze ) {
|
||||
$( window ).scrollTop( freeze.scrollTop );
|
||||
}
|
||||
|
||||
if ( options && options.escape ) {
|
||||
this.propagate('escape');
|
||||
}
|
||||
@@ -8957,18 +8938,28 @@ Cropper = View.extend(/** @lends wp.media.view.Cropper.prototype */{
|
||||
imgOptions = _.extend(imgOptions, {
|
||||
parent: this.$el,
|
||||
onInit: function() {
|
||||
this.parent.children().on( 'mousedown touchstart', function( e ){
|
||||
|
||||
if ( e.shiftKey ) {
|
||||
// Store the set ratio.
|
||||
var setRatio = imgSelect.getOptions().aspectRatio;
|
||||
|
||||
// On mousedown, if no ratio is set and the Shift key is down, use a 1:1 ratio.
|
||||
this.parent.children().on( 'mousedown touchstart', function( e ) {
|
||||
|
||||
// If no ratio is set and the shift key is down, use a 1:1 ratio.
|
||||
if ( ! setRatio && e.shiftKey ) {
|
||||
imgSelect.setOptions( {
|
||||
aspectRatio: '1:1'
|
||||
} );
|
||||
} else {
|
||||
imgSelect.setOptions( {
|
||||
aspectRatio: false
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
this.parent.children().on( 'mouseup touchend', function() {
|
||||
|
||||
// Restore the set ratio.
|
||||
imgSelect.setOptions( {
|
||||
aspectRatio: setRatio ? setRatio : false
|
||||
} );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
this.trigger('image-loaded');
|
||||
|
||||
6
wp-includes/js/media-views.min.js
vendored
6
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,89 +0,0 @@
|
||||
'use strict';/*!
|
||||
* This is a `i18n` language object.
|
||||
*
|
||||
* Catalan
|
||||
*
|
||||
* @author
|
||||
* Tongro
|
||||
*
|
||||
* @see core/i18n.js
|
||||
*/
|
||||
(function (exports) {
|
||||
if (exports.ca === undefined) {
|
||||
exports.ca = {
|
||||
'mejs.plural-form': 1,
|
||||
'mejs.download-file': 'Descarregar arxiu',
|
||||
'mejs.install-flash': 'Esteu utilitzant un navegador que no tingui Flash Player activat o instal·lat. Activeu el vostre complement Flash Player o descarregueu la versió més recent de https://get.adobe.com/flashplayer/',
|
||||
'mejs.fullscreen': 'Pantalla completa',
|
||||
'mejs.play': 'Reproducció',
|
||||
'mejs.pause': 'Pausa',
|
||||
'mejs.time-slider': 'Control lliscant de temps',
|
||||
'mejs.time-help-text': 'Utilitzeu les tecles de fletxa esquerra / dreta per avançar un segon, fletxes amunt / avall per avançar deu segons.',
|
||||
'mejs.live-broadcast' : 'Transmissió en directe',
|
||||
'mejs.volume-help-text': 'Utilitzeu les tecles de fletxa amunt / avall per augmentar o disminuir el volum.',
|
||||
'mejs.unmute': 'Reactivar silenci',
|
||||
'mejs.mute': 'Silenci',
|
||||
'mejs.volume-slider': 'Control deslizador de volum',
|
||||
'mejs.video-player': 'Reproductor de vídeo',
|
||||
'mejs.audio-player': 'Reproductor d\'àudio',
|
||||
'mejs.captions-subtitles': 'Llegendes/Subtítols',
|
||||
'mejs.captions-chapters': 'Capítols',
|
||||
'mejs.none': 'Ningú',
|
||||
'mejs.afrikaans': 'Afrikaans',
|
||||
'mejs.albanian': 'Albanès',
|
||||
'mejs.arabic': 'Àrab',
|
||||
'mejs.belarusian': 'Bielorús',
|
||||
'mejs.bulgarian': 'Búlgar',
|
||||
'mejs.catalan': 'Català',
|
||||
'mejs.chinese': 'Xinès',
|
||||
'mejs.chinese-simplified': 'Xinès (Simplificat)',
|
||||
'mejs.chinese-traditional': 'Xinès (Tradicional)',
|
||||
'mejs.croatian': 'Croat',
|
||||
'mejs.czech': 'Txec',
|
||||
'mejs.danish': 'Danès',
|
||||
'mejs.dutch': 'Holandès',
|
||||
'mejs.english': 'Anglès',
|
||||
'mejs.estonian': 'Estonià',
|
||||
'mejs.filipino': 'Filipí',
|
||||
'mejs.finnish': 'Finlandès',
|
||||
'mejs.french': 'Francès',
|
||||
'mejs.galician': 'Gallec',
|
||||
'mejs.german': 'Alemany',
|
||||
'mejs.greek': 'Grec',
|
||||
'mejs.haitian-creole': 'Crioll haitià',
|
||||
'mejs.hebrew': 'Hebreu',
|
||||
'mejs.hindi': 'Hindi',
|
||||
'mejs.hungarian': 'Hongarès',
|
||||
'mejs.icelandic': 'Islandès',
|
||||
'mejs.indonesian': 'Indonesi',
|
||||
'mejs.irish': 'Irlandès',
|
||||
'mejs.italian': 'Italià',
|
||||
'mejs.japanese': 'Japonès',
|
||||
'mejs.korean': 'Coreà',
|
||||
'mejs.latvian': 'Letó',
|
||||
'mejs.lithuanian': 'Lituà',
|
||||
'mejs.macedonian': 'Macedoni',
|
||||
'mejs.malay': 'Malai',
|
||||
'mejs.maltese': 'Maltès',
|
||||
'mejs.norwegian': 'Noruec',
|
||||
'mejs.persian': 'Persa',
|
||||
'mejs.polish': 'Polonès',
|
||||
'mejs.portuguese': 'Portuguès',
|
||||
'mejs.romanian': 'Romanès',
|
||||
'mejs.russian': 'Rus',
|
||||
'mejs.serbian': 'Serbi',
|
||||
'mejs.slovak': 'Eslovac',
|
||||
'mejs.slovenian': 'Eslovè',
|
||||
'mejs.spanish': 'Espanyol',
|
||||
'mejs.swahili': 'Suahili',
|
||||
'mejs.swedish': 'Suec',
|
||||
'mejs.tagalog': 'Tagalog',
|
||||
'mejs.thai': 'Thai',
|
||||
'mejs.turkish': 'Turc',
|
||||
'mejs.ukrainian': 'Ucraïnès',
|
||||
'mejs.vietnamese': 'Vietnamita',
|
||||
'mejs.welsh': 'Gal·lès',
|
||||
'mejs.yiddish': 'Yiddish'
|
||||
};
|
||||
}
|
||||
})(mejs.i18n);
|
||||
@@ -1,90 +0,0 @@
|
||||
'use strict';/*!
|
||||
* This is a `i18n` language object.
|
||||
*
|
||||
* Czech
|
||||
*
|
||||
* @author
|
||||
* Jalios (Twitter: @Jalios)
|
||||
* Sascha Greuel (Twitter: @SoftCreatR)
|
||||
*
|
||||
* @see core/i18n.js
|
||||
*/
|
||||
(function (exports) {
|
||||
if (exports.cs === undefined) {
|
||||
exports.cs = {
|
||||
'mejs.plural-form': 8,
|
||||
'mejs.download-file': 'Stáhnout soubor',
|
||||
'mejs.install-flash': 'Používáte prohlížeč, který nemá Flash Player povolen nebo nainstalován. Zapněte plugin Flash Player nebo stáhněte nejnovější verzi z adresy https://get.adobe.com/flashplayer/',
|
||||
'mejs.fullscreen': 'Celá obrazovka',
|
||||
'mejs.play': 'Přehrát',
|
||||
'mejs.pause': 'Pozastavit',
|
||||
'mejs.time-slider': 'Posuvný běžec nastavení času',
|
||||
'mejs.time-help-text': 'Použijte tlačítka se šipkami doleva / doprava pro posun o jednu vteřinu, tlačítka se šipkami nahoru / dolů pro posun o deset vteřin.',
|
||||
'mejs.live-broadcast' : 'Živé vysílání',
|
||||
'mejs.volume-help-text': 'Použijte tlačítka se šipkami nahoru / dolů pro zesílení nebo zeslabení hlasitosti.',
|
||||
'mejs.unmute': 'Zapnout zvuk',
|
||||
'mejs.mute': 'Vypnout zvuk',
|
||||
'mejs.volume-slider': 'Posuvný běžec nastavení hlasitosti',
|
||||
'mejs.video-player': 'Přehrávač videa',
|
||||
'mejs.audio-player': 'Přehrávač hudby',
|
||||
'mejs.captions-subtitles': 'Titulky',
|
||||
'mejs.captions-chapters': 'Kapitoly',
|
||||
'mejs.none': 'Žádný',
|
||||
'mejs.afrikaans': 'Afrikánština',
|
||||
'mejs.albanian': 'Albánský',
|
||||
'mejs.arabic': 'Arabština',
|
||||
'mejs.belarusian': 'Běloruské',
|
||||
'mejs.bulgarian': 'Bulharský',
|
||||
'mejs.catalan': 'Katalánština',
|
||||
'mejs.chinese': 'čínština',
|
||||
'mejs.chinese-simplified': 'Zjednodušená čínština)',
|
||||
'mejs.chinese-traditional': 'Čínština (tradiční)',
|
||||
'mejs.croatian': 'Chorvatský',
|
||||
'mejs.czech': 'čeština',
|
||||
'mejs.danish': 'Dánština',
|
||||
'mejs.dutch': 'Holandský',
|
||||
'mejs.english': 'Angličtina',
|
||||
'mejs.estonian': 'Estonština',
|
||||
'mejs.filipino': 'Filipino',
|
||||
'mejs.finnish': 'Finština',
|
||||
'mejs.french': 'Francouzština',
|
||||
'mejs.galician': 'Galicijština',
|
||||
'mejs.german': 'Němec',
|
||||
'mejs.greek': 'řecký',
|
||||
'mejs.haitian-creole': 'Haitian kreolský',
|
||||
'mejs.hebrew': 'Hebrejština',
|
||||
'mejs.hindi': 'Hindština',
|
||||
'mejs.hungarian': 'Maďarský',
|
||||
'mejs.icelandic': 'Islandský',
|
||||
'mejs.indonesian': 'Indonéština',
|
||||
'mejs.irish': 'Irština',
|
||||
'mejs.italian': 'Italština',
|
||||
'mejs.japanese': 'Japonský',
|
||||
'mejs.korean': 'Korejština',
|
||||
'mejs.latvian': 'Lotyšský',
|
||||
'mejs.lithuanian': 'Lithuanian',
|
||||
'mejs.macedonian': 'Makedonština',
|
||||
'mejs.malay': 'Malay',
|
||||
'mejs.maltese': 'Maltština',
|
||||
'mejs.norwegian': 'Norština',
|
||||
'mejs.persian': 'Peršan',
|
||||
'mejs.polish': 'Polština',
|
||||
'mejs.portuguese': 'Portugalština',
|
||||
'mejs.romanian': 'Rumunština',
|
||||
'mejs.russian': 'Ruština',
|
||||
'mejs.serbian': 'Srbština',
|
||||
'mejs.slovak': 'Slovák',
|
||||
'mejs.slovenian': 'Slovinský',
|
||||
'mejs.spanish': 'španělština',
|
||||
'mejs.swahili': 'Svahilský',
|
||||
'mejs.swedish': 'švédský',
|
||||
'mejs.tagalog': 'Tagalog',
|
||||
'mejs.thai': 'Thajština',
|
||||
'mejs.turkish': 'Turečtina',
|
||||
'mejs.ukrainian': 'Ukrajinština',
|
||||
'mejs.vietnamese': 'Vietnamština',
|
||||
'mejs.welsh': 'Velština',
|
||||
'mejs.yiddish': 'Jidiš'
|
||||
};
|
||||
}
|
||||
})(mejs.i18n);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user