Compare commits
85 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
977684c4ea | ||
|
|
d75574cd84 | ||
|
|
726b806eab | ||
|
|
53c05552f3 | ||
|
|
9222292ccb | ||
|
|
47c076a77b | ||
|
|
3995f1e60f | ||
|
|
c5713fc570 | ||
|
|
2aba074c5b | ||
|
|
8101b2aa4d | ||
|
|
9eb5084390 | ||
|
|
5f52157d46 | ||
|
|
3fdaf059b9 | ||
|
|
a59f4bc10f | ||
|
|
d290d5c257 | ||
|
|
c38ae9a68f | ||
|
|
27433a5d25 | ||
|
|
1b16fc95d8 | ||
|
|
7b17c71213 | ||
|
|
109695b948 | ||
|
|
3e77adc619 | ||
|
|
a9b03b1b80 | ||
|
|
40074d31a0 | ||
|
|
460edb5519 | ||
|
|
07e1f9a6ca | ||
|
|
846bd22a79 | ||
|
|
1647b11bf4 | ||
|
|
a905eb3690 | ||
|
|
d75fad697d | ||
|
|
b7d54dd918 | ||
|
|
d82e0f5c86 | ||
|
|
9cbea2762a | ||
|
|
93ba8ea6fb | ||
|
|
795af804ba | ||
|
|
a0153f27c8 | ||
|
|
e10af224e2 | ||
|
|
a9897ef218 | ||
|
|
546dcf7fed | ||
|
|
30f39b93be | ||
|
|
fee9368d46 | ||
|
|
b9d2c50edd | ||
|
|
be70069a0a | ||
|
|
7eccdc89e7 | ||
|
|
7cdc8af10c | ||
|
|
cbfc476b43 | ||
|
|
a17fcecfda | ||
|
|
fd423f720e | ||
|
|
74314b2ddb | ||
|
|
6be40b7a13 | ||
|
|
96da852a31 | ||
|
|
6ce522414f | ||
|
|
fc475c2d71 | ||
|
|
ff0656e37c | ||
|
|
8575d4e180 | ||
|
|
aef4b48187 | ||
|
|
940c2238ec | ||
|
|
ec08f02aa4 | ||
|
|
471cb97374 | ||
|
|
e875520cec | ||
|
|
d68bbe13cb | ||
|
|
db65c15aba | ||
|
|
dd7c2798dc | ||
|
|
3f4babe28b | ||
|
|
d32185545b | ||
|
|
dbdd48e05e | ||
|
|
2c82efe8ca | ||
|
|
c4ac9d0ade | ||
|
|
e5f6b9078e | ||
|
|
2e43bdea3e | ||
|
|
5f3b1410fd | ||
|
|
3a05029032 | ||
|
|
2d4418b905 | ||
|
|
c4809250ca | ||
|
|
56f581b195 | ||
|
|
e88ec329f7 | ||
|
|
b59b5b9ab8 | ||
|
|
93db53b77d | ||
|
|
b15040f1b2 | ||
|
|
408dae699e | ||
|
|
0d820bf585 | ||
|
|
9c577e4d04 | ||
|
|
439478f087 | ||
|
|
882ab89172 | ||
|
|
97dcac413f | ||
|
|
9398dbcbe7 |
@@ -43,6 +43,28 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
|
||||
</h2>
|
||||
|
||||
<div class="changelog point-releases">
|
||||
<h3><?php _e( 'Maintenance and Security Releases' ); ?></h3>
|
||||
<p><?php printf( __( '<strong>Version %s</strong> addressed one security issue.' ), '4.8.5' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.8.5' ); ?>
|
||||
</p>
|
||||
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 1 ), '4.8.4', number_format_i18n( 1 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.8.4' ); ?>
|
||||
</p>
|
||||
<p><?php printf( __( '<strong>Version %s</strong> addressed one security issue.' ), '4.8.3' ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.8.3' ); ?>
|
||||
</p>
|
||||
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 5 ), '4.8.2', number_format_i18n( 5 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.8.2' ); ?>
|
||||
</p>
|
||||
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed %2$s bug.',
|
||||
'<strong>Version %1$s</strong> addressed %2$s bugs.', 29 ), '4.8.1', number_format_i18n( 29 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.8.1' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="feature-section one-col">
|
||||
<div class="col">
|
||||
<h2><?php _e( 'An Update with You in Mind' ); ?></h2>
|
||||
@@ -59,11 +81,42 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<div class="col">
|
||||
<picture>
|
||||
<!-- Large image -->
|
||||
<source media="(min-width: 1050px)" srcset="https://cldup.com/-951havc3C.png" />
|
||||
<source media="( min-width: 1050px )"
|
||||
srcset="
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-widescreen_w_810.png 810w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-widescreen_w_1054.png 1054w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-widescreen_w_1266.png 1266w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-widescreen_w_1458.png 1458w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-widescreen_w_1633.png 1633w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-widescreen_w_1797.png 1797w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-widescreen_w_1955.png 1955w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-widescreen_w_2100.png 2100w"
|
||||
sizes="( max-width: 1290px ) calc( 100vw - 240px ), 1050px" />
|
||||
<!-- Medium image -->
|
||||
<source media="(min-width: 601px)" srcset="https://cldup.com/60ktdYzv0l.png" />
|
||||
<source media="( min-width: 601px )"
|
||||
srcset="
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four_w_531.png 531w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four_w_745.png 745w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four_w_927.png 927w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four_w_1089.png 1089w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four_w_1236.png 1236w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four_w_1370.png 1370w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four_w_1498.png 1498w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four_w_1620.png 1620w"
|
||||
sizes="( max-width: 782px ) calc( 100vw - 70px ), ( max-width: 960px ) calc( 100vw - 116px ), calc( 100vw - 240px )" />
|
||||
<!-- Small image -->
|
||||
<img src="https://cldup.com/mwvU0Zi5wW.png" alt="" />
|
||||
<img src="https://s.w.org/images/core/4.8/widgets-with-all-four-mobile_w_685.png"
|
||||
srcset="
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-mobile_w_300.png 300w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-mobile_w_451.png 451w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-mobile_w_575.png 575w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-mobile_w_685.png 685w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-mobile_w_784.png 784w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-mobile_w_873.png 873w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-mobile_w_959.png 959w,
|
||||
https://s.w.org/images/core/4.8/widgets-with-all-four-mobile_w_1040.png 1040w"
|
||||
sizes="( max-width: 500px ) calc( 100vw - 40px ), calc( 100vw - 70px )"
|
||||
alt="" />
|
||||
</picture>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,7 +124,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<div class="feature-section two-col">
|
||||
<div class="col">
|
||||
<h3><?php _e( 'Image Widget' ); ?></h3>
|
||||
<p><?php _e( 'Adding an image to a widget is now a simple task that is achievable for any WordPress user without needing to know code. Simply insert your image right within the widget settings. Try adding something like a headshot or a photo of your latest weekend adventure — and see it appear automatically.' );?></p>
|
||||
<p><?php _e( 'Adding an image to a widget is now a simple task that is achievable for any WordPress user without needing to know code. Simply insert your image right within the widget settings. Try adding something like a headshot or a photo of your latest weekend adventure — and see it appear automatically.' ); ?></p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3><?php _e( 'Video Widget' ); ?></h3>
|
||||
@@ -97,8 +150,8 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<div class="col">
|
||||
<?php
|
||||
echo wp_video_shortcode( array(
|
||||
'mp4' => 'https://cldup.com/LHwC1lL_jC.mp4',
|
||||
'poster' => 'https://cldup.com/wx7uMMXJor.png',
|
||||
'mp4' => 'https://s.w.org/images/core/4.8/link-boundaries.mp4',
|
||||
'poster' => 'https://s.w.org/images/core/4.8/link-boundaries.png',
|
||||
'width' => 1140,
|
||||
'height' => 624,
|
||||
// 'class' => 'wp-video-shortcode feature-video',
|
||||
@@ -120,7 +173,23 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
<p><?php _e( 'Being part of the community can help you improve your WordPress skills and network with people you wouldn’t otherwise meet. Now you can easily find your local events just by logging in to your dashboard and looking at the new Events and News dashboard widget.' ); ?>
|
||||
</div>
|
||||
<div class="col">
|
||||
<img src="https://cldup.com/GuISab3_X1.png" alt="" />
|
||||
<img
|
||||
src="https://s.w.org/images/core/4.8/events-widget_w_732.png"
|
||||
srcset="
|
||||
https://s.w.org/images/core/4.8/events-widget_w_280.png 280w,
|
||||
https://s.w.org/images/core/4.8/events-widget_w_420.png 420w,
|
||||
https://s.w.org/images/core/4.8/events-widget_w_529.png 529w,
|
||||
https://s.w.org/images/core/4.8/events-widget_w_638.png 638w,
|
||||
https://s.w.org/images/core/4.8/events-widget_w_732.png 732w,
|
||||
https://s.w.org/images/core/4.8/events-widget_w_827.png 827w,
|
||||
https://s.w.org/images/core/4.8/events-widget_w_992.png 992w"
|
||||
sizes="
|
||||
( max-width: 500px ) calc( 100vw - 40px ),
|
||||
( max-width: 782px ) calc( 48vw - 33px ),
|
||||
( max-width: 960px ) calc( 47vw - 54px ),
|
||||
( max-width: 1290px ) calc( 47vw - 112px ),
|
||||
496px"
|
||||
alt="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
vertical-align: middle;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.about-wrap .jetpack-video-wrapper {
|
||||
@@ -164,9 +163,21 @@
|
||||
.about-wrap [class$="-col"] {
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
-webkit-justify-content: space-between;
|
||||
-moz-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-moz-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-flex-wrap: wrap;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@@ -178,6 +189,8 @@
|
||||
.about-wrap [class$="-col"] .col {
|
||||
-webkit-flex: 1;
|
||||
-ms-flex: 1;
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@@ -187,6 +200,8 @@
|
||||
}
|
||||
|
||||
.about-wrap .three-col .col {
|
||||
-webkit-align-self: flex-start;
|
||||
-ms-flex-item-align: start;
|
||||
align-self: flex-start;
|
||||
min-width: 31%;
|
||||
max-width: 31%;
|
||||
@@ -294,10 +309,6 @@
|
||||
padding-top: 35px;
|
||||
}
|
||||
|
||||
.about-wrap .headline-feature img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.about-wrap .feature-section .media-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
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
@@ -40,7 +40,6 @@
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
vertical-align: middle;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.about-wrap .jetpack-video-wrapper {
|
||||
@@ -164,9 +163,21 @@
|
||||
.about-wrap [class$="-col"] {
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
-webkit-justify-content: space-between;
|
||||
-moz-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-moz-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-flex-wrap: wrap;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@@ -178,6 +189,8 @@
|
||||
.about-wrap [class$="-col"] .col {
|
||||
-webkit-flex: 1;
|
||||
-ms-flex: 1;
|
||||
-webkit-box-flex: 1;
|
||||
-moz-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@@ -187,6 +200,8 @@
|
||||
}
|
||||
|
||||
.about-wrap .three-col .col {
|
||||
-webkit-align-self: flex-start;
|
||||
-ms-flex-item-align: start;
|
||||
align-self: flex-start;
|
||||
min-width: 31%;
|
||||
max-width: 31%;
|
||||
@@ -294,10 +309,6 @@
|
||||
padding-top: 35px;
|
||||
}
|
||||
|
||||
.about-wrap .headline-feature img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.about-wrap .feature-section .media-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
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
@@ -334,7 +334,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;
|
||||
}
|
||||
@@ -1311,7 +1311,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;
|
||||
-webkit-background-size: 11px 11px;
|
||||
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
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
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
@@ -1644,6 +1644,8 @@ body.full-overlay-active {
|
||||
min-width: 299px;
|
||||
max-width: 599px;
|
||||
width: 18%;
|
||||
width: -webkit-calc( 18% - 1px );
|
||||
width: calc( 18% - 1px );
|
||||
height: 45px;
|
||||
border-top: 1px solid #ddd;
|
||||
background: #eee;
|
||||
|
||||
2
wp-admin/css/themes-rtl.min.css
vendored
2
wp-admin/css/themes-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1644,6 +1644,8 @@ body.full-overlay-active {
|
||||
min-width: 299px;
|
||||
max-width: 599px;
|
||||
width: 18%;
|
||||
width: -webkit-calc( 18% - 1px );
|
||||
width: calc( 18% - 1px );
|
||||
height: 45px;
|
||||
border-top: 1px solid #ddd;
|
||||
background: #eee;
|
||||
|
||||
2
wp-admin/css/themes.min.css
vendored
2
wp-admin/css/themes.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -619,6 +619,29 @@ div#widgets-right .widget-top:hover,
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
/* =Specific widget styling
|
||||
-------------------------------------------------------------- */
|
||||
.text-widget-fields {
|
||||
position: relative;
|
||||
}
|
||||
.text-widget-fields [hidden] {
|
||||
display: none;
|
||||
}
|
||||
.text-widget-fields .wp-pointer.wp-pointer-top {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
top: 100px;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
.text-widget-fields .wp-pointer .wp-pointer-arrow {
|
||||
right: auto;
|
||||
left: 15px;
|
||||
}
|
||||
.text-widget-fields .wp-pointer .wp-pointer-buttons {
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
/* =Media Queries
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
|
||||
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
@@ -619,6 +619,29 @@ div#widgets-right .widget-top:hover,
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
/* =Specific widget styling
|
||||
-------------------------------------------------------------- */
|
||||
.text-widget-fields {
|
||||
position: relative;
|
||||
}
|
||||
.text-widget-fields [hidden] {
|
||||
display: none;
|
||||
}
|
||||
.text-widget-fields .wp-pointer.wp-pointer-top {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
top: 100px;
|
||||
right: 10px;
|
||||
left: 10px;
|
||||
}
|
||||
.text-widget-fields .wp-pointer .wp-pointer-arrow {
|
||||
left: auto;
|
||||
right: 15px;
|
||||
}
|
||||
.text-widget-fields .wp-pointer .wp-pointer-buttons {
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
/* =Media Queries
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
|
||||
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
@@ -74,7 +74,7 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
|
||||
<div id="message" class="updated">
|
||||
<p><strong><?php echo $message; ?></strong></p>
|
||||
<?php if ( $wp_http_referer ) { ?>
|
||||
<p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php
|
||||
<p><a href="<?php echo esc_url( wp_validate_redirect( esc_url_raw( $wp_http_referer ), admin_url( 'term.php?taxonomy=' . $taxonomy ) ) ); ?>"><?php
|
||||
/* translators: %s: taxonomy name */
|
||||
printf( _x( '← Back to %s', 'admin screen' ), $tax->labels->name );
|
||||
?></a></p>
|
||||
|
||||
@@ -319,6 +319,11 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||
*/
|
||||
protected function extra_tablenav( $which ) {
|
||||
global $comment_status, $comment_type;
|
||||
static $has_items;
|
||||
|
||||
if ( ! isset( $has_items ) ) {
|
||||
$has_items = $this->has_items();
|
||||
}
|
||||
?>
|
||||
<div class="alignleft actions">
|
||||
<?php
|
||||
@@ -354,7 +359,7 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
||||
}
|
||||
|
||||
if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) && $this->has_items() ) {
|
||||
if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) && $has_items ) {
|
||||
wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
|
||||
$title = ( 'spam' === $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
|
||||
submit_button( $title, 'apply', 'delete_all', false );
|
||||
|
||||
@@ -601,16 +601,16 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
if ( $is_active ) {
|
||||
if ( current_user_can( 'manage_network_plugins' ) ) {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Network Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Deactivate' ) . '</a>';
|
||||
$actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Network Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Deactivate' ) . '</a>';
|
||||
}
|
||||
} else {
|
||||
if ( current_user_can( 'manage_network_plugins' ) ) {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Network Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Activate' ) . '</a>';
|
||||
$actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Network Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Activate' ) . '</a>';
|
||||
}
|
||||
if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
|
||||
$actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -624,14 +624,14 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
);
|
||||
} elseif ( $is_active ) {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Deactivate' ) . '</a>';
|
||||
$actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Deactivate' ) . '</a>';
|
||||
} else {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Activate' ) . '</a>';
|
||||
$actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Activate' ) . '</a>';
|
||||
|
||||
if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
|
||||
$actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
|
||||
}
|
||||
} // end if $is_active
|
||||
|
||||
@@ -639,7 +639,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
|
||||
if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can( 'edit_plugins' ) && is_writable( WP_PLUGIN_DIR . '/' . $plugin_file ) ) {
|
||||
/* translators: %s: plugin name */
|
||||
$actions['edit'] = '<a href="plugin-editor.php?file=' . $plugin_file . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Edit %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Edit' ) . '</a>';
|
||||
$actions['edit'] = '<a href="plugin-editor.php?file=' . urlencode( $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Edit %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Edit' ) . '</a>';
|
||||
}
|
||||
} // end if $context
|
||||
|
||||
|
||||
@@ -647,6 +647,10 @@ function _unzip_file_ziparchive($file, $to, $needed_dirs = array() ) {
|
||||
if ( '__MACOSX/' === substr($info['name'], 0, 9) ) // Skip the OS X-created __MACOSX directory
|
||||
continue;
|
||||
|
||||
if ( 0 !== validate_file( $info['name'] ) ) {
|
||||
return new WP_Error( 'invalid_file_ziparchive', __( 'Could not extract file from archive.' ), $info['name'] );
|
||||
}
|
||||
|
||||
$uncompressed_size += $info['size'];
|
||||
|
||||
if ( '/' === substr( $info['name'], -1 ) ) {
|
||||
@@ -807,6 +811,10 @@ function _unzip_file_pclzip($file, $to, $needed_dirs = array()) {
|
||||
if ( '__MACOSX/' === substr($file['filename'], 0, 9) ) // Don't extract the OS X-created __MACOSX directory files
|
||||
continue;
|
||||
|
||||
if ( 0 !== validate_file( $file['filename'] ) ) {
|
||||
return new WP_Error( 'invalid_file_pclzip', __( 'Could not extract file from archive.' ), $file['filename'] );
|
||||
}
|
||||
|
||||
if ( ! $wp_filesystem->put_contents( $to . $file['filename'], $file['content'], FS_CHMOD_FILE) )
|
||||
return new WP_Error( 'copy_failed_pclzip', __( 'Could not copy file.' ), $file['filename'] );
|
||||
}
|
||||
|
||||
@@ -100,8 +100,8 @@ jQuery(document).ready(function() {
|
||||
return;
|
||||
jQuery('#permalink_structure').val( this.value );
|
||||
});
|
||||
jQuery('#permalink_structure').focus(function() {
|
||||
jQuery("#custom_selection").attr('checked', 'checked');
|
||||
jQuery( '#permalink_structure' ).on( 'click input', function() {
|
||||
jQuery( '#custom_selection' ).prop( 'checked', true );
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -772,7 +772,7 @@ function page_template_dropdown( $default = '', $post_type = 'page' ) {
|
||||
ksort( $templates );
|
||||
foreach ( array_keys( $templates ) as $template ) {
|
||||
$selected = selected( $default, $templates[ $template ], false );
|
||||
echo "\n\t<option value='" . $templates[ $template ] . "' $selected>$template</option>";
|
||||
echo "\n\t<option value='" . esc_attr( $templates[ $template ] ) . "' $selected>" . esc_html( $template ) . "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -706,11 +706,15 @@ $_old_files = array(
|
||||
// 4.6
|
||||
'wp-admin/includes/class-wp-automatic-upgrader.php', // Wrong file name, see #37628.
|
||||
// 4.8
|
||||
'wp-includes/js/tinymce/plugins/wpembed',
|
||||
'wp-includes/js/tinymce/plugins/media/moxieplayer.swf',
|
||||
'wp-includes/js/tinymce/skins/lightgray/fonts/readme.md',
|
||||
'wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.json',
|
||||
'wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.json',
|
||||
'wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css',
|
||||
// 4.9.2
|
||||
'wp-includes/js/mediaelement/flashmediaelement.swf',
|
||||
'wp-includes/js/mediaelement/silverlightmediaelement.xap',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -1086,7 +1090,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
|
||||
|
||||
@@ -279,7 +279,7 @@ if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
|
||||
*/
|
||||
$language = '';
|
||||
if ( ! empty( $_REQUEST['language'] ) ) {
|
||||
$language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
|
||||
$language = preg_replace( '/[^a-zA-Z0-9_]/', '', $_REQUEST['language'] );
|
||||
} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
|
||||
$language = $GLOBALS['wp_local_package'];
|
||||
}
|
||||
|
||||
@@ -5507,6 +5507,13 @@
|
||||
} );
|
||||
} ());
|
||||
|
||||
// Make sure TinyMCE dialogs appear above Customizer UI.
|
||||
$( document ).one( 'wp-before-tinymce-init', function() {
|
||||
if ( ! window.tinymce.ui.FloatPanel.zIndex || window.tinymce.ui.FloatPanel.zIndex < 500001 ) {
|
||||
window.tinymce.ui.FloatPanel.zIndex = 500001;
|
||||
}
|
||||
} );
|
||||
|
||||
api.trigger( 'ready' );
|
||||
});
|
||||
|
||||
|
||||
2
wp-admin/js/customize-controls.min.js
vendored
2
wp-admin/js/customize-controls.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -2229,8 +2229,7 @@
|
||||
}
|
||||
} );
|
||||
|
||||
control.container.find( '.menu-delete-item' ).on( 'click', function( event ) {
|
||||
event.stopPropagation();
|
||||
control.container.find( '.menu-delete-item .button-link-delete' ).on( 'click', function( event ) {
|
||||
event.preventDefault();
|
||||
control.setting.set( false );
|
||||
});
|
||||
|
||||
2
wp-admin/js/customize-nav-menus.min.js
vendored
2
wp-admin/js/customize-nav-menus.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -184,6 +184,12 @@ wp.mediaWidgets = ( function( $ ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If video, test for Vimeo and YouTube, otherwise, renderFail(). This should be removed once #34115 is resolved.
|
||||
if ( 'video' === this.controller.options.mimeType && ! /vimeo|youtu\.?be/.test( urlParser.host ) ) {
|
||||
embedLinkView.renderFail();
|
||||
return;
|
||||
}
|
||||
|
||||
embedLinkView.dfd = $.ajax({
|
||||
url: wp.media.view.settings.oEmbedProxyUrl,
|
||||
data: {
|
||||
@@ -429,7 +435,8 @@ wp.mediaWidgets = ( function( $ ) {
|
||||
*
|
||||
* @param {Object} options - Options.
|
||||
* @param {Backbone.Model} options.model - Model.
|
||||
* @param {jQuery} options.el - Control container element.
|
||||
* @param {jQuery} options.el - Control field container element.
|
||||
* @param {jQuery} options.syncContainer - Container element where fields are synced for the server.
|
||||
* @returns {void}
|
||||
*/
|
||||
initialize: function initialize( options ) {
|
||||
@@ -437,12 +444,19 @@ wp.mediaWidgets = ( function( $ ) {
|
||||
|
||||
Backbone.View.prototype.initialize.call( control, options );
|
||||
|
||||
if ( ! control.el ) {
|
||||
throw new Error( 'Missing options.el' );
|
||||
}
|
||||
if ( ! ( control.model instanceof component.MediaWidgetModel ) ) {
|
||||
throw new Error( 'Missing options.model' );
|
||||
}
|
||||
if ( ! options.el ) {
|
||||
throw new Error( 'Missing options.el' );
|
||||
}
|
||||
if ( ! options.syncContainer ) {
|
||||
throw new Error( 'Missing options.syncContainer' );
|
||||
}
|
||||
|
||||
control.syncContainer = options.syncContainer;
|
||||
|
||||
control.$el.addClass( 'media-widget-control' );
|
||||
|
||||
// Allow methods to be passed in with control context preserved.
|
||||
_.bindAll( control, 'syncModelToInputs', 'render', 'updateSelectedAttachment', 'renderPreview' );
|
||||
@@ -547,7 +561,7 @@ wp.mediaWidgets = ( function( $ ) {
|
||||
*/
|
||||
syncModelToInputs: function syncModelToInputs() {
|
||||
var control = this;
|
||||
control.$el.next( '.widget-content' ).find( '.media-widget-instance-property' ).each( function() {
|
||||
control.syncContainer.find( '.media-widget-instance-property' ).each( function() {
|
||||
var input = $( this ), value;
|
||||
value = control.model.get( input.data( 'property' ) );
|
||||
if ( _.isUndefined( value ) ) {
|
||||
@@ -1003,9 +1017,8 @@ wp.mediaWidgets = ( function( $ ) {
|
||||
* @returns {void}
|
||||
*/
|
||||
component.handleWidgetAdded = function handleWidgetAdded( event, widgetContainer ) {
|
||||
var widgetContent, controlContainer, widgetForm, idBase, ControlConstructor, ModelConstructor, modelAttributes, widgetControl, widgetModel, widgetId, widgetInside, animatedCheckDelay = 50, renderWhenAnimationDone;
|
||||
var fieldContainer, syncContainer, widgetForm, idBase, ControlConstructor, ModelConstructor, modelAttributes, widgetControl, widgetModel, widgetId, widgetInside, animatedCheckDelay = 50, renderWhenAnimationDone;
|
||||
widgetForm = widgetContainer.find( '> .widget-inside > .form, > .widget-inside > form' ); // Note: '.form' appears in the customizer, whereas 'form' on the widgets admin screen.
|
||||
widgetContent = widgetForm.find( '> .widget-content' );
|
||||
idBase = widgetForm.find( '> .id_base' ).val();
|
||||
widgetId = widgetForm.find( '> .widget-id' ).val();
|
||||
|
||||
@@ -1032,8 +1045,9 @@ wp.mediaWidgets = ( function( $ ) {
|
||||
* components", the JS template is rendered outside of the normal form
|
||||
* container.
|
||||
*/
|
||||
controlContainer = $( '<div class="media-widget-control"></div>' );
|
||||
widgetContent.before( controlContainer );
|
||||
fieldContainer = $( '<div></div>' );
|
||||
syncContainer = widgetContainer.find( '.widget-content:first' );
|
||||
syncContainer.before( fieldContainer );
|
||||
|
||||
/*
|
||||
* Sync the widget instance model attributes onto the hidden inputs that widgets currently use to store the state.
|
||||
@@ -1041,7 +1055,7 @@ wp.mediaWidgets = ( function( $ ) {
|
||||
* from the start, without having to sync with hidden fields. See <https://core.trac.wordpress.org/ticket/33507>.
|
||||
*/
|
||||
modelAttributes = {};
|
||||
widgetContent.find( '.media-widget-instance-property' ).each( function() {
|
||||
syncContainer.find( '.media-widget-instance-property' ).each( function() {
|
||||
var input = $( this );
|
||||
modelAttributes[ input.data( 'property' ) ] = input.val();
|
||||
});
|
||||
@@ -1050,7 +1064,8 @@ wp.mediaWidgets = ( function( $ ) {
|
||||
widgetModel = new ModelConstructor( modelAttributes );
|
||||
|
||||
widgetControl = new ControlConstructor({
|
||||
el: controlContainer,
|
||||
el: fieldContainer,
|
||||
syncContainer: syncContainer,
|
||||
model: widgetModel
|
||||
});
|
||||
|
||||
@@ -1078,6 +1093,51 @@ wp.mediaWidgets = ( function( $ ) {
|
||||
component.widgetControls[ widgetModel.get( 'widget_id' ) ] = widgetControl;
|
||||
};
|
||||
|
||||
/**
|
||||
* Setup widget in accessibility mode.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
component.setupAccessibleMode = function setupAccessibleMode() {
|
||||
var widgetForm, widgetId, idBase, widgetControl, ControlConstructor, ModelConstructor, modelAttributes, fieldContainer, syncContainer;
|
||||
widgetForm = $( '.editwidget > form' );
|
||||
if ( 0 === widgetForm.length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
idBase = widgetForm.find( '> .widget-control-actions > .id_base' ).val();
|
||||
|
||||
ControlConstructor = component.controlConstructors[ idBase ];
|
||||
if ( ! ControlConstructor ) {
|
||||
return;
|
||||
}
|
||||
|
||||
widgetId = widgetForm.find( '> .widget-control-actions > .widget-id' ).val();
|
||||
|
||||
ModelConstructor = component.modelConstructors[ idBase ] || component.MediaWidgetModel;
|
||||
fieldContainer = $( '<div></div>' );
|
||||
syncContainer = widgetForm.find( '> .widget-inside' );
|
||||
syncContainer.before( fieldContainer );
|
||||
|
||||
modelAttributes = {};
|
||||
syncContainer.find( '.media-widget-instance-property' ).each( function() {
|
||||
var input = $( this );
|
||||
modelAttributes[ input.data( 'property' ) ] = input.val();
|
||||
});
|
||||
modelAttributes.widget_id = widgetId;
|
||||
|
||||
widgetControl = new ControlConstructor({
|
||||
el: fieldContainer,
|
||||
syncContainer: syncContainer,
|
||||
model: new ModelConstructor( modelAttributes )
|
||||
});
|
||||
|
||||
component.modelCollection.add( [ widgetControl.model ] );
|
||||
component.widgetControls[ widgetControl.model.get( 'widget_id' ) ] = widgetControl;
|
||||
|
||||
widgetControl.render();
|
||||
};
|
||||
|
||||
/**
|
||||
* Sync widget instance data sanitized from server back onto widget model.
|
||||
*
|
||||
@@ -1146,6 +1206,11 @@ wp.mediaWidgets = ( function( $ ) {
|
||||
var widgetContainer = $( this );
|
||||
component.handleWidgetAdded( new jQuery.Event( 'widget-added' ), widgetContainer );
|
||||
});
|
||||
|
||||
// Accessibility mode.
|
||||
$( window ).on( 'load', function() {
|
||||
component.setupAccessibleMode();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
2
wp-admin/js/widgets/media-widgets.min.js
vendored
2
wp-admin/js/widgets/media-widgets.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -3,7 +3,9 @@
|
||||
wp.textWidgets = ( function( $ ) {
|
||||
'use strict';
|
||||
|
||||
var component = {};
|
||||
var component = {
|
||||
dismissedPointers: []
|
||||
};
|
||||
|
||||
/**
|
||||
* Text widget control.
|
||||
@@ -24,9 +26,9 @@ wp.textWidgets = ( function( $ ) {
|
||||
/**
|
||||
* Initialize.
|
||||
*
|
||||
* @param {Object} options - Options.
|
||||
* @param {Backbone.Model} options.model - Model.
|
||||
* @param {jQuery} options.el - Control container element.
|
||||
* @param {Object} options - Options.
|
||||
* @param {jQuery} options.el - Control field container element.
|
||||
* @param {jQuery} options.syncContainer - Container element where fields are synced for the server.
|
||||
* @returns {void}
|
||||
*/
|
||||
initialize: function initialize( options ) {
|
||||
@@ -35,42 +37,97 @@ wp.textWidgets = ( function( $ ) {
|
||||
if ( ! options.el ) {
|
||||
throw new Error( 'Missing options.el' );
|
||||
}
|
||||
if ( ! options.syncContainer ) {
|
||||
throw new Error( 'Missing options.syncContainer' );
|
||||
}
|
||||
|
||||
Backbone.View.prototype.initialize.call( control, options );
|
||||
control.syncContainer = options.syncContainer;
|
||||
|
||||
/*
|
||||
* Create a container element for the widget control fields.
|
||||
* This is inserted into the DOM immediately before the the .widget-content
|
||||
* element because the contents of this element are essentially "managed"
|
||||
* by PHP, where each widget update cause the entire element to be emptied
|
||||
* and replaced with the rendered output of WP_Widget::form() which is
|
||||
* sent back in Ajax request made to save/update the widget instance.
|
||||
* To prevent a "flash of replaced DOM elements and re-initialized JS
|
||||
* components", the JS template is rendered outside of the normal form
|
||||
* container.
|
||||
*/
|
||||
control.fieldContainer = $( '<div class="text-widget-fields"></div>' );
|
||||
control.fieldContainer.html( wp.template( 'widget-text-control-fields' ) );
|
||||
control.widgetContentContainer = control.$el.find( '.widget-content:first' );
|
||||
control.widgetContentContainer.before( control.fieldContainer );
|
||||
control.$el.addClass( 'text-widget-fields' );
|
||||
control.$el.html( wp.template( 'widget-text-control-fields' ) );
|
||||
|
||||
control.customHtmlWidgetPointer = control.$el.find( '.wp-pointer.custom-html-widget-pointer' );
|
||||
if ( control.customHtmlWidgetPointer.length ) {
|
||||
control.customHtmlWidgetPointer.find( '.close' ).on( 'click', function( event ) {
|
||||
event.preventDefault();
|
||||
control.customHtmlWidgetPointer.hide();
|
||||
$( '#' + control.fields.text.attr( 'id' ) + '-html' ).focus();
|
||||
control.dismissPointers( [ 'text_widget_custom_html' ] );
|
||||
});
|
||||
control.customHtmlWidgetPointer.find( '.add-widget' ).on( 'click', function( event ) {
|
||||
event.preventDefault();
|
||||
control.customHtmlWidgetPointer.hide();
|
||||
control.openAvailableWidgetsPanel();
|
||||
});
|
||||
}
|
||||
|
||||
control.pasteHtmlPointer = control.$el.find( '.wp-pointer.paste-html-pointer' );
|
||||
if ( control.pasteHtmlPointer.length ) {
|
||||
control.pasteHtmlPointer.find( '.close' ).on( 'click', function( event ) {
|
||||
event.preventDefault();
|
||||
control.pasteHtmlPointer.hide();
|
||||
control.editor.focus();
|
||||
control.dismissPointers( [ 'text_widget_custom_html', 'text_widget_paste_html' ] );
|
||||
});
|
||||
}
|
||||
|
||||
control.fields = {
|
||||
title: control.fieldContainer.find( '.title' ),
|
||||
text: control.fieldContainer.find( '.text' )
|
||||
title: control.$el.find( '.title' ),
|
||||
text: control.$el.find( '.text' )
|
||||
};
|
||||
|
||||
// Sync input fields to hidden sync fields which actually get sent to the server.
|
||||
_.each( control.fields, function( fieldInput, fieldName ) {
|
||||
fieldInput.on( 'input change', function updateSyncField() {
|
||||
var syncInput = control.widgetContentContainer.find( 'input[type=hidden].' + fieldName );
|
||||
if ( syncInput.val() !== $( this ).val() ) {
|
||||
syncInput.val( $( this ).val() );
|
||||
var syncInput = control.syncContainer.find( '.sync-input.' + fieldName );
|
||||
if ( syncInput.val() !== fieldInput.val() ) {
|
||||
syncInput.val( fieldInput.val() );
|
||||
syncInput.trigger( 'change' );
|
||||
}
|
||||
});
|
||||
|
||||
// Note that syncInput cannot be re-used because it will be destroyed with each widget-updated event.
|
||||
fieldInput.val( control.widgetContentContainer.find( 'input[type=hidden].' + fieldName ).val() );
|
||||
fieldInput.val( control.syncContainer.find( '.sync-input.' + fieldName ).val() );
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Dismiss pointers for Custom HTML widget.
|
||||
*
|
||||
* @since 4.8.1
|
||||
*
|
||||
* @param {Array} pointers Pointer IDs to dismiss.
|
||||
* @returns {void}
|
||||
*/
|
||||
dismissPointers: function dismissPointers( pointers ) {
|
||||
_.each( pointers, function( pointer ) {
|
||||
wp.ajax.post( 'dismiss-wp-pointer', {
|
||||
pointer: pointer
|
||||
});
|
||||
component.dismissedPointers.push( pointer );
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Open available widgets panel.
|
||||
*
|
||||
* @since 4.8.1
|
||||
* @returns {void}
|
||||
*/
|
||||
openAvailableWidgetsPanel: function openAvailableWidgetsPanel() {
|
||||
var sidebarControl;
|
||||
wp.customize.section.each( function( section ) {
|
||||
if ( section.extended( wp.customize.Widgets.SidebarSection ) && section.expanded() ) {
|
||||
sidebarControl = wp.customize.control( 'sidebars_widgets[' + section.params.sidebarId + ']' );
|
||||
}
|
||||
});
|
||||
if ( ! sidebarControl ) {
|
||||
return;
|
||||
}
|
||||
setTimeout( function() { // Timeout to prevent click event from causing panel to immediately collapse.
|
||||
wp.customize.Widgets.availableWidgetsPanel.open( sidebarControl );
|
||||
wp.customize.Widgets.availableWidgetsPanel.$search.val( 'HTML' ).trigger( 'keyup' );
|
||||
});
|
||||
},
|
||||
|
||||
@@ -87,11 +144,11 @@ wp.textWidgets = ( function( $ ) {
|
||||
var control = this, syncInput;
|
||||
|
||||
if ( ! control.fields.title.is( document.activeElement ) ) {
|
||||
syncInput = control.widgetContentContainer.find( 'input[type=hidden].title' );
|
||||
syncInput = control.syncContainer.find( '.sync-input.title' );
|
||||
control.fields.title.val( syncInput.val() );
|
||||
}
|
||||
|
||||
syncInput = control.widgetContentContainer.find( 'input[type=hidden].text' );
|
||||
syncInput = control.syncContainer.find( '.sync-input.text' );
|
||||
if ( control.fields.text.is( ':visible' ) ) {
|
||||
if ( ! control.fields.text.is( document.activeElement ) ) {
|
||||
control.fields.text.val( syncInput.val() );
|
||||
@@ -107,23 +164,77 @@ wp.textWidgets = ( function( $ ) {
|
||||
* @returns {void}
|
||||
*/
|
||||
initializeEditor: function initializeEditor() {
|
||||
var control = this, changeDebounceDelay = 1000, id, textarea, restoreTextMode = false;
|
||||
var control = this, changeDebounceDelay = 1000, id, textarea, triggerChangeIfDirty, restoreTextMode = false, needsTextareaChangeTrigger = false;
|
||||
textarea = control.fields.text;
|
||||
id = textarea.attr( 'id' );
|
||||
|
||||
/**
|
||||
* Trigger change if dirty.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
triggerChangeIfDirty = function() {
|
||||
var updateWidgetBuffer = 300; // See wp.customize.Widgets.WidgetControl._setupUpdateUI() which uses 250ms for updateWidgetDebounced.
|
||||
if ( control.editor.isDirty() ) {
|
||||
|
||||
/*
|
||||
* Account for race condition in customizer where user clicks Save & Publish while
|
||||
* focus was just previously given to to the editor. Since updates to the editor
|
||||
* are debounced at 1 second and since widget input changes are only synced to
|
||||
* settings after 250ms, the customizer needs to be put into the processing
|
||||
* state during the time between the change event is triggered and updateWidget
|
||||
* logic starts. Note that the debounced update-widget request should be able
|
||||
* to be removed with the removal of the update-widget request entirely once
|
||||
* widgets are able to mutate their own instance props directly in JS without
|
||||
* having to make server round-trips to call the respective WP_Widget::update()
|
||||
* callbacks. See <https://core.trac.wordpress.org/ticket/33507>.
|
||||
*/
|
||||
if ( wp.customize && wp.customize.state ) {
|
||||
wp.customize.state( 'processing' ).set( wp.customize.state( 'processing' ).get() + 1 );
|
||||
_.delay( function() {
|
||||
wp.customize.state( 'processing' ).set( wp.customize.state( 'processing' ).get() - 1 );
|
||||
}, updateWidgetBuffer );
|
||||
}
|
||||
|
||||
if ( ! control.editor.isHidden() ) {
|
||||
control.editor.save();
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger change on textarea when it is dirty for sake of widgets in the Customizer needing to sync form inputs to setting models.
|
||||
if ( needsTextareaChangeTrigger ) {
|
||||
textarea.trigger( 'change' );
|
||||
needsTextareaChangeTrigger = false;
|
||||
}
|
||||
};
|
||||
|
||||
// Just-in-time force-update the hidden input fields.
|
||||
control.syncContainer.closest( '.widget' ).find( '[name=savewidget]:first' ).on( 'click', function onClickSaveButton() {
|
||||
triggerChangeIfDirty();
|
||||
});
|
||||
|
||||
/**
|
||||
* Build (or re-build) the visual editor.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function buildEditor() {
|
||||
var editor, triggerChangeIfDirty, onInit;
|
||||
var editor, onInit, showPointerElement;
|
||||
|
||||
// Abort building if the textarea is gone, likely due to the widget having been deleted entirely.
|
||||
if ( ! document.getElementById( id ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The user has disabled TinyMCE.
|
||||
if ( typeof window.tinymce === 'undefined' ) {
|
||||
wp.editor.initialize( id, {
|
||||
quicktags: true
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Destroy any existing editor so that it can be re-initialized after a widget-updated event.
|
||||
if ( tinymce.get( id ) ) {
|
||||
restoreTextMode = tinymce.get( id ).isHidden();
|
||||
@@ -137,6 +248,20 @@ wp.textWidgets = ( function( $ ) {
|
||||
quicktags: true
|
||||
});
|
||||
|
||||
/**
|
||||
* Show a pointer, focus on dismiss, and speak the contents for a11y.
|
||||
*
|
||||
* @param {jQuery} pointerElement Pointer element.
|
||||
* @returns {void}
|
||||
*/
|
||||
showPointerElement = function( pointerElement ) {
|
||||
pointerElement.show();
|
||||
pointerElement.find( '.close' ).focus();
|
||||
wp.a11y.speak( pointerElement.find( 'h3, p' ).map( function() {
|
||||
return $( this ).text();
|
||||
} ).get().join( '\n\n' ) );
|
||||
};
|
||||
|
||||
editor = window.tinymce.get( id );
|
||||
if ( ! editor ) {
|
||||
throw new Error( 'Failed to initialize editor' );
|
||||
@@ -150,8 +275,36 @@ wp.textWidgets = ( function( $ ) {
|
||||
|
||||
// If a prior mce instance was replaced, and it was in text mode, toggle to text mode.
|
||||
if ( restoreTextMode ) {
|
||||
switchEditors.go( id, 'toggle' );
|
||||
switchEditors.go( id, 'html' );
|
||||
}
|
||||
|
||||
// Show the pointer.
|
||||
$( '#' + id + '-html' ).on( 'click', function() {
|
||||
control.pasteHtmlPointer.hide(); // Hide the HTML pasting pointer.
|
||||
|
||||
if ( -1 !== component.dismissedPointers.indexOf( 'text_widget_custom_html' ) ) {
|
||||
return;
|
||||
}
|
||||
showPointerElement( control.customHtmlWidgetPointer );
|
||||
});
|
||||
|
||||
// Hide the pointer when switching tabs.
|
||||
$( '#' + id + '-tmce' ).on( 'click', function() {
|
||||
control.customHtmlWidgetPointer.hide();
|
||||
});
|
||||
|
||||
// Show pointer when pasting HTML.
|
||||
editor.on( 'pastepreprocess', function( event ) {
|
||||
var content = event.content;
|
||||
if ( -1 !== component.dismissedPointers.indexOf( 'text_widget_paste_html' ) || ! content || ! /<\w+.*?>/.test( content ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Show the pointer after a slight delay so the user sees what they pasted.
|
||||
_.delay( function() {
|
||||
showPointerElement( control.pasteHtmlPointer );
|
||||
}, 250 );
|
||||
});
|
||||
};
|
||||
|
||||
if ( editor.initialized ) {
|
||||
@@ -161,38 +314,19 @@ wp.textWidgets = ( function( $ ) {
|
||||
}
|
||||
|
||||
control.editorFocused = false;
|
||||
triggerChangeIfDirty = function() {
|
||||
var updateWidgetBuffer = 300; // See wp.customize.Widgets.WidgetControl._setupUpdateUI() which uses 250ms for updateWidgetDebounced.
|
||||
if ( editor.isDirty() ) {
|
||||
|
||||
/*
|
||||
* Account for race condition in customizer where user clicks Save & Publish while
|
||||
* focus was just previously given to to the editor. Since updates to the editor
|
||||
* are debounced at 1 second and since widget input changes are only synced to
|
||||
* settings after 250ms, the customizer needs to be put into the processing
|
||||
* state during the time between the change event is triggered and updateWidget
|
||||
* logic starts. Note that the debounced update-widget request should be able
|
||||
* to be removed with the removal of the update-widget request entirely once
|
||||
* widgets are able to mutate their own instance props directly in JS without
|
||||
* having to make server round-trips to call the respective WP_Widget::update()
|
||||
* callbacks. See <https://core.trac.wordpress.org/ticket/33507>.
|
||||
*/
|
||||
if ( wp.customize ) {
|
||||
wp.customize.state( 'processing' ).set( wp.customize.state( 'processing' ).get() + 1 );
|
||||
_.delay( function() {
|
||||
wp.customize.state( 'processing' ).set( wp.customize.state( 'processing' ).get() - 1 );
|
||||
}, updateWidgetBuffer );
|
||||
}
|
||||
|
||||
editor.save();
|
||||
textarea.trigger( 'change' );
|
||||
}
|
||||
};
|
||||
editor.on( 'focus', function() {
|
||||
editor.on( 'focus', function onEditorFocus() {
|
||||
control.editorFocused = true;
|
||||
});
|
||||
editor.on( 'paste', function onEditorPaste() {
|
||||
editor.setDirty( true ); // Because pasting doesn't currently set the dirty state.
|
||||
triggerChangeIfDirty();
|
||||
});
|
||||
editor.on( 'NodeChange', function onNodeChange() {
|
||||
needsTextareaChangeTrigger = true;
|
||||
});
|
||||
editor.on( 'NodeChange', _.debounce( triggerChangeIfDirty, changeDebounceDelay ) );
|
||||
editor.on( 'blur', function() {
|
||||
editor.on( 'blur hide', function onEditorBlur() {
|
||||
control.editorFocused = false;
|
||||
triggerChangeIfDirty();
|
||||
});
|
||||
@@ -219,7 +353,7 @@ wp.textWidgets = ( function( $ ) {
|
||||
* @returns {void}
|
||||
*/
|
||||
component.handleWidgetAdded = function handleWidgetAdded( event, widgetContainer ) {
|
||||
var widgetForm, idBase, widgetControl, widgetId, animatedCheckDelay = 50, widgetInside, renderWhenAnimationDone;
|
||||
var widgetForm, idBase, widgetControl, widgetId, animatedCheckDelay = 50, widgetInside, renderWhenAnimationDone, fieldContainer, syncContainer;
|
||||
widgetForm = widgetContainer.find( '> .widget-inside > .form, > .widget-inside > form' ); // Note: '.form' appears in the customizer, whereas 'form' on the widgets admin screen.
|
||||
|
||||
idBase = widgetForm.find( '> .id_base' ).val();
|
||||
@@ -228,13 +362,34 @@ wp.textWidgets = ( function( $ ) {
|
||||
}
|
||||
|
||||
// Prevent initializing already-added widgets.
|
||||
widgetId = widgetForm.find( '> .widget-id' ).val();
|
||||
widgetId = widgetForm.find( '.widget-id' ).val();
|
||||
if ( component.widgetControls[ widgetId ] ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Bypass using TinyMCE when widget is in legacy mode.
|
||||
if ( ! widgetForm.find( '.visual' ).val() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a container element for the widget control fields.
|
||||
* This is inserted into the DOM immediately before the the .widget-content
|
||||
* element because the contents of this element are essentially "managed"
|
||||
* by PHP, where each widget update cause the entire element to be emptied
|
||||
* and replaced with the rendered output of WP_Widget::form() which is
|
||||
* sent back in Ajax request made to save/update the widget instance.
|
||||
* To prevent a "flash of replaced DOM elements and re-initialized JS
|
||||
* components", the JS template is rendered outside of the normal form
|
||||
* container.
|
||||
*/
|
||||
fieldContainer = $( '<div></div>' );
|
||||
syncContainer = widgetContainer.find( '.widget-content:first' );
|
||||
syncContainer.before( fieldContainer );
|
||||
|
||||
widgetControl = new component.TextWidgetControl({
|
||||
el: widgetContainer
|
||||
el: fieldContainer,
|
||||
syncContainer: syncContainer
|
||||
});
|
||||
|
||||
component.widgetControls[ widgetId ] = widgetControl;
|
||||
@@ -256,6 +411,40 @@ wp.textWidgets = ( function( $ ) {
|
||||
renderWhenAnimationDone();
|
||||
};
|
||||
|
||||
/**
|
||||
* Setup widget in accessibility mode.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
component.setupAccessibleMode = function setupAccessibleMode() {
|
||||
var widgetForm, idBase, widgetControl, fieldContainer, syncContainer;
|
||||
widgetForm = $( '.editwidget > form' );
|
||||
if ( 0 === widgetForm.length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
idBase = widgetForm.find( '> .widget-control-actions > .id_base' ).val();
|
||||
if ( 'text' !== idBase ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Bypass using TinyMCE when widget is in legacy mode.
|
||||
if ( ! widgetForm.find( '.visual' ).val() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
fieldContainer = $( '<div></div>' );
|
||||
syncContainer = widgetForm.find( '> .widget-inside' );
|
||||
syncContainer.before( fieldContainer );
|
||||
|
||||
widgetControl = new component.TextWidgetControl({
|
||||
el: fieldContainer,
|
||||
syncContainer: syncContainer
|
||||
});
|
||||
|
||||
widgetControl.initializeEditor();
|
||||
};
|
||||
|
||||
/**
|
||||
* Sync widget instance data sanitized from server back onto widget model.
|
||||
*
|
||||
@@ -319,6 +508,11 @@ wp.textWidgets = ( function( $ ) {
|
||||
var widgetContainer = $( this );
|
||||
component.handleWidgetAdded( new jQuery.Event( 'widget-added' ), widgetContainer );
|
||||
});
|
||||
|
||||
// Accessibility mode.
|
||||
$( window ).on( 'load', function() {
|
||||
component.setupAccessibleMode();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
2
wp-admin/js/widgets/text-widgets.min.js
vendored
2
wp-admin/js/widgets/text-widgets.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -37,11 +37,11 @@ if ( empty( $plugins ) ) {
|
||||
$file = '';
|
||||
$plugin = '';
|
||||
if ( isset( $_REQUEST['file'] ) ) {
|
||||
$file = sanitize_text_field( $_REQUEST['file'] );
|
||||
$file = wp_unslash( $_REQUEST['file'] );
|
||||
}
|
||||
|
||||
if ( isset( $_REQUEST['plugin'] ) ) {
|
||||
$plugin = sanitize_text_field( $_REQUEST['plugin'] );
|
||||
$plugin = wp_unslash( $_REQUEST['plugin'] );
|
||||
}
|
||||
|
||||
if ( empty( $plugin ) ) {
|
||||
@@ -107,10 +107,10 @@ if ( isset( $_REQUEST['action'] ) && 'update' === $_REQUEST['action'] ) {
|
||||
}
|
||||
|
||||
if ( ( ! empty( $_GET['networkwide'] ) && ! is_plugin_active_for_network( $file ) ) || ! is_plugin_active( $file ) ) {
|
||||
activate_plugin( $plugin, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) );
|
||||
activate_plugin( $plugin, "plugin-editor.php?file=" . urlencode( $file ) . "&phperror=1", ! empty( $_GET['networkwide'] ) );
|
||||
} // we'll override this later if the plugin can be included without fatal error
|
||||
|
||||
wp_redirect( self_admin_url("plugin-editor.php?file=$file&plugin=$plugin&a=te&scrollto=$scrollto") );
|
||||
wp_redirect( self_admin_url( 'plugin-editor.php?file=' . urlencode( $file ) . '&plugin=' . urlencode( $plugin ) . "&a=te&scrollto=$scrollto" ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -203,18 +203,18 @@ if ( isset( $_REQUEST['action'] ) && 'update' === $_REQUEST['action'] ) {
|
||||
if ( is_plugin_active( $plugin ) ) {
|
||||
if ( is_writeable( $real_file ) ) {
|
||||
/* translators: %s: plugin file name */
|
||||
echo sprintf( __( 'Editing %s (active)' ), '<strong>' . $file . '</strong>' );
|
||||
echo sprintf( __( 'Editing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
} else {
|
||||
/* translators: %s: plugin file name */
|
||||
echo sprintf( __( 'Browsing %s (active)' ), '<strong>' . $file . '</strong>' );
|
||||
echo sprintf( __( 'Browsing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
}
|
||||
} else {
|
||||
if ( is_writeable( $real_file ) ) {
|
||||
/* translators: %s: plugin file name */
|
||||
echo sprintf( __( 'Editing %s (inactive)' ), '<strong>' . $file . '</strong>' );
|
||||
echo sprintf( __( 'Editing %s (inactive)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
} else {
|
||||
/* translators: %s: plugin file name */
|
||||
echo sprintf( __( 'Browsing %s (inactive)' ), '<strong>' . $file . '</strong>' );
|
||||
echo sprintf( __( 'Browsing %s (inactive)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
}
|
||||
}
|
||||
?></big>
|
||||
@@ -259,7 +259,7 @@ foreach ( $plugin_files as $plugin_file ) :
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo urlencode( $plugin_file ) ?>&plugin=<?php echo urlencode( $plugin ) ?>"><?php echo $plugin_file ?></a></li>
|
||||
<li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo urlencode( $plugin_file ) ?>&plugin=<?php echo urlencode( $plugin ) ?>"><?php echo esc_html( $plugin_file ); ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@ $pagenum = $wp_list_table->get_pagenum();
|
||||
|
||||
$action = $wp_list_table->current_action();
|
||||
|
||||
$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
|
||||
$plugin = isset($_REQUEST['plugin']) ? wp_unslash( $_REQUEST['plugin'] ) : '';
|
||||
$s = isset($_REQUEST['s']) ? urlencode( wp_unslash( $_REQUEST['s'] ) ) : '';
|
||||
|
||||
// Clean up request URI from temporary args for screen options/paging uri's to work as expected.
|
||||
@@ -39,10 +39,10 @@ if ( $action ) {
|
||||
|
||||
check_admin_referer('activate-plugin_' . $plugin);
|
||||
|
||||
$result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . $plugin), is_network_admin() );
|
||||
$result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . urlencode( $plugin ) ), is_network_admin() );
|
||||
if ( is_wp_error( $result ) ) {
|
||||
if ( 'unexpected_output' == $result->get_error_code() ) {
|
||||
$redirect = self_admin_url('plugins.php?error=true&charsout=' . strlen($result->get_error_data()) . '&plugin=' . $plugin . "&plugin_status=$status&paged=$page&s=$s");
|
||||
$redirect = self_admin_url('plugins.php?error=true&charsout=' . strlen($result->get_error_data()) . '&plugin=' . urlencode( $plugin ) . "&plugin_status=$status&paged=$page&s=$s");
|
||||
wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect));
|
||||
exit;
|
||||
} else {
|
||||
@@ -73,7 +73,7 @@ if ( $action ) {
|
||||
|
||||
check_admin_referer('bulk-plugins');
|
||||
|
||||
$plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
||||
$plugins = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array();
|
||||
|
||||
if ( is_network_admin() ) {
|
||||
foreach ( $plugins as $i => $plugin ) {
|
||||
@@ -122,9 +122,9 @@ if ( $action ) {
|
||||
check_admin_referer( 'bulk-plugins' );
|
||||
|
||||
if ( isset( $_GET['plugins'] ) )
|
||||
$plugins = explode( ',', $_GET['plugins'] );
|
||||
$plugins = explode( ',', wp_unslash( $_GET['plugins'] ) );
|
||||
elseif ( isset( $_POST['checked'] ) )
|
||||
$plugins = (array) $_POST['checked'];
|
||||
$plugins = (array) wp_unslash( $_POST['checked'] );
|
||||
else
|
||||
$plugins = array();
|
||||
|
||||
@@ -197,7 +197,7 @@ if ( $action ) {
|
||||
|
||||
check_admin_referer('bulk-plugins');
|
||||
|
||||
$plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
||||
$plugins = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array();
|
||||
// Do not deactivate plugins which are already deactivated.
|
||||
if ( is_network_admin() ) {
|
||||
$plugins = array_filter( $plugins, 'is_plugin_active_for_network' );
|
||||
@@ -234,7 +234,7 @@ if ( $action ) {
|
||||
check_admin_referer('bulk-plugins');
|
||||
|
||||
//$_POST = from the plugin form; $_GET = from the FTP details screen.
|
||||
$plugins = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array();
|
||||
$plugins = isset( $_REQUEST['checked'] ) ? (array) wp_unslash( $_REQUEST['checked'] ) : array();
|
||||
if ( empty( $plugins ) ) {
|
||||
wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
|
||||
exit;
|
||||
@@ -368,7 +368,7 @@ if ( $action ) {
|
||||
default:
|
||||
if ( isset( $_POST['checked'] ) ) {
|
||||
check_admin_referer('bulk-plugins');
|
||||
$plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
||||
$plugins = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array();
|
||||
$sendback = wp_get_referer();
|
||||
|
||||
/** This action is documented in wp-admin/edit-comments.php */
|
||||
|
||||
@@ -105,7 +105,7 @@ function setup_config_display_header( $body_classes = array() ) {
|
||||
|
||||
$language = '';
|
||||
if ( ! empty( $_REQUEST['language'] ) ) {
|
||||
$language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
|
||||
$language = preg_replace( '/[^a-zA-Z0-9_]/', '', $_REQUEST['language'] );
|
||||
} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
|
||||
$language = $GLOBALS['wp_local_package'];
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ if ( empty( $file ) ) {
|
||||
$relative_file = 'style.css';
|
||||
$file = $allowed_files['style.css'];
|
||||
} else {
|
||||
$relative_file = $file;
|
||||
$relative_file = wp_unslash( $file );
|
||||
$file = $theme->get_stylesheet_directory() . '/' . $relative_file;
|
||||
}
|
||||
|
||||
@@ -156,10 +156,12 @@ default:
|
||||
<div id="message" class="updated notice is-dismissible"><p><?php _e( 'File edited successfully.' ) ?></p></div>
|
||||
<?php endif;
|
||||
|
||||
$description = get_file_description( $relative_file );
|
||||
$file_description = get_file_description( $relative_file );
|
||||
$file_show = array_search( $file, array_filter( $allowed_files ) );
|
||||
if ( $description != $file_show )
|
||||
$description .= ' <span>(' . $file_show . ')</span>';
|
||||
$description = esc_html( $file_description );
|
||||
if ( $file_description != $file_show ) {
|
||||
$description .= ' <span>(' . esc_html( $file_show ) . ')</span>';
|
||||
}
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h1><?php echo esc_html( $title ); ?></h1>
|
||||
@@ -230,9 +232,9 @@ if ( $allowed_files ) :
|
||||
echo "\t<ul>\n";
|
||||
}
|
||||
|
||||
$file_description = get_file_description( $filename );
|
||||
$file_description = esc_html( get_file_description( $filename ) );
|
||||
if ( $filename !== basename( $absolute_filename ) || $file_description !== $filename ) {
|
||||
$file_description .= '<br /><span class="nonessential">(' . $filename . ')</span>';
|
||||
$file_description .= '<br /><span class="nonessential">(' . esc_html( $filename ) . ')</span>';
|
||||
}
|
||||
|
||||
if ( $absolute_filename === $file ) {
|
||||
|
||||
@@ -189,7 +189,7 @@ include(ABSPATH . 'wp-admin/admin-header.php');
|
||||
<p><strong><?php _e('User updated.') ?></strong></p>
|
||||
<?php endif; ?>
|
||||
<?php if ( $wp_http_referer && false === strpos( $wp_http_referer, 'user-new.php' ) && ! IS_PROFILE_PAGE ) : ?>
|
||||
<p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php _e('← Back to Users'); ?></a></p>
|
||||
<p><a href="<?php echo esc_url( wp_validate_redirect( esc_url_raw( $wp_http_referer ), self_admin_url( 'users.php' ) ) ); ?>"><?php _e('← Back to Users'); ?></a></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -70,7 +70,7 @@ if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
|
||||
add_existing_user_to_blog( array( 'user_id' => $user_id, 'role' => $_REQUEST[ 'role' ] ) );
|
||||
$redirect = add_query_arg( array( 'update' => 'addnoconfirmation' , 'user_id' => $user_id ), 'user-new.php' );
|
||||
} else {
|
||||
$newuser_key = substr( md5( $user_id ), 0, 5 );
|
||||
$newuser_key = wp_generate_password( 20, false );
|
||||
add_option( 'new_user_' . $newuser_key, array( 'user_id' => $user_id, 'email' => $user_details->user_email, 'role' => $_REQUEST[ 'role' ] ) );
|
||||
|
||||
$roles = get_editable_roles();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
=== Twenty Eleven ===
|
||||
Contributors: the WordPress team
|
||||
Requires at least: WordPress 3.2
|
||||
Tested up to: WordPress 4.7-trunk
|
||||
Stable tag: 2.5
|
||||
Tested up to: WordPress 4.9-trunk
|
||||
Stable tag: 2.6
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: blog, one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
|
||||
@@ -22,7 +22,7 @@ For more information about Twenty Eleven please go to https://codex.wordpress.or
|
||||
|
||||
== Copyright ==
|
||||
|
||||
Twenty Eleven WordPress Theme, Copyright 2011-2016 WordPress.org & Automattic.com
|
||||
Twenty Eleven WordPress Theme, Copyright 2011-2017 WordPress.org & Automattic.com
|
||||
Twenty Eleven is Distributed under the terms of the GNU GPL
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@@ -43,6 +43,11 @@ Source: https://github.com/aFarkas/html5shiv
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 2.6 =
|
||||
* Released: June 8, 2017
|
||||
|
||||
https://codex.wordpress.org/Twenty_Eleven_Theme_Changelog#Version_2.6
|
||||
|
||||
= 2.5 =
|
||||
* Released: August 15, 2016
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyeleven/
|
||||
Author: the WordPress team
|
||||
Author URI: https://wordpress.org/
|
||||
Description: The 2011 theme for WordPress is sophisticated, lightweight, and adaptable. Make it yours with a custom menu, header image, and background -- then go further with available theme options for light or dark color scheme, custom link colors, and three layout choices. Twenty Eleven comes equipped with a Showcase page template that transforms your front page into a showcase to show off your best content, widget support galore (sidebar, three footer areas, and a Showcase page widget area), and a custom "Ephemera" widget to display your Aside, Link, Quote, or Status posts. Included are styles for print and for the admin editor, support for featured images (as custom header images on posts and pages and as large images on featured "sticky" posts), and special styles for six different post formats.
|
||||
Version: 2.5
|
||||
Version: 2.6
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: blog, one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
=== Twenty Fifteen ===
|
||||
Contributors: the WordPress team
|
||||
Requires at least: WordPress 4.1
|
||||
Tested up to: WordPress 4.8-trunk
|
||||
Version: 1.7
|
||||
Tested up to: WordPress 4.9-trunk
|
||||
Version: 1.8
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
|
||||
@@ -55,6 +55,11 @@ Source: http://www.genericons.com
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 1.8 =
|
||||
* Released: June 8, 2017
|
||||
|
||||
https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_1.8
|
||||
|
||||
= 1.7 =
|
||||
* Released: December 6, 2016
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyfifteen/
|
||||
Author: the WordPress team
|
||||
Author URI: https://wordpress.org/
|
||||
Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer.
|
||||
Version: 1.7
|
||||
Version: 1.8
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
=== Twenty Fourteen ===
|
||||
Contributors: the WordPress team
|
||||
Requires at least: WordPress 3.6
|
||||
Tested up to: WordPress 4.8-trunk
|
||||
Stable tag: 1.9
|
||||
Tested up to: WordPress 4.9-trunk
|
||||
Stable tag: 2.0
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: blog, news, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
|
||||
@@ -22,7 +22,7 @@ For more information about Twenty Fourteen please go to https://codex.wordpress.
|
||||
|
||||
== Copyright ==
|
||||
|
||||
Twenty Fourteen WordPress Theme, Copyright 2013-2016 WordPress.org & Automattic.com
|
||||
Twenty Fourteen WordPress Theme, Copyright 2013-2017 WordPress.org & Automattic.com
|
||||
Twenty Fourteen is Distributed under the terms of the GNU GPL
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@@ -50,6 +50,11 @@ Source: http://www.genericons.com
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 2.0 =
|
||||
* Released: June 8, 2017
|
||||
|
||||
https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_2.0
|
||||
|
||||
= 1.9 =
|
||||
* Released: December 6, 2016
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyfourteen/
|
||||
Author: the WordPress team
|
||||
Author URI: https://wordpress.org/
|
||||
Description: In 2014, our default theme lets you create a responsive magazine website with a sleek, modern design. Feature your favorite homepage content in either a grid or a slider. Use the three widget areas to customize your website, and change your content's layout with a full-width page template and a contributor page to show off your authors. Creating a magazine website with WordPress has never been easier.
|
||||
Version: 1.9
|
||||
Version: 2.0
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: blog, news, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
=== Twenty Seventeen ===
|
||||
Contributors: the WordPress team
|
||||
Requires at least: WordPress 4.7
|
||||
Tested up to: WordPress 4.7
|
||||
Version: 1.2
|
||||
Tested up to: WordPress 4.9-trunk
|
||||
Version: 1.3
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
|
||||
@@ -60,6 +60,11 @@ Source: https://unsplash.com/@englr?photo=bIhpiQA009k
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 1.3 =
|
||||
* Released: June 8, 2017
|
||||
|
||||
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.3
|
||||
|
||||
= 1.2 =
|
||||
* Released: April 18, 2017
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyseventeen/
|
||||
Author: the WordPress team
|
||||
Author URI: https://wordpress.org/
|
||||
Description: Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.
|
||||
Version: 1.2
|
||||
Version: 1.3
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Text Domain: twentyseventeen
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
=== Twenty Ten ===
|
||||
Contributors: the WordPress team
|
||||
Requires at least: WordPress 3.0
|
||||
Tested up to: WordPress 4.7-trunk
|
||||
Stable tag: 2.2
|
||||
Tested up to: WordPress 4.9-trunk
|
||||
Stable tag: 2.3
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: blog, two-columns, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu, flexible-header, featured-images, footer-widgets, featured-image-header
|
||||
@@ -22,7 +22,7 @@ For more information about Twenty Ten theme please go to https://codex.wordpress
|
||||
|
||||
== Copyright ==
|
||||
|
||||
Twenty Ten WordPress Theme, Copyright 2010-2016 WordPress.org & Automattic.com
|
||||
Twenty Ten WordPress Theme, Copyright 2010-2017 WordPress.org & Automattic.com
|
||||
Twenty Ten is Distributed under the terms of the GNU GPL
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@@ -37,6 +37,11 @@ GNU General Public License for more details.
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 2.3 =
|
||||
* Released: June 8, 2017
|
||||
|
||||
https://codex.wordpress.org/Twenty_Ten_Theme_Changelog#Version_2.3
|
||||
|
||||
= 2.2 =
|
||||
* Released: August 15, 2016
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyten/
|
||||
Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the "Asides" and "Gallery" categories, and has an optional one-column page template that removes the sidebar.
|
||||
Author: the WordPress team
|
||||
Author URI: https://wordpress.org/
|
||||
Version: 2.2
|
||||
Version: 2.3
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: blog, two-columns, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu, flexible-header, featured-images, footer-widgets, featured-image-header
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
=== Twenty Thirteen ===
|
||||
Contributors: the WordPress team
|
||||
Requires at least: WordPress 3.6
|
||||
Tested up to: WordPress 4.8-trunk
|
||||
Stable tag: 2.1
|
||||
Tested up to: WordPress 4.9-trunk
|
||||
Stable tag: 2.2
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: blog, one-column, two-columns, right-sidebar, custom-header, custom-menu, editor-style, featured-images, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready
|
||||
@@ -22,7 +22,7 @@ For more information about Twenty Thirteen please go to https://codex.wordpress.
|
||||
|
||||
== Copyright ==
|
||||
|
||||
Twenty Thirteen WordPress Theme, Copyright 2013-2016 WordPress.org & Automattic.com
|
||||
Twenty Thirteen WordPress Theme, Copyright 2013-2017 WordPress.org & Automattic.com
|
||||
Twenty Thirteen is Distributed under the terms of the GNU GPL
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@@ -47,6 +47,11 @@ Source: http://www.genericons.com
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 2.2 =
|
||||
* Released: June 8, 2017
|
||||
|
||||
https://codex.wordpress.org/Twenty_Thirteen_Theme_Changelog#Version_2.2
|
||||
|
||||
= 2.1 =
|
||||
* Released: December 6, 2016
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentythirteen/
|
||||
Author: the WordPress team
|
||||
Author URI: https://wordpress.org/
|
||||
Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.
|
||||
Version: 2.1
|
||||
Version: 2.2
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: blog, one-column, two-columns, right-sidebar, custom-header, custom-menu, editor-style, featured-images, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
=== Twenty Twelve ===
|
||||
Contributors: the WordPress team
|
||||
Requires at least: WordPress 3.5
|
||||
Tested up to: WordPress 4.8-trunk
|
||||
Stable tag: 2.2
|
||||
Tested up to: WordPress 4.9-trunk
|
||||
Stable tag: 2.3
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: blog, one-column, two-columns, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
|
||||
@@ -22,7 +22,7 @@ For more information about Twenty Twelve please go to https://codex.wordpress.or
|
||||
|
||||
== Copyright ==
|
||||
|
||||
Twenty Twelve WordPress Theme, Copyright 2012-2016 WordPress.org & Automattic.com
|
||||
Twenty Twelve WordPress Theme, Copyright 2012-2017 WordPress.org & Automattic.com
|
||||
Twenty Twelve is Distributed under the terms of the GNU GPL
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@@ -43,6 +43,11 @@ Source: https://github.com/aFarkas/html5shiv
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 2.3 =
|
||||
* Released: June 8, 2017
|
||||
|
||||
https://codex.wordpress.org/Twenty_Twelve_Theme_Changelog#Version_2.3
|
||||
|
||||
= 2.2 =
|
||||
* Released: December 6, 2016
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentytwelve/
|
||||
Author: the WordPress team
|
||||
Author URI: https://wordpress.org/
|
||||
Description: The 2012 theme for WordPress is a fully responsive theme that looks great on any device. Features include a front page template with its own widgets, an optional display font, styling for post formats on both index and single views, and an optional no-sidebar page template. Make it yours with a custom menu, header image, and background.
|
||||
Version: 2.2
|
||||
Version: 2.3
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: blog, one-column, two-columns, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
|
||||
|
||||
@@ -95,7 +95,7 @@ class WP_oEmbed {
|
||||
'#https?://kck\.st/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ),
|
||||
'#https?://cloudup\.com/.*#i' => array( 'https://cloudup.com/oembed', true ),
|
||||
'#https?://(www\.)?reverbnation\.com/.*#i' => array( 'https://www.reverbnation.com/oembed', true ),
|
||||
'#https?://videopress\.com/v/.*#' => array( 'https://public-api.wordpress.com/oembed/1.0/?for=' . $host, true ),
|
||||
'#https?://videopress\.com/v/.*#' => array( 'https://public-api.wordpress.com/oembed/?for=' . $host, true ),
|
||||
'#https?://(www\.)?reddit\.com/r/[^/]+/comments/.*#i' => array( 'https://www.reddit.com/oembed', true ),
|
||||
'#https?://(www\.)?speakerdeck\.com/.*#i' => array( 'https://speakerdeck.com/oembed.{format}', true ),
|
||||
'#https?://www\.facebook\.com/.*/posts/.*#i' => array( 'https://www.facebook.com/plugins/post/oembed.json/', true ),
|
||||
|
||||
@@ -265,7 +265,7 @@ final class WP_Customize_Manager {
|
||||
}
|
||||
|
||||
$this->original_stylesheet = get_stylesheet();
|
||||
$this->theme = wp_get_theme( $args['theme'] );
|
||||
$this->theme = wp_get_theme( 0 === validate_file( $args['theme'] ) ? $args['theme'] : null );
|
||||
$this->messenger_channel = $args['messenger_channel'];
|
||||
$this->_changeset_uuid = $args['changeset_uuid'];
|
||||
|
||||
|
||||
@@ -35,9 +35,23 @@ final class WP_Customize_Widgets {
|
||||
* @var array
|
||||
*/
|
||||
protected $core_widget_id_bases = array(
|
||||
'archives', 'calendar', 'categories', 'links', 'meta',
|
||||
'nav_menu', 'pages', 'recent-comments', 'recent-posts',
|
||||
'rss', 'search', 'tag_cloud', 'text',
|
||||
'archives',
|
||||
'calendar',
|
||||
'categories',
|
||||
'custom_html',
|
||||
'links',
|
||||
'media_audio',
|
||||
'media_image',
|
||||
'media_video',
|
||||
'meta',
|
||||
'nav_menu',
|
||||
'pages',
|
||||
'recent-comments',
|
||||
'recent-posts',
|
||||
'rss',
|
||||
'search',
|
||||
'tag_cloud',
|
||||
'text',
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -819,40 +819,45 @@ final class _WP_Editors {
|
||||
*
|
||||
*/
|
||||
public static function print_default_editor_scripts() {
|
||||
$settings = self::default_settings();
|
||||
$user_can_richedit = user_can_richedit();
|
||||
|
||||
$settings['toolbar1'] = 'bold,italic,bullist,numlist,link';
|
||||
$settings['wpautop'] = false;
|
||||
$settings['indent'] = true;
|
||||
$settings['elementpath'] = false;
|
||||
if ( $user_can_richedit ) {
|
||||
$settings = self::default_settings();
|
||||
|
||||
// In production all plugins are loaded (they are in wp-editor.js.gz)
|
||||
// but only these will be initialized by default.
|
||||
$settings['plugins'] = implode( ',', array(
|
||||
'charmap',
|
||||
'colorpicker',
|
||||
'hr',
|
||||
'lists',
|
||||
// 'media',
|
||||
'paste',
|
||||
'tabfocus',
|
||||
'textcolor',
|
||||
'fullscreen',
|
||||
'wordpress',
|
||||
'wpautoresize',
|
||||
'wpeditimage',
|
||||
'wpemoji',
|
||||
'wpgallery',
|
||||
'wplink',
|
||||
// 'wpdialogs',
|
||||
'wptextpattern',
|
||||
// 'wpview',
|
||||
) );
|
||||
$settings['toolbar1'] = 'bold,italic,bullist,numlist,link';
|
||||
$settings['wpautop'] = false;
|
||||
$settings['indent'] = true;
|
||||
$settings['elementpath'] = false;
|
||||
|
||||
$settings = self::_parse_init( $settings );
|
||||
if ( is_rtl() ) {
|
||||
$settings['directionality'] = 'rtl';
|
||||
}
|
||||
|
||||
$suffix = SCRIPT_DEBUG ? '' : '.min';
|
||||
$baseurl = self::get_baseurl();
|
||||
// In production all plugins are loaded (they are in wp-editor.js.gz).
|
||||
// The 'wpview', 'wpdialogs', and 'media' TinyMCE plugins are not initialized by default.
|
||||
// Can be added from js by using the 'wp-before-tinymce-init' event.
|
||||
$settings['plugins'] = implode( ',', array(
|
||||
'charmap',
|
||||
'colorpicker',
|
||||
'hr',
|
||||
'lists',
|
||||
'paste',
|
||||
'tabfocus',
|
||||
'textcolor',
|
||||
'fullscreen',
|
||||
'wordpress',
|
||||
'wpautoresize',
|
||||
'wpeditimage',
|
||||
'wpemoji',
|
||||
'wpgallery',
|
||||
'wplink',
|
||||
'wptextpattern',
|
||||
) );
|
||||
|
||||
$settings = self::_parse_init( $settings );
|
||||
} else {
|
||||
$settings = '{}';
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
@@ -867,17 +872,29 @@ final class _WP_Editors {
|
||||
};
|
||||
};
|
||||
|
||||
var tinyMCEPreInit = {
|
||||
baseURL: "<?php echo $baseurl; ?>",
|
||||
suffix: "<?php echo $suffix; ?>",
|
||||
mceInit: {},
|
||||
qtInit: {},
|
||||
load_ext: function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');}
|
||||
};
|
||||
<?php
|
||||
|
||||
if ( $user_can_richedit ) {
|
||||
$suffix = SCRIPT_DEBUG ? '' : '.min';
|
||||
$baseurl = self::get_baseurl();
|
||||
|
||||
?>
|
||||
var tinyMCEPreInit = {
|
||||
baseURL: "<?php echo $baseurl; ?>",
|
||||
suffix: "<?php echo $suffix; ?>",
|
||||
mceInit: {},
|
||||
qtInit: {},
|
||||
load_ext: function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');}
|
||||
};
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</script>
|
||||
<?php
|
||||
|
||||
self::print_tinymce_scripts();
|
||||
if ( $user_can_richedit ) {
|
||||
self::print_tinymce_scripts();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires when the editor scripts are loaded for later initialization,
|
||||
|
||||
@@ -153,12 +153,13 @@ final class WP_oEmbed_Controller {
|
||||
*
|
||||
* @see WP_oEmbed::get_html()
|
||||
* @param WP_REST_Request $request Full data about the request.
|
||||
* @return WP_Error|array oEmbed response data or WP_Error on failure.
|
||||
* @return object|WP_Error oEmbed response data or WP_Error on failure.
|
||||
*/
|
||||
public function get_proxy_item( $request ) {
|
||||
$args = $request->get_params();
|
||||
|
||||
// Serve oEmbed data from cache if set.
|
||||
unset( $args['_wpnonce'] );
|
||||
$cache_key = 'oembed_' . md5( serialize( $args ) );
|
||||
$data = get_transient( $cache_key );
|
||||
if ( ! empty( $data ) ) {
|
||||
@@ -168,6 +169,14 @@ final class WP_oEmbed_Controller {
|
||||
$url = $request['url'];
|
||||
unset( $args['url'] );
|
||||
|
||||
// Copy maxwidth/maxheight to width/height since WP_oEmbed::fetch() uses these arg names.
|
||||
if ( isset( $args['maxwidth'] ) ) {
|
||||
$args['width'] = $args['maxwidth'];
|
||||
}
|
||||
if ( isset( $args['maxheight'] ) ) {
|
||||
$args['height'] = $args['maxheight'];
|
||||
}
|
||||
|
||||
$data = _wp_oembed_get_object()->get_data( $url, $args );
|
||||
|
||||
if ( false === $data ) {
|
||||
|
||||
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
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
@@ -60,3 +60,155 @@ require_once( ABSPATH . WPINC . '/widgets/class-wp-widget-tag-cloud.php' );
|
||||
|
||||
/** WP_Nav_Menu_Widget class */
|
||||
require_once( ABSPATH . WPINC . '/widgets/class-wp-nav-menu-widget.php' );
|
||||
|
||||
/**
|
||||
* Core class used to implement a Custom HTML widget.
|
||||
*
|
||||
* Note that this class is only located in this file in the 4.8 branch
|
||||
* for the sake of automatic updates. In 4.9 and above, it is located at
|
||||
* `wp-includes/widgets/class-wp-widget-custom-html.php`.
|
||||
*
|
||||
* @since 4.8.1
|
||||
*
|
||||
* @see WP_Widget
|
||||
*/
|
||||
class WP_Widget_Custom_HTML extends WP_Widget {
|
||||
|
||||
/**
|
||||
* Default instance.
|
||||
*
|
||||
* @since 4.8.1
|
||||
* @var array
|
||||
*/
|
||||
protected $default_instance = array(
|
||||
'title' => '',
|
||||
'content' => '',
|
||||
);
|
||||
|
||||
/**
|
||||
* Sets up a new Custom HTML widget instance.
|
||||
*
|
||||
* @since 4.8.1
|
||||
*/
|
||||
public function __construct() {
|
||||
$widget_ops = array(
|
||||
'classname' => 'widget_custom_html',
|
||||
'description' => __( 'Arbitrary HTML code.' ),
|
||||
'customize_selective_refresh' => true,
|
||||
);
|
||||
$control_ops = array(
|
||||
'width' => 400,
|
||||
'height' => 350,
|
||||
);
|
||||
parent::__construct( 'custom_html', __( 'Custom HTML' ), $widget_ops, $control_ops );
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the content for the current Custom HTML widget instance.
|
||||
*
|
||||
* @since 4.8.1
|
||||
*
|
||||
* @param array $args Display arguments including 'before_title', 'after_title',
|
||||
* 'before_widget', and 'after_widget'.
|
||||
* @param array $instance Settings for the current Custom HTML widget instance.
|
||||
*/
|
||||
public function widget( $args, $instance ) {
|
||||
|
||||
$instance = array_merge( $this->default_instance, $instance );
|
||||
|
||||
/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
|
||||
$title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
|
||||
|
||||
// Prepare instance data that looks like a normal Text widget.
|
||||
$simulated_text_widget_instance = array_merge( $instance, array(
|
||||
'text' => isset( $instance['content'] ) ? $instance['content'] : '',
|
||||
'filter' => false, // Because wpautop is not applied.
|
||||
'visual' => false, // Because it wasn't created in TinyMCE.
|
||||
) );
|
||||
unset( $simulated_text_widget_instance['content'] ); // Was moved to 'text' prop.
|
||||
|
||||
/** This filter is documented in wp-includes/widgets/class-wp-widget-text.php */
|
||||
$content = apply_filters( 'widget_text', $instance['content'], $simulated_text_widget_instance, $this );
|
||||
|
||||
/**
|
||||
* Filters the content of the Custom HTML widget.
|
||||
*
|
||||
* @since 4.8.1
|
||||
*
|
||||
* @param string $content The widget content.
|
||||
* @param array $instance Array of settings for the current widget.
|
||||
* @param WP_Widget_Custom_HTML $this Current Custom HTML widget instance.
|
||||
*/
|
||||
$content = apply_filters( 'widget_custom_html_content', $content, $instance, $this );
|
||||
|
||||
// Inject the Text widget's container class name alongside this widget's class name for theme styling compatibility.
|
||||
$args['before_widget'] = preg_replace( '/(?<=\sclass=["\'])/', 'widget_text ', $args['before_widget'] );
|
||||
|
||||
echo $args['before_widget'];
|
||||
if ( ! empty( $title ) ) {
|
||||
echo $args['before_title'] . $title . $args['after_title'];
|
||||
}
|
||||
echo '<div class="textwidget custom-html-widget">'; // The textwidget class is for theme styling compatibility.
|
||||
echo $content;
|
||||
echo '</div>';
|
||||
echo $args['after_widget'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles updating settings for the current Custom HTML widget instance.
|
||||
*
|
||||
* @since 4.8.1
|
||||
*
|
||||
* @param array $new_instance New settings for this instance as input by the user via
|
||||
* WP_Widget::form().
|
||||
* @param array $old_instance Old settings for this instance.
|
||||
* @return array Settings to save or bool false to cancel saving.
|
||||
*/
|
||||
public function update( $new_instance, $old_instance ) {
|
||||
$instance = array_merge( $this->default_instance, $old_instance );
|
||||
$instance['title'] = sanitize_text_field( $new_instance['title'] );
|
||||
if ( current_user_can( 'unfiltered_html' ) ) {
|
||||
$instance['content'] = $new_instance['content'];
|
||||
} else {
|
||||
$instance['content'] = wp_kses_post( $new_instance['content'] );
|
||||
}
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the Custom HTML widget settings form.
|
||||
*
|
||||
* @since 4.8.1
|
||||
*
|
||||
* @param array $instance Current instance.
|
||||
* @returns void
|
||||
*/
|
||||
public function form( $instance ) {
|
||||
$instance = wp_parse_args( (array) $instance, $this->default_instance );
|
||||
?>
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>"/>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id( 'content' ); ?>"><?php _e( 'Content:' ); ?></label>
|
||||
<textarea class="widefat code" rows="16" cols="20" id="<?php echo $this->get_field_id( 'content' ); ?>" name="<?php echo $this->get_field_name( 'content' ); ?>"><?php echo esc_textarea( $instance['content'] ); ?></textarea>
|
||||
</p>
|
||||
|
||||
<?php if ( ! current_user_can( 'unfiltered_html' ) ) : ?>
|
||||
<?php
|
||||
$probably_unsafe_html = array( 'script', 'iframe', 'form', 'input', 'style' );
|
||||
$allowed_html = wp_kses_allowed_html( 'post' );
|
||||
$disallowed_html = array_diff( $probably_unsafe_html, array_keys( $allowed_html ) );
|
||||
?>
|
||||
<?php if ( ! empty( $disallowed_html ) ) : ?>
|
||||
<p>
|
||||
<?php _e( 'Some HTML tags are not permitted, including:' ); ?>
|
||||
<code><?php echo join( '</code>, <code>', $disallowed_html ); ?></code>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
@@ -753,24 +753,30 @@ function wp_filter_oembed_result( $result, $data, $url ) {
|
||||
}
|
||||
$html = $content[1] . $content[2];
|
||||
|
||||
preg_match( '/ src=([\'"])(.*?)\1/', $html, $results );
|
||||
|
||||
if ( ! empty( $results ) ) {
|
||||
$secret = wp_generate_password( 10, false );
|
||||
|
||||
$url = esc_url( "{$results[2]}#?secret=$secret" );
|
||||
$q = $results[1];
|
||||
|
||||
$html = str_replace( $results[0], ' src=' . $q . $url . $q . ' data-secret=' . $q . $secret . $q, $html );
|
||||
$html = str_replace( '<blockquote', "<blockquote data-secret=\"$secret\"", $html );
|
||||
}
|
||||
|
||||
$allowed_html['blockquote']['data-secret'] = true;
|
||||
$allowed_html['iframe']['data-secret'] = true;
|
||||
|
||||
$html = wp_kses( $html, $allowed_html );
|
||||
|
||||
if ( ! empty( $content[1] ) ) {
|
||||
// We have a blockquote to fall back on. Hide the iframe by default.
|
||||
$html = str_replace( '<iframe', '<iframe style="position: absolute; clip: rect(1px, 1px, 1px, 1px);"', $html );
|
||||
$html = str_replace( '<blockquote', '<blockquote class="wp-embedded-content"', $html );
|
||||
}
|
||||
|
||||
$html = str_replace( '<iframe', '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"', $html );
|
||||
|
||||
preg_match( '/ src=[\'"]([^\'"]*)[\'"]/', $html, $results );
|
||||
|
||||
if ( ! empty( $results ) ) {
|
||||
$secret = wp_generate_password( 10, false );
|
||||
|
||||
$url = esc_url( "{$results[1]}#?secret=$secret" );
|
||||
|
||||
$html = str_replace( $results[0], " src=\"$url\" data-secret=\"$secret\"", $html );
|
||||
$html = str_replace( '<blockquote', "<blockquote data-secret=\"$secret\"", $html );
|
||||
}
|
||||
$html = str_ireplace( '<iframe', '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"', $html );
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
@@ -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" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3738,6 +3738,11 @@ function _deep_replace( $search, $subject ) {
|
||||
* Sometimes, spot-escaping is required or useful. One example
|
||||
* is preparing an array for use in an IN clause.
|
||||
*
|
||||
* NOTE: Since 4.8.3, '%' characters will be replaced with a placeholder string,
|
||||
* this prevents certain SQLi attacks from taking place. This change in behaviour
|
||||
* may cause issues for code that expects the return value of esc_sql() to be useable
|
||||
* for other purposes.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
@@ -5077,7 +5082,7 @@ function _print_emoji_detection_script() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>;
|
||||
!function(a,b,c){function d(a){var b,c,d,e,f=String.fromCharCode;if(!k||!k.fillText)return!1;switch(k.clearRect(0,0,j.width,j.height),k.textBaseline="top",k.font="600 32px Arial",a){case"flag":return k.fillText(f(55356,56826,55356,56819),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,56826,8203,55356,56819),0,0),c=j.toDataURL(),b===c&&(k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447),0,0),c=j.toDataURL(),b!==c);case"emoji4":return k.fillText(f(55358,56794,8205,9794,65039),0,0),d=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55358,56794,8203,9794,65039),0,0),e=j.toDataURL(),d!==e}return!1}function e(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i,j=b.createElement("canvas"),k=j.getContext&&j.getContext("2d");for(i=Array("flag","emoji4"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
|
||||
!function(a,b,c){function d(a){var b,c,d,e,f=String.fromCharCode;if(!k||!k.fillText)return!1;switch(k.clearRect(0,0,j.width,j.height),k.textBaseline="top",k.font="600 32px Arial",a){case"flag":return k.fillText(f(55356,56826,55356,56819),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,56826,8203,55356,56819),0,0),c=j.toDataURL(),b!==c&&(k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447),0,0),c=j.toDataURL(),b!==c);case"emoji4":return k.fillText(f(55358,56794,8205,9794,65039),0,0),d=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55358,56794,8203,9794,65039),0,0),e=j.toDataURL(),d!==e}return!1}function e(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i,j=b.createElement("canvas"),k=j.getContext&&j.getContext("2d");for(i=Array("flag","emoji4"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -2553,8 +2553,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.
|
||||
|
||||
@@ -715,7 +715,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;
|
||||
@@ -3152,12 +3152,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);
|
||||
|
||||
@@ -155,8 +155,6 @@
|
||||
encodedText,
|
||||
instance;
|
||||
|
||||
text = tinymce.DOM.decode( text );
|
||||
|
||||
if ( text.indexOf( '[' ) !== -1 && text.indexOf( ']' ) !== -1 ) {
|
||||
// Looks like a shortcode? Remove any line breaks from inside of shortcodes
|
||||
// or autop will replace them with <p> and <br> later and the string won't match.
|
||||
@@ -431,7 +429,7 @@
|
||||
var selected = node === editor.selection.getNode();
|
||||
var $viewNode;
|
||||
|
||||
if ( ! this.loader && $( node ).text() !== this.text ) {
|
||||
if ( ! this.loader && $( node ).text() !== tinymce.DOM.decode( this.text ) ) {
|
||||
editor.dom.setAttrib( node, 'data-wpview-marker', null );
|
||||
return;
|
||||
}
|
||||
@@ -502,6 +500,14 @@
|
||||
setIframes: function( head, body, callback, rendered ) {
|
||||
var self = this;
|
||||
|
||||
if ( body.indexOf( '[' ) !== -1 && body.indexOf( ']' ) !== -1 ) {
|
||||
var shortcodesRegExp = new RegExp( '\\[\\/?(?:' + window.mceViewL10n.shortcodes.join( '|' ) + ')[^\\]]*?\\]', 'g' );
|
||||
// Escape tags inside shortcode previews.
|
||||
body = body.replace( shortcodesRegExp, function( match ) {
|
||||
return match.replace( /</g, '<' ).replace( />/g, '>' );
|
||||
} );
|
||||
}
|
||||
|
||||
this.getNodes( function( editor, node ) {
|
||||
var dom = editor.dom,
|
||||
styles = '',
|
||||
|
||||
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
@@ -8227,13 +8227,13 @@ UploaderInline = View.extend({
|
||||
},
|
||||
show: function() {
|
||||
this.$el.removeClass( 'hidden' );
|
||||
if ( this.controller.$uploaderToggler.length ) {
|
||||
if ( this.controller.$uploaderToggler && this.controller.$uploaderToggler.length ) {
|
||||
this.controller.$uploaderToggler.attr( 'aria-expanded', 'true' );
|
||||
}
|
||||
},
|
||||
hide: function() {
|
||||
this.$el.addClass( 'hidden' );
|
||||
if ( this.controller.$uploaderToggler.length ) {
|
||||
if ( this.controller.$uploaderToggler && this.controller.$uploaderToggler.length ) {
|
||||
this.controller.$uploaderToggler
|
||||
.attr( 'aria-expanded', 'false' )
|
||||
// Move focus back to the toggle button when closing the uploader.
|
||||
|
||||
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,9 @@
|
||||
/* global getUserSetting, setUserSetting */
|
||||
( function( tinymce ) {
|
||||
// Set the minimum value for the modals z-index higher than #wpadminbar (100000)
|
||||
tinymce.ui.FloatPanel.zIndex = 100100;
|
||||
if ( tinymce.ui.FloatPanel.zIndex < 100100 ) {
|
||||
tinymce.ui.FloatPanel.zIndex = 100100;
|
||||
}
|
||||
|
||||
tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||
var wpAdvButton, style,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
||||
renderHtml: function() {
|
||||
return (
|
||||
'<div id="' + this._id + '" class="wp-link-preview">' +
|
||||
'<a href="' + this.url + '" target="_blank" tabindex="-1">' + this.url + '</a>' +
|
||||
'<a href="' + this.url + '" target="_blank" rel="noopener" tabindex="-1">' + this.url + '</a>' +
|
||||
'</div>'
|
||||
);
|
||||
},
|
||||
@@ -249,6 +249,13 @@
|
||||
text = inputInstance.getLinkText();
|
||||
editor.focus();
|
||||
|
||||
var parser = document.createElement( 'a' );
|
||||
parser.href = href;
|
||||
|
||||
if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line
|
||||
href = '';
|
||||
}
|
||||
|
||||
if ( ! href ) {
|
||||
editor.dom.remove( linkNode, true );
|
||||
return;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -101,8 +101,9 @@ img {
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
.wp-caption img {
|
||||
display: block;
|
||||
dl.wp-caption dt.wp-caption-dt img {
|
||||
display: inline-block;
|
||||
margin-bottom: -1ex;
|
||||
}
|
||||
|
||||
div.mceTemp {
|
||||
@@ -180,6 +181,14 @@ img[data-mce-selected]::selection {
|
||||
background: #bfe6ff;
|
||||
}
|
||||
|
||||
.mce-content-body .wp-caption-dt a[data-mce-selected] {
|
||||
outline: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
box-shadow: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.mce-content-body code {
|
||||
padding: 2px 4px;
|
||||
margin: 0;
|
||||
|
||||
Binary file not shown.
@@ -88,7 +88,7 @@ var twemoji = (function (
|
||||
*/
|
||||
onerror: function onerror() {
|
||||
if (this.parentNode) {
|
||||
this.parentNode.replaceChild(createText(this.alt), this);
|
||||
this.parentNode.replaceChild(createText(this.alt, false), this);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -159,13 +159,13 @@ var twemoji = (function (
|
||||
* @example
|
||||
*
|
||||
* twemoji.parse("I \u2764\uFE0F emoji!");
|
||||
* // I <img class="emoji" draggable="false" alt="❤️" src="/assets/2764.gif"> emoji!
|
||||
* // I <img class="emoji" draggable="false" alt="❤️" src="/assets/2764.gif"/> emoji!
|
||||
*
|
||||
*
|
||||
* twemoji.parse("I \u2764\uFE0F emoji!", function(iconId, options) {
|
||||
* return '/assets/' + iconId + '.gif';
|
||||
* });
|
||||
* // I <img class="emoji" draggable="false" alt="❤️" src="/assets/2764.gif"> emoji!
|
||||
* // I <img class="emoji" draggable="false" alt="❤️" src="/assets/2764.gif"/> emoji!
|
||||
*
|
||||
*
|
||||
* twemoji.parse("I \u2764\uFE0F emoji!", {
|
||||
@@ -174,7 +174,7 @@ var twemoji = (function (
|
||||
* return '/assets/' + options.size + '/' + iconId + options.ext;
|
||||
* }
|
||||
* });
|
||||
* // I <img class="emoji" draggable="false" alt="❤️" src="/assets/72x72/2764.png"> emoji!
|
||||
* // I <img class="emoji" draggable="false" alt="❤️" src="/assets/72x72/2764.png"/> emoji!
|
||||
*
|
||||
*/
|
||||
parse: parse,
|
||||
@@ -237,8 +237,8 @@ var twemoji = (function (
|
||||
// used to find HTML special chars in attributes
|
||||
rescaper = /[&<>'"]/g,
|
||||
|
||||
// nodes with type 1 which should **not** be parsed (including lower case svg)
|
||||
shouldntBeParsed = /IFRAME|NOFRAMES|NOSCRIPT|SCRIPT|SELECT|STYLE|TEXTAREA|[a-z]/,
|
||||
// nodes with type 1 which should **not** be parsed
|
||||
shouldntBeParsed = /^(?:iframe|noframes|noscript|script|select|style|textarea)$/,
|
||||
|
||||
// just a private shortcut
|
||||
fromCharCode = String.fromCharCode;
|
||||
@@ -256,8 +256,8 @@ var twemoji = (function (
|
||||
* @param string text used to create DOM text node
|
||||
* @return Node a DOM node with that text
|
||||
*/
|
||||
function createText(text) {
|
||||
return document.createTextNode(text);
|
||||
function createText(text, clean) {
|
||||
return document.createTextNode(clean ? text.replace(UFE0Fg, '') : text);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -301,9 +301,10 @@ var twemoji = (function (
|
||||
// collect them to process emoji later
|
||||
allText.push(subnode);
|
||||
}
|
||||
// ignore all nodes that are not type 1 or that
|
||||
// ignore all nodes that are not type 1, that are svg, or that
|
||||
// should not be parsed as script, style, and others
|
||||
else if (nodeType === 1 && !shouldntBeParsed.test(subnode.nodeName)) {
|
||||
else if (nodeType === 1 && !('ownerSVGElement' in subnode) &&
|
||||
!shouldntBeParsed.test(subnode.nodeName.toLowerCase())) {
|
||||
grabAllTextNodes(subnode, allText);
|
||||
}
|
||||
}
|
||||
@@ -365,7 +366,7 @@ var twemoji = (function (
|
||||
index = match.index;
|
||||
if (index !== i) {
|
||||
fragment.appendChild(
|
||||
createText(text.slice(i, index))
|
||||
createText(text.slice(i, index), true)
|
||||
);
|
||||
}
|
||||
rawText = match[0];
|
||||
@@ -393,7 +394,7 @@ var twemoji = (function (
|
||||
modified = true;
|
||||
fragment.appendChild(img);
|
||||
}
|
||||
if (!img) fragment.appendChild(createText(rawText));
|
||||
if (!img) fragment.appendChild(createText(rawText, false));
|
||||
img = null;
|
||||
}
|
||||
// is there actually anything to replace in here ?
|
||||
@@ -401,7 +402,7 @@ var twemoji = (function (
|
||||
// any text left to be added ?
|
||||
if (i < text.length) {
|
||||
fragment.appendChild(
|
||||
createText(text.slice(i))
|
||||
createText(text.slice(i), true)
|
||||
);
|
||||
}
|
||||
// replace the text node only, leave intact
|
||||
@@ -459,7 +460,7 @@ var twemoji = (function (
|
||||
ret = ret.concat(' ', attrname, '="', escapeHTML(attrib[attrname]), '"');
|
||||
}
|
||||
}
|
||||
ret = ret.concat('>');
|
||||
ret = ret.concat('/>');
|
||||
}
|
||||
return ret;
|
||||
});
|
||||
|
||||
2
wp-includes/js/twemoji.min.js
vendored
2
wp-includes/js/twemoji.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1112,7 +1112,10 @@
|
||||
'PostsRevisions': 'PostRevisions',
|
||||
'PostsTags': 'PostTags'
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
modelEndpoints = routeModel.get( 'modelEndpoints' ),
|
||||
modelRegex = new RegExp( '(?:.*[+)]|\/(' + modelEndpoints.join( '|' ) + '))$' );
|
||||
|
||||
/**
|
||||
* Iterate thru the routes, picking up models and collections to build. Builds two arrays,
|
||||
@@ -1137,8 +1140,8 @@
|
||||
index !== ( '/' + routeModel.get( 'versionString' ).slice( 0, -1 ) )
|
||||
) {
|
||||
|
||||
// Single items end with a regex (or the special case 'me').
|
||||
if ( /(?:.*[+)]|\/me)$/.test( index ) ) {
|
||||
// Single items end with a regex, or a special case word.
|
||||
if ( modelRegex.test( index ) ) {
|
||||
modelRoutes.push( { index: index, route: route } );
|
||||
} else {
|
||||
|
||||
@@ -1360,10 +1363,11 @@
|
||||
wp.api.init = function( args ) {
|
||||
var endpoint, attributes = {}, deferred, promise;
|
||||
|
||||
args = args || {};
|
||||
attributes.apiRoot = args.apiRoot || wpApiSettings.root || '/wp-json';
|
||||
attributes.versionString = args.versionString || wpApiSettings.versionString || 'wp/v2/';
|
||||
attributes.schema = args.schema || null;
|
||||
args = args || {};
|
||||
attributes.apiRoot = args.apiRoot || wpApiSettings.root || '/wp-json';
|
||||
attributes.versionString = args.versionString || wpApiSettings.versionString || 'wp/v2/';
|
||||
attributes.schema = args.schema || null;
|
||||
attributes.modelEndpoints = args.modelEndpoints || [ 'me', 'settings' ];
|
||||
if ( ! attributes.schema && attributes.apiRoot === wpApiSettings.root && attributes.versionString === wpApiSettings.versionString ) {
|
||||
attributes.schema = wpApiSettings.schema;
|
||||
}
|
||||
|
||||
2
wp-includes/js/wp-api.min.js
vendored
2
wp-includes/js/wp-api.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -54,7 +54,7 @@
|
||||
context.fillText( stringFromCharCode( 55356, 56826, 8203, 55356, 56819 ), 0, 0 );
|
||||
flag2 = canvas.toDataURL();
|
||||
|
||||
if ( flag !== flag2 ) {
|
||||
if ( flag === flag2 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
2
wp-includes/js/wp-emoji-loader.min.js
vendored
2
wp-includes/js/wp-emoji-loader.min.js
vendored
@@ -1 +1 @@
|
||||
!function(a,b,c){function d(a){var b,c,d,e,f=String.fromCharCode;if(!k||!k.fillText)return!1;switch(k.clearRect(0,0,j.width,j.height),k.textBaseline="top",k.font="600 32px Arial",a){case"flag":return k.fillText(f(55356,56826,55356,56819),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,56826,8203,55356,56819),0,0),c=j.toDataURL(),b===c&&(k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447),0,0),c=j.toDataURL(),b!==c);case"emoji4":return k.fillText(f(55358,56794,8205,9794,65039),0,0),d=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55358,56794,8203,9794,65039),0,0),e=j.toDataURL(),d!==e}return!1}function e(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i,j=b.createElement("canvas"),k=j.getContext&&j.getContext("2d");for(i=Array("flag","emoji4"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
|
||||
!function(a,b,c){function d(a){var b,c,d,e,f=String.fromCharCode;if(!k||!k.fillText)return!1;switch(k.clearRect(0,0,j.width,j.height),k.textBaseline="top",k.font="600 32px Arial",a){case"flag":return k.fillText(f(55356,56826,55356,56819),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,56826,8203,55356,56819),0,0),c=j.toDataURL(),b!==c&&(k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447),0,0),c=j.toDataURL(),b!==c);case"emoji4":return k.fillText(f(55358,56794,8205,9794,65039),0,0),d=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55358,56794,8203,9794,65039),0,0),e=j.toDataURL(),d!==e}return!1}function e(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i,j=b.createElement("canvas"),k=j.getContext&&j.getContext("2d");for(i=Array("flag","emoji4"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
|
||||
2
wp-includes/js/wp-emoji-release.min.js
vendored
2
wp-includes/js/wp-emoji-release.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -312,7 +312,7 @@ var wpLink;
|
||||
var html = '<a href="' + attrs.href + '"';
|
||||
|
||||
if ( attrs.target ) {
|
||||
html += ' target="' + attrs.target + '"';
|
||||
html += ' rel="noopener" target="' + attrs.target + '"';
|
||||
}
|
||||
|
||||
return html + '>';
|
||||
@@ -337,6 +337,13 @@ var wpLink;
|
||||
attrs = wpLink.getAttrs();
|
||||
text = inputs.text.val();
|
||||
|
||||
var parser = document.createElement( 'a' );
|
||||
parser.href = attrs.href;
|
||||
|
||||
if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line
|
||||
attrs.href = '';
|
||||
}
|
||||
|
||||
// If there's no href, return.
|
||||
if ( ! attrs.href ) {
|
||||
return;
|
||||
@@ -390,6 +397,13 @@ var wpLink;
|
||||
var attrs = wpLink.getAttrs(),
|
||||
$link, text, hasText, $mceCaret;
|
||||
|
||||
var parser = document.createElement( 'a' );
|
||||
parser.href = attrs.href;
|
||||
|
||||
if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line
|
||||
attrs.href = '';
|
||||
}
|
||||
|
||||
if ( ! attrs.href ) {
|
||||
editor.execCommand( 'unlink' );
|
||||
wpLink.close();
|
||||
|
||||
2
wp-includes/js/wplink.min.js
vendored
2
wp-includes/js/wplink.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -2556,7 +2556,11 @@ function wp_video_shortcode( $attr, $content = '' ) {
|
||||
} elseif ( $is_vimeo ) {
|
||||
// Remove all query arguments and force SSL - see #40866.
|
||||
$parsed_vimeo_url = wp_parse_url( $atts['src'] );
|
||||
$atts['src'] = 'https://' . $parsed_vimeo_url['host'] . $parsed_vimeo_url['path'];
|
||||
$vimeo_src = 'https://' . $parsed_vimeo_url['host'] . $parsed_vimeo_url['path'];
|
||||
|
||||
// Add loop param for mejs bug - see #40977, not needed after #39686.
|
||||
$loop = $atts['loop'] ? '1' : '0';
|
||||
$atts['src'] = add_query_arg( 'loop', $loop, $vimeo_src );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4246,10 +4246,10 @@ function get_page_by_path( $page_path, $output = OBJECT, $post_type = 'page' ) {
|
||||
$page_path = str_replace('%2F', '/', $page_path);
|
||||
$page_path = str_replace('%20', ' ', $page_path);
|
||||
$parts = explode( '/', trim( $page_path, '/' ) );
|
||||
$parts = esc_sql( $parts );
|
||||
$parts = array_map( 'sanitize_title_for_query', $parts );
|
||||
$escaped_parts = esc_sql( $parts );
|
||||
|
||||
$in_string = "'" . implode( "','", $parts ) . "'";
|
||||
$in_string = "'" . implode( "','", $escaped_parts ) . "'";
|
||||
|
||||
if ( is_array( $post_type ) ) {
|
||||
$post_types = $post_type;
|
||||
|
||||
@@ -324,6 +324,11 @@ function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) {
|
||||
$url .= '/' . ltrim( $path, '/' );
|
||||
} else {
|
||||
$url = trailingslashit( get_home_url( $blog_id, '', $scheme ) );
|
||||
// nginx only allows HTTP/1.0 methods when redirecting from / to /index.php
|
||||
// To work around this, we manually add index.php to the URL, avoiding the redirect.
|
||||
if ( 'index.php' !== substr( $url, 9 ) ) {
|
||||
$url .= 'index.php';
|
||||
}
|
||||
|
||||
$path = '/' . ltrim( $path, '/' );
|
||||
|
||||
|
||||
@@ -387,6 +387,20 @@ class WP_REST_Server {
|
||||
// Embed links inside the request.
|
||||
$result = $this->response_to_data( $result, isset( $_GET['_embed'] ) );
|
||||
|
||||
/**
|
||||
* Filters the API response.
|
||||
*
|
||||
* Allows modification of the response data after inserting
|
||||
* embedded data (if any) and before echoing the response data.
|
||||
*
|
||||
* @since 4.8.1
|
||||
*
|
||||
* @param array $result Response data to send to the client.
|
||||
* @param WP_REST_Server $this Server instance.
|
||||
* @param WP_REST_Request $request Request used to generate the response.
|
||||
*/
|
||||
$result = apply_filters( 'rest_pre_echo_response', $result, $this, $request );
|
||||
|
||||
$result = wp_json_encode( $result );
|
||||
|
||||
$json_error_message = $this->get_json_last_error();
|
||||
|
||||
@@ -608,7 +608,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'media-audio-widget', "/wp-admin/js/widgets/media-audio-widget$suffix.js", array( 'media-widgets', 'media-audiovideo' ) );
|
||||
$scripts->add( 'media-image-widget', "/wp-admin/js/widgets/media-image-widget$suffix.js", array( 'media-widgets' ) );
|
||||
$scripts->add( 'media-video-widget', "/wp-admin/js/widgets/media-video-widget$suffix.js", array( 'media-widgets', 'media-audiovideo' ) );
|
||||
$scripts->add( 'text-widgets', "/wp-admin/js/widgets/text-widgets$suffix.js", array( 'jquery', 'backbone', 'editor', 'wp-util' ) );
|
||||
$scripts->add( 'text-widgets', "/wp-admin/js/widgets/text-widgets$suffix.js", array( 'jquery', 'backbone', 'editor', 'wp-util', 'wp-a11y' ) );
|
||||
$scripts->add_inline_script( 'text-widgets', 'wp.textWidgets.init();', 'after' );
|
||||
|
||||
$scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone', 'wp-a11y' ), false, 1 );
|
||||
@@ -845,7 +845,7 @@ function wp_default_styles( &$styles ) {
|
||||
$styles->add( 'themes', "/wp-admin/css/themes$suffix.css" );
|
||||
$styles->add( 'about', "/wp-admin/css/about$suffix.css" );
|
||||
$styles->add( 'nav-menus', "/wp-admin/css/nav-menus$suffix.css" );
|
||||
$styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css" );
|
||||
$styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css", array( 'wp-pointer' ) );
|
||||
$styles->add( 'site-icon', "/wp-admin/css/site-icon$suffix.css" );
|
||||
$styles->add( 'l10n', "/wp-admin/css/l10n$suffix.css" );
|
||||
|
||||
@@ -949,6 +949,10 @@ function wp_just_in_time_script_localization() {
|
||||
'autosaveInterval' => AUTOSAVE_INTERVAL,
|
||||
'blog_id' => get_current_blog_id(),
|
||||
) );
|
||||
|
||||
wp_localize_script( 'mce-view', 'mceViewL10n', array(
|
||||
'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array()
|
||||
) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1864,7 +1864,10 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
|
||||
$args['taxonomy'] = $taxonomies;
|
||||
$args['object_ids'] = $object_ids;
|
||||
|
||||
$terms = array_merge( $terms, get_terms( $args ) );
|
||||
// Taxonomies registered without an 'args' param are handled here.
|
||||
if ( ! empty( $taxonomies ) ) {
|
||||
$terms = array_merge( $terms, get_terms( $args ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the terms for a given object or objects.
|
||||
|
||||
@@ -1948,15 +1948,19 @@ function get_theme_starter_content() {
|
||||
'text_business_info' => array( 'text', array(
|
||||
'title' => _x( 'Find Us', 'Theme starter content' ),
|
||||
'text' => join( '', array(
|
||||
'<p><strong>' . _x( 'Address', 'Theme starter content' ) . '</strong><br />',
|
||||
_x( '123 Main Street', 'Theme starter content' ) . '<br />' . _x( 'New York, NY 10001', 'Theme starter content' ) . '</p>',
|
||||
'<p><strong>' . _x( 'Hours', 'Theme starter content' ) . '</strong><br />',
|
||||
_x( 'Monday—Friday: 9:00AM–5:00PM', 'Theme starter content' ) . '<br />' . _x( 'Saturday & Sunday: 11:00AM–3:00PM', 'Theme starter content' ) . '</p>'
|
||||
'<strong>' . _x( 'Address', 'Theme starter content' ) . "</strong>\n",
|
||||
_x( '123 Main Street', 'Theme starter content' ) . "\n" . _x( 'New York, NY 10001', 'Theme starter content' ) . "\n\n",
|
||||
'<strong>' . _x( 'Hours', 'Theme starter content' ) . "</strong>\n",
|
||||
_x( 'Monday—Friday: 9:00AM–5:00PM', 'Theme starter content' ) . "\n" . _x( 'Saturday & Sunday: 11:00AM–3:00PM', 'Theme starter content' )
|
||||
) ),
|
||||
'filter' => true,
|
||||
'visual' => true,
|
||||
) ),
|
||||
'text_about' => array( 'text', array(
|
||||
'title' => _x( 'About This Site', 'Theme starter content' ),
|
||||
'text' => _x( 'This may be a good place to introduce yourself and your site or include some credits.', 'Theme starter content' ),
|
||||
'filter' => true,
|
||||
'visual' => true,
|
||||
) ),
|
||||
'archives' => array( 'archives', array(
|
||||
'title' => _x( 'Archives', 'Theme starter content' ),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.8-RC2-40868';
|
||||
$wp_version = '4.8.5';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
@@ -1474,6 +1474,8 @@ function wp_widgets_init() {
|
||||
|
||||
register_widget( 'WP_Nav_Menu_Widget' );
|
||||
|
||||
register_widget( 'WP_Widget_Custom_HTML' );
|
||||
|
||||
/**
|
||||
* Fires after all default WordPress widgets have been registered.
|
||||
*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user