Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
noblogs-wp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
39
Issues
39
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ai
noblogs-wp
Commits
620a1808
Commit
620a1808
authored
Mar 14, 2019
by
agata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpress 5.1.1
parent
8c02839a
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
185 additions
and
39 deletions
+185
-39
wp-admin/about.php
wp-admin/about.php
+31
-2
wp-admin/css/nav-menus-rtl.css
wp-admin/css/nav-menus-rtl.css
+1
-1
wp-admin/css/nav-menus-rtl.min.css
wp-admin/css/nav-menus-rtl.min.css
+1
-1
wp-admin/css/nav-menus.css
wp-admin/css/nav-menus.css
+1
-1
wp-admin/css/nav-menus.min.css
wp-admin/css/nav-menus.min.css
+1
-1
wp-admin/images/loading.gif
wp-admin/images/loading.gif
+0
-0
wp-admin/includes/ajax-actions.php
wp-admin/includes/ajax-actions.php
+2
-0
wp-admin/includes/class-wp-plugin-install-list-table.php
wp-admin/includes/class-wp-plugin-install-list-table.php
+8
-8
wp-admin/includes/dashboard.php
wp-admin/includes/dashboard.php
+1
-0
wp-admin/includes/misc.php
wp-admin/includes/misc.php
+18
-0
wp-admin/js/widgets/custom-html-widgets.js
wp-admin/js/widgets/custom-html-widgets.js
+1
-1
wp-admin/js/widgets/custom-html-widgets.min.js
wp-admin/js/widgets/custom-html-widgets.min.js
+1
-1
wp-includes/comment.php
wp-includes/comment.php
+2
-0
wp-includes/formatting.php
wp-includes/formatting.php
+8
-6
wp-includes/functions.php
wp-includes/functions.php
+57
-0
wp-includes/js/comment-reply.js
wp-includes/js/comment-reply.js
+26
-5
wp-includes/js/comment-reply.min.js
wp-includes/js/comment-reply.min.js
+1
-1
wp-includes/ms-site.php
wp-includes/ms-site.php
+24
-10
wp-includes/version.php
wp-includes/version.php
+1
-1
No files found.
wp-admin/about.php
View file @
620a1808
...
...
@@ -34,6 +34,35 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<a
href=
"freedoms.php?privacy-notice"
class=
"nav-tab"
>
<?php
_e
(
'Privacy'
);
?>
</a>
</h2>
<div
class=
"changelog point-releases"
>
<h3>
<?php
_e
(
'Maintenance and Security Releases'
);
?>
</h3>
<p>
<?php
printf
(
/* translators: 1: WordPress version number, 2: plural number of bugs. */
_n
(
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.'
,
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.'
,
14
),
'5.1.1'
,
number_format_i18n
(
14
)
);
?>
<?php
printf
(
/* translators: %s: HelpHub URL */
__
(
'For more information, see <a href="%s">the release notes</a>.'
),
sprintf
(
/* translators: %s: WordPress version */
esc_url
(
__
(
'https://wordpress.org/support/wordpress-version/version-%s/'
)
),
sanitize_title
(
'5.1.1'
)
)
);
?>
</p>
</div>
<h2
class=
"feature-section-header"
>
<?php
_e
(
'A Little Better Every Day'
);
?>
</h2>
<div
class=
"feature-section headline-feature one-col"
>
...
...
@@ -47,7 +76,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<div
class=
"feature-section one-col is-wide wp-clearfix"
>
<div
class=
"col"
>
<h3>
<?php
_e
(
'Site Health'
);
?>
</h
2
>
<h3>
<?php
_e
(
'Site Health'
);
?>
</h
3
>
<div
class=
"inline-svg alignright"
>
<img
src=
"https://s.w.org/images/core/5.1/site-health.svg"
alt=
""
>
</div>
...
...
@@ -68,7 +97,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<div
class=
"feature-section one-col is-wide wp-clearfix"
>
<div
class=
"col"
>
<h3>
<?php
_e
(
'Editor Performance'
);
?>
</h
2
>
<h3>
<?php
_e
(
'Editor Performance'
);
?>
</h
3
>
<div
class=
"inline-svg alignright"
>
<img
src=
"https://s.w.org/images/core/5.1/editor-performance.svg"
alt=
""
>
</div>
...
...
wp-admin/css/nav-menus-rtl.css
View file @
620a1808
...
...
@@ -161,7 +161,6 @@ ul.add-menu-item-tabs li {
margin-left
:
20px
;
margin-top
:
-3px
;
width
:
100%
;
background
:
#f5f5f5
;
}
#menu-management
.menu-edit
{
...
...
@@ -178,6 +177,7 @@ ul.add-menu-item-tabs li {
#nav-menu-header
,
#nav-menu-footer
{
padding
:
0
10px
;
background
:
#f5f5f5
;
}
#nav-menu-header
{
...
...
wp-admin/css/nav-menus-rtl.min.css
View file @
620a1808
This diff is collapsed.
Click to expand it.
wp-admin/css/nav-menus.css
View file @
620a1808
...
...
@@ -161,7 +161,6 @@ ul.add-menu-item-tabs li {
margin-right
:
20px
;
margin-top
:
-3px
;
width
:
100%
;
background
:
#f5f5f5
;
}
#menu-management
.menu-edit
{
...
...
@@ -178,6 +177,7 @@ ul.add-menu-item-tabs li {
#nav-menu-header
,
#nav-menu-footer
{
padding
:
0
10px
;
background
:
#f5f5f5
;
}
#nav-menu-header
{
...
...
wp-admin/css/nav-menus.min.css
View file @
620a1808
This diff is collapsed.
Click to expand it.
wp-admin/images/loading.gif
View replaced file @
8c02839a
View file @
620a1808
1.34 KB
|
W:
|
H:
1.34 KB
|
W:
|
H:
2-up
Swipe
Onion skin
wp-admin/includes/ajax-actions.php
View file @
620a1808
...
...
@@ -1214,6 +1214,8 @@ function wp_ajax_replyto_comment( $action ) {
if
(
wp_create_nonce
(
'unfiltered-html-comment'
)
!=
$_POST
[
'_wp_unfiltered_html_comment'
]
)
{
kses_remove_filters
();
// start with a clean slate
kses_init_filters
();
// set up the filters
remove_filter
(
'pre_comment_content'
,
'wp_filter_post_kses'
);
add_filter
(
'pre_comment_content'
,
'wp_filter_kses'
);
}
}
}
else
{
...
...
wp-admin/includes/class-wp-plugin-install-list-table.php
View file @
620a1808
...
...
@@ -634,11 +634,11 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
if
(
!
$compatible_php
||
!
$compatible_wp
)
{
echo
'<div class="notice inline notice-error notice-alt"><p>'
;
if
(
!
$compatible_php
&&
!
$compatible_wp
)
{
_e
(
'This plugin doesn’t work with your versions of WordPress and PHP.
'
);
_e
(
'This plugin doesn’t work with your versions of WordPress and PHP.'
);
if
(
current_user_can
(
'update_core'
)
&&
current_user_can
(
'update_php'
)
)
{
printf
(
/* translators: 1: "Update WordPress" screen URL, 2: "Update PHP" page URL */
__
(
'<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'
),
' '
.
__
(
'<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'
),
self_admin_url
(
'update-core.php'
),
esc_url
(
wp_get_update_php_url
()
)
);
...
...
@@ -646,32 +646,32 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
}
elseif
(
current_user_can
(
'update_core'
)
)
{
printf
(
/* translators: %s: "Update WordPress" screen URL */
__
(
'<a href="%s">Please update WordPress</a>.'
),
' '
.
__
(
'<a href="%s">Please update WordPress</a>.'
),
self_admin_url
(
'update-core.php'
)
);
}
elseif
(
current_user_can
(
'update_php'
)
)
{
printf
(
/* translators: %s: "Update PHP" page URL */
__
(
'<a href="%s">Learn more about updating PHP</a>.'
),
' '
.
__
(
'<a href="%s">Learn more about updating PHP</a>.'
),
esc_url
(
wp_get_update_php_url
()
)
);
wp_update_php_annotation
();
}
}
elseif
(
!
$compatible_wp
)
{
_e
(
'This plugin doesn’t work with your version of WordPress.
'
);
_e
(
'This plugin doesn’t work with your version of WordPress.'
);
if
(
current_user_can
(
'update_core'
)
)
{
printf
(
/* translators: %s: "Update WordPress" screen URL */
__
(
'<a href="%s">Please update WordPress</a>.'
),
' '
.
__
(
'<a href="%s">Please update WordPress</a>.'
),
self_admin_url
(
'update-core.php'
)
);
}
}
elseif
(
!
$compatible_php
)
{
_e
(
'This plugin doesn’t work with your version of PHP.
'
);
_e
(
'This plugin doesn’t work with your version of PHP.'
);
if
(
current_user_can
(
'update_php'
)
)
{
printf
(
/* translators: %s: "Update PHP" page URL */
__
(
'<a href="%s">Learn more about updating PHP</a>.'
),
' '
.
__
(
'<a href="%s">Learn more about updating PHP</a>.'
),
esc_url
(
wp_get_update_php_url
()
)
);
wp_update_php_annotation
();
...
...
wp-admin/includes/dashboard.php
View file @
620a1808
...
...
@@ -1646,6 +1646,7 @@ function wp_dashboard_php_nag() {
<?php
wp_update_php_annotation
();
wp_direct_php_update_button
();
}
/**
...
...
wp-admin/includes/misc.php
View file @
620a1808
...
...
@@ -2016,6 +2016,7 @@ final class WP_Privacy_Policy_Content {
* Checks if the user needs to update PHP.
*
* @since 5.1.0
* @since 5.1.1 Added the {@see 'wp_is_php_version_acceptable'} filter.
*
* @return array|false $response Array of PHP version data. False on failure.
*/
...
...
@@ -2054,5 +2055,22 @@ function wp_check_php_version() {
set_site_transient
(
'php_check_'
.
$key
,
$response
,
WEEK_IN_SECONDS
);
}
if
(
isset
(
$response
[
'is_acceptable'
]
)
&&
$response
[
'is_acceptable'
]
)
{
/**
* Filters whether the active PHP version is considered acceptable by WordPress.
*
* Returning false will trigger a PHP version warning to show up in the admin dashboard to administrators.
*
* This filter is only run if the wordpress.org Serve Happy API considers the PHP version acceptable, ensuring
* that this filter can only make this check stricter, but not loosen it.
*
* @since 5.1.1
*
* @param bool $is_acceptable Whether the PHP version is considered acceptable. Default true.
* @param string $version PHP version checked.
*/
$response
[
'is_acceptable'
]
=
(
bool
)
apply_filters
(
'wp_is_php_version_acceptable'
,
true
,
$version
);
}
return
$response
;
}
wp-admin/js/widgets/custom-html-widgets.js
View file @
620a1808
...
...
@@ -115,7 +115,7 @@ wp.customHtmlWidgets = ( function( $ ) {
control
.
contentUpdateBypassed
=
control
.
fields
.
content
.
is
(
document
.
activeElement
)
||
control
.
editor
&&
control
.
editor
.
codemirror
.
state
.
focused
||
0
!==
control
.
currentErrorAnnotations
.
length
;
if
(
!
control
.
contentUpdateBypassed
)
{
syncInput
=
control
.
syncContainer
.
find
(
'
.sync-input.content
'
);
control
.
fields
.
content
.
val
(
syncInput
.
val
()
)
.
trigger
(
'
change
'
)
;
control
.
fields
.
content
.
val
(
syncInput
.
val
()
);
}
},
...
...
wp-admin/js/widgets/custom-html-widgets.min.js
View file @
620a1808
wp
.
customHtmlWidgets
=
function
(
a
){
"
use strict
"
;
var
b
=
{
idBases
:[
"
custom_html
"
],
codeEditorSettings
:{},
l10n
:{
errorNotice
:{
singular
:
""
,
plural
:
""
}}};
return
b
.
CustomHtmlWidgetControl
=
Backbone
.
View
.
extend
({
events
:{},
initialize
:
function
(
a
){
var
c
=
this
;
if
(
!
a
.
el
)
throw
new
Error
(
"
Missing options.el
"
);
if
(
!
a
.
syncContainer
)
throw
new
Error
(
"
Missing options.syncContainer
"
);
Backbone
.
View
.
prototype
.
initialize
.
call
(
c
,
a
),
c
.
syncContainer
=
a
.
syncContainer
,
c
.
widgetIdBase
=
c
.
syncContainer
.
parent
().
find
(
"
.id_base
"
).
val
(),
c
.
widgetNumber
=
c
.
syncContainer
.
parent
().
find
(
"
.widget_number
"
).
val
(),
c
.
customizeSettingId
=
"
widget_
"
+
c
.
widgetIdBase
+
"
[
"
+
String
(
c
.
widgetNumber
)
+
"
]
"
,
c
.
$el
.
addClass
(
"
custom-html-widget-fields
"
),
c
.
$el
.
html
(
wp
.
template
(
"
widget-custom-html-control-fields
"
)({
codeEditorDisabled
:
b
.
codeEditorSettings
.
disabled
})),
c
.
errorNoticeContainer
=
c
.
$el
.
find
(
"
.code-editor-error-container
"
),
c
.
currentErrorAnnotations
=
[],
c
.
saveButton
=
c
.
syncContainer
.
add
(
c
.
syncContainer
.
parent
().
find
(
"
.widget-control-actions
"
)).
find
(
"
.widget-control-save, #savewidget
"
),
c
.
saveButton
.
addClass
(
"
custom-html-widget-save-button
"
),
c
.
fields
=
{
title
:
c
.
$el
.
find
(
"
.title
"
),
content
:
c
.
$el
.
find
(
"
.content
"
)},
_
.
each
(
c
.
fields
,
function
(
a
,
b
){
a
.
on
(
"
input change
"
,
function
(){
var
d
=
c
.
syncContainer
.
find
(
"
.sync-input.
"
+
b
);
d
.
val
()
!==
a
.
val
()
&&
(
d
.
val
(
a
.
val
()),
d
.
trigger
(
"
change
"
))}),
a
.
val
(
c
.
syncContainer
.
find
(
"
.sync-input.
"
+
b
).
val
())})},
updateFields
:
function
(){
var
a
,
b
=
this
;
b
.
fields
.
title
.
is
(
document
.
activeElement
)
||
(
a
=
b
.
syncContainer
.
find
(
"
.sync-input.title
"
),
b
.
fields
.
title
.
val
(
a
.
val
())),
b
.
contentUpdateBypassed
=
b
.
fields
.
content
.
is
(
document
.
activeElement
)
||
b
.
editor
&&
b
.
editor
.
codemirror
.
state
.
focused
||
0
!==
b
.
currentErrorAnnotations
.
length
,
b
.
contentUpdateBypassed
||
(
a
=
b
.
syncContainer
.
find
(
"
.sync-input.content
"
),
b
.
fields
.
content
.
val
(
a
.
val
()).
trigger
(
"
change
"
))},
updateErrorNotice
:
function
(
c
){
var
d
,
e
,
f
=
this
,
g
=
""
;
1
===
c
.
length
?
g
=
b
.
l10n
.
errorNotice
.
singular
.
replace
(
"
%d
"
,
"
1
"
):
c
.
length
>
1
&&
(
g
=
b
.
l10n
.
errorNotice
.
plural
.
replace
(
"
%d
"
,
String
(
c
.
length
))),
f
.
fields
.
content
[
0
].
setCustomValidity
&&
f
.
fields
.
content
[
0
].
setCustomValidity
(
g
),
wp
.
customize
&&
wp
.
customize
.
has
(
f
.
customizeSettingId
)?(
e
=
wp
.
customize
(
f
.
customizeSettingId
),
e
.
notifications
.
remove
(
"
htmlhint_error
"
),
0
!==
c
.
length
&&
e
.
notifications
.
add
(
"
htmlhint_error
"
,
new
wp
.
customize
.
Notification
(
"
htmlhint_error
"
,{
message
:
g
,
type
:
"
error
"
}))):
0
!==
c
.
length
?(
d
=
a
(
'
<div class="inline notice notice-error notice-alt"></div>
'
),
d
.
append
(
a
(
"
<p></p>
"
,{
text
:
g
})),
f
.
errorNoticeContainer
.
empty
(),
f
.
errorNoticeContainer
.
append
(
d
),
f
.
errorNoticeContainer
.
slideDown
(
"
fast
"
),
wp
.
a11y
.
speak
(
g
)):
f
.
errorNoticeContainer
.
slideUp
(
"
fast
"
)},
initializeEditor
:
function
(){
var
c
,
d
=
this
;
b
.
codeEditorSettings
.
disabled
||
(
c
=
_
.
extend
({},
b
.
codeEditorSettings
,{
onTabPrevious
:
function
(){
d
.
fields
.
title
.
focus
()},
onTabNext
:
function
(){
var
a
=
d
.
syncContainer
.
add
(
d
.
syncContainer
.
parent
().
find
(
"
.widget-position, .widget-control-actions
"
)).
find
(
"
:tabbable
"
);
a
.
first
().
focus
()},
onChangeLintingErrors
:
function
(
a
){
d
.
currentErrorAnnotations
=
a
},
onUpdateErrorNotice
:
function
(
a
){
d
.
saveButton
.
toggleClass
(
"
validation-blocked disabled
"
,
a
.
length
>
0
),
d
.
updateErrorNotice
(
a
)}}),
d
.
editor
=
wp
.
codeEditor
.
initialize
(
d
.
fields
.
content
,
c
),
a
(
d
.
editor
.
codemirror
.
display
.
lineDiv
).
attr
({
role
:
"
textbox
"
,
"
aria-multiline
"
:
"
true
"
,
"
aria-labelledby
"
:
d
.
fields
.
content
[
0
].
id
+
"
-label
"
,
"
aria-describedby
"
:
"
editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4
"
}),
a
(
"
#
"
+
d
.
fields
.
content
[
0
].
id
+
"
-label
"
).
on
(
"
click
"
,
function
(){
d
.
editor
.
codemirror
.
focus
()}),
d
.
fields
.
content
.
on
(
"
change
"
,
function
(){
this
.
value
!==
d
.
editor
.
codemirror
.
getValue
()
&&
d
.
editor
.
codemirror
.
setValue
(
this
.
value
)}),
d
.
editor
.
codemirror
.
on
(
"
change
"
,
function
(){
var
a
=
d
.
editor
.
codemirror
.
getValue
();
a
!==
d
.
fields
.
content
.
val
()
&&
d
.
fields
.
content
.
val
(
a
).
trigger
(
"
change
"
)}),
d
.
editor
.
codemirror
.
on
(
"
blur
"
,
function
(){
d
.
contentUpdateBypassed
&&
d
.
syncContainer
.
find
(
"
.sync-input.content
"
).
trigger
(
"
change
"
)}),
wp
.
customize
&&
d
.
editor
.
codemirror
.
on
(
"
keydown
"
,
function
(
a
,
b
){
var
c
=
27
;
c
===
b
.
keyCode
&&
b
.
stopPropagation
()}))}}),
b
.
widgetControls
=
{},
b
.
handleWidgetAdded
=
function
(
c
,
d
){
var
e
,
f
,
g
,
h
,
i
,
j
,
k
,
l
=
50
;
e
=
d
.
find
(
"
> .widget-inside > .form, > .widget-inside > form
"
),
f
=
e
.
find
(
"
> .id_base
"
).
val
(),
-
1
!==
b
.
idBases
.
indexOf
(
f
)
&&
(
h
=
e
.
find
(
"
.widget-id
"
).
val
(),
b
.
widgetControls
[
h
]
||
(
j
=
a
(
"
<div></div>
"
),
k
=
d
.
find
(
"
.widget-content:first
"
),
k
.
before
(
j
),
g
=
new
b
.
CustomHtmlWidgetControl
({
el
:
j
,
syncContainer
:
k
}),
b
.
widgetControls
[
h
]
=
g
,(
i
=
function
(){(
wp
.
customize
?
d
.
parent
().
hasClass
(
"
expanded
"
):
d
.
hasClass
(
"
open
"
))?
g
.
initializeEditor
():
setTimeout
(
i
,
l
)})()))},
b
.
setupAccessibleMode
=
function
(){
var
c
,
d
,
e
,
f
,
g
;
c
=
a
(
"
.editwidget > form
"
),
0
!==
c
.
length
&&
(
d
=
c
.
find
(
"
> .widget-control-actions > .id_base
"
).
val
(),
-
1
!==
b
.
idBases
.
indexOf
(
d
)
&&
(
f
=
a
(
"
<div></div>
"
),
g
=
c
.
find
(
"
> .widget-inside
"
),
g
.
before
(
f
),
e
=
new
b
.
CustomHtmlWidgetControl
({
el
:
f
,
syncContainer
:
g
}),
e
.
initializeEditor
()))},
b
.
handleWidgetUpdated
=
function
(
a
,
c
){
var
d
,
e
,
f
,
g
;
d
=
c
.
find
(
"
> .widget-inside > .form, > .widget-inside > form
"
),
g
=
d
.
find
(
"
> .id_base
"
).
val
(),
-
1
!==
b
.
idBases
.
indexOf
(
g
)
&&
(
e
=
d
.
find
(
"
> .widget-id
"
).
val
(),
f
=
b
.
widgetControls
[
e
],
f
&&
f
.
updateFields
())},
b
.
init
=
function
(
c
){
var
d
=
a
(
document
);
_
.
extend
(
b
.
codeEditorSettings
,
c
),
d
.
on
(
"
widget-added
"
,
b
.
handleWidgetAdded
),
d
.
on
(
"
widget-synced widget-updated
"
,
b
.
handleWidgetUpdated
),
a
(
function
(){
var
c
;
"
widgets
"
===
window
.
pagenow
&&
(
c
=
a
(
"
.widgets-holder-wrap:not(#available-widgets)
"
).
find
(
"
div.widget
"
),
c
.
one
(
"
click.toggle-widget-expanded
"
,
function
(){
var
c
=
a
(
this
);
b
.
handleWidgetAdded
(
new
jQuery
.
Event
(
"
widget-added
"
),
c
)}),
a
(
window
).
on
(
"
load
"
,
function
(){
b
.
setupAccessibleMode
()}))})},
b
}(
jQuery
);
\ No newline at end of file
wp
.
customHtmlWidgets
=
function
(
a
){
"
use strict
"
;
var
b
=
{
idBases
:[
"
custom_html
"
],
codeEditorSettings
:{},
l10n
:{
errorNotice
:{
singular
:
""
,
plural
:
""
}}};
return
b
.
CustomHtmlWidgetControl
=
Backbone
.
View
.
extend
({
events
:{},
initialize
:
function
(
a
){
var
c
=
this
;
if
(
!
a
.
el
)
throw
new
Error
(
"
Missing options.el
"
);
if
(
!
a
.
syncContainer
)
throw
new
Error
(
"
Missing options.syncContainer
"
);
Backbone
.
View
.
prototype
.
initialize
.
call
(
c
,
a
),
c
.
syncContainer
=
a
.
syncContainer
,
c
.
widgetIdBase
=
c
.
syncContainer
.
parent
().
find
(
"
.id_base
"
).
val
(),
c
.
widgetNumber
=
c
.
syncContainer
.
parent
().
find
(
"
.widget_number
"
).
val
(),
c
.
customizeSettingId
=
"
widget_
"
+
c
.
widgetIdBase
+
"
[
"
+
String
(
c
.
widgetNumber
)
+
"
]
"
,
c
.
$el
.
addClass
(
"
custom-html-widget-fields
"
),
c
.
$el
.
html
(
wp
.
template
(
"
widget-custom-html-control-fields
"
)({
codeEditorDisabled
:
b
.
codeEditorSettings
.
disabled
})),
c
.
errorNoticeContainer
=
c
.
$el
.
find
(
"
.code-editor-error-container
"
),
c
.
currentErrorAnnotations
=
[],
c
.
saveButton
=
c
.
syncContainer
.
add
(
c
.
syncContainer
.
parent
().
find
(
"
.widget-control-actions
"
)).
find
(
"
.widget-control-save, #savewidget
"
),
c
.
saveButton
.
addClass
(
"
custom-html-widget-save-button
"
),
c
.
fields
=
{
title
:
c
.
$el
.
find
(
"
.title
"
),
content
:
c
.
$el
.
find
(
"
.content
"
)},
_
.
each
(
c
.
fields
,
function
(
a
,
b
){
a
.
on
(
"
input change
"
,
function
(){
var
d
=
c
.
syncContainer
.
find
(
"
.sync-input.
"
+
b
);
d
.
val
()
!==
a
.
val
()
&&
(
d
.
val
(
a
.
val
()),
d
.
trigger
(
"
change
"
))}),
a
.
val
(
c
.
syncContainer
.
find
(
"
.sync-input.
"
+
b
).
val
())})},
updateFields
:
function
(){
var
a
,
b
=
this
;
b
.
fields
.
title
.
is
(
document
.
activeElement
)
||
(
a
=
b
.
syncContainer
.
find
(
"
.sync-input.title
"
),
b
.
fields
.
title
.
val
(
a
.
val
())),
b
.
contentUpdateBypassed
=
b
.
fields
.
content
.
is
(
document
.
activeElement
)
||
b
.
editor
&&
b
.
editor
.
codemirror
.
state
.
focused
||
0
!==
b
.
currentErrorAnnotations
.
length
,
b
.
contentUpdateBypassed
||
(
a
=
b
.
syncContainer
.
find
(
"
.sync-input.content
"
),
b
.
fields
.
content
.
val
(
a
.
val
()))},
updateErrorNotice
:
function
(
c
){
var
d
,
e
,
f
=
this
,
g
=
""
;
1
===
c
.
length
?
g
=
b
.
l10n
.
errorNotice
.
singular
.
replace
(
"
%d
"
,
"
1
"
):
c
.
length
>
1
&&
(
g
=
b
.
l10n
.
errorNotice
.
plural
.
replace
(
"
%d
"
,
String
(
c
.
length
))),
f
.
fields
.
content
[
0
].
setCustomValidity
&&
f
.
fields
.
content
[
0
].
setCustomValidity
(
g
),
wp
.
customize
&&
wp
.
customize
.
has
(
f
.
customizeSettingId
)?(
e
=
wp
.
customize
(
f
.
customizeSettingId
),
e
.
notifications
.
remove
(
"
htmlhint_error
"
),
0
!==
c
.
length
&&
e
.
notifications
.
add
(
"
htmlhint_error
"
,
new
wp
.
customize
.
Notification
(
"
htmlhint_error
"
,{
message
:
g
,
type
:
"
error
"
}))):
0
!==
c
.
length
?(
d
=
a
(
'
<div class="inline notice notice-error notice-alt"></div>
'
),
d
.
append
(
a
(
"
<p></p>
"
,{
text
:
g
})),
f
.
errorNoticeContainer
.
empty
(),
f
.
errorNoticeContainer
.
append
(
d
),
f
.
errorNoticeContainer
.
slideDown
(
"
fast
"
),
wp
.
a11y
.
speak
(
g
)):
f
.
errorNoticeContainer
.
slideUp
(
"
fast
"
)},
initializeEditor
:
function
(){
var
c
,
d
=
this
;
b
.
codeEditorSettings
.
disabled
||
(
c
=
_
.
extend
({},
b
.
codeEditorSettings
,{
onTabPrevious
:
function
(){
d
.
fields
.
title
.
focus
()},
onTabNext
:
function
(){
var
a
=
d
.
syncContainer
.
add
(
d
.
syncContainer
.
parent
().
find
(
"
.widget-position, .widget-control-actions
"
)).
find
(
"
:tabbable
"
);
a
.
first
().
focus
()},
onChangeLintingErrors
:
function
(
a
){
d
.
currentErrorAnnotations
=
a
},
onUpdateErrorNotice
:
function
(
a
){
d
.
saveButton
.
toggleClass
(
"
validation-blocked disabled
"
,
a
.
length
>
0
),
d
.
updateErrorNotice
(
a
)}}),
d
.
editor
=
wp
.
codeEditor
.
initialize
(
d
.
fields
.
content
,
c
),
a
(
d
.
editor
.
codemirror
.
display
.
lineDiv
).
attr
({
role
:
"
textbox
"
,
"
aria-multiline
"
:
"
true
"
,
"
aria-labelledby
"
:
d
.
fields
.
content
[
0
].
id
+
"
-label
"
,
"
aria-describedby
"
:
"
editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4
"
}),
a
(
"
#
"
+
d
.
fields
.
content
[
0
].
id
+
"
-label
"
).
on
(
"
click
"
,
function
(){
d
.
editor
.
codemirror
.
focus
()}),
d
.
fields
.
content
.
on
(
"
change
"
,
function
(){
this
.
value
!==
d
.
editor
.
codemirror
.
getValue
()
&&
d
.
editor
.
codemirror
.
setValue
(
this
.
value
)}),
d
.
editor
.
codemirror
.
on
(
"
change
"
,
function
(){
var
a
=
d
.
editor
.
codemirror
.
getValue
();
a
!==
d
.
fields
.
content
.
val
()
&&
d
.
fields
.
content
.
val
(
a
).
trigger
(
"
change
"
)}),
d
.
editor
.
codemirror
.
on
(
"
blur
"
,
function
(){
d
.
contentUpdateBypassed
&&
d
.
syncContainer
.
find
(
"
.sync-input.content
"
).
trigger
(
"
change
"
)}),
wp
.
customize
&&
d
.
editor
.
codemirror
.
on
(
"
keydown
"
,
function
(
a
,
b
){
var
c
=
27
;
c
===
b
.
keyCode
&&
b
.
stopPropagation
()}))}}),
b
.
widgetControls
=
{},
b
.
handleWidgetAdded
=
function
(
c
,
d
){
var
e
,
f
,
g
,
h
,
i
,
j
,
k
,
l
=
50
;
e
=
d
.
find
(
"
> .widget-inside > .form, > .widget-inside > form
"
),
f
=
e
.
find
(
"
> .id_base
"
).
val
(),
-
1
!==
b
.
idBases
.
indexOf
(
f
)
&&
(
h
=
e
.
find
(
"
.widget-id
"
).
val
(),
b
.
widgetControls
[
h
]
||
(
j
=
a
(
"
<div></div>
"
),
k
=
d
.
find
(
"
.widget-content:first
"
),
k
.
before
(
j
),
g
=
new
b
.
CustomHtmlWidgetControl
({
el
:
j
,
syncContainer
:
k
}),
b
.
widgetControls
[
h
]
=
g
,(
i
=
function
(){(
wp
.
customize
?
d
.
parent
().
hasClass
(
"
expanded
"
):
d
.
hasClass
(
"
open
"
))?
g
.
initializeEditor
():
setTimeout
(
i
,
l
)})()))},
b
.
setupAccessibleMode
=
function
(){
var
c
,
d
,
e
,
f
,
g
;
c
=
a
(
"
.editwidget > form
"
),
0
!==
c
.
length
&&
(
d
=
c
.
find
(
"
> .widget-control-actions > .id_base
"
).
val
(),
-
1
!==
b
.
idBases
.
indexOf
(
d
)
&&
(
f
=
a
(
"
<div></div>
"
),
g
=
c
.
find
(
"
> .widget-inside
"
),
g
.
before
(
f
),
e
=
new
b
.
CustomHtmlWidgetControl
({
el
:
f
,
syncContainer
:
g
}),
e
.
initializeEditor
()))},
b
.
handleWidgetUpdated
=
function
(
a
,
c
){
var
d
,
e
,
f
,
g
;
d
=
c
.
find
(
"
> .widget-inside > .form, > .widget-inside > form
"
),
g
=
d
.
find
(
"
> .id_base
"
).
val
(),
-
1
!==
b
.
idBases
.
indexOf
(
g
)
&&
(
e
=
d
.
find
(
"
> .widget-id
"
).
val
(),
f
=
b
.
widgetControls
[
e
],
f
&&
f
.
updateFields
())},
b
.
init
=
function
(
c
){
var
d
=
a
(
document
);
_
.
extend
(
b
.
codeEditorSettings
,
c
),
d
.
on
(
"
widget-added
"
,
b
.
handleWidgetAdded
),
d
.
on
(
"
widget-synced widget-updated
"
,
b
.
handleWidgetUpdated
),
a
(
function
(){
var
c
;
"
widgets
"
===
window
.
pagenow
&&
(
c
=
a
(
"
.widgets-holder-wrap:not(#available-widgets)
"
).
find
(
"
div.widget
"
),
c
.
one
(
"
click.toggle-widget-expanded
"
,
function
(){
var
c
=
a
(
this
);
b
.
handleWidgetAdded
(
new
jQuery
.
Event
(
"
widget-added
"
),
c
)}),
a
(
window
).
on
(
"
load
"
,
function
(){
b
.
setupAccessibleMode
()}))})},
b
}(
jQuery
);
\ No newline at end of file
wp-includes/comment.php
View file @
620a1808
...
...
@@ -3243,6 +3243,8 @@ function wp_handle_comment_submission( $comment_data ) {
)
{
kses_remove_filters
();
// start with a clean slate
kses_init_filters
();
// set up the filters
remove_filter
(
'pre_comment_content'
,
'wp_filter_post_kses'
);
add_filter
(
'pre_comment_content'
,
'wp_filter_kses'
);
}
}
}
else
{
...
...
wp-includes/formatting.php
View file @
620a1808
...
...
@@ -3004,10 +3004,12 @@ function wp_rel_nofollow_callback( $matches ) {
$atts
=
shortcode_parse_atts
(
$matches
[
1
]
);
$rel
=
'nofollow'
;
if
(
preg_match
(
'%href=["\']('
.
preg_quote
(
set_url_scheme
(
home_url
(),
'http'
)
)
.
')%i'
,
$text
)
||
preg_match
(
'%href=["\']('
.
preg_quote
(
set_url_scheme
(
home_url
(),
'https'
)
)
.
')%i'
,
$text
)
)
{
return
"<a
$text
>"
;
if
(
!
empty
(
$atts
[
'href'
]
)
)
{
if
(
in_array
(
strtolower
(
wp_parse_url
(
$atts
[
'href'
],
PHP_URL_SCHEME
)
),
array
(
'http'
,
'https'
),
true
)
)
{
if
(
strtolower
(
wp_parse_url
(
$atts
[
'href'
],
PHP_URL_HOST
)
)
===
strtolower
(
wp_parse_url
(
home_url
(),
PHP_URL_HOST
)
)
)
{
return
"<a
$text
>"
;
}
}
}
if
(
!
empty
(
$atts
[
'rel'
]
)
)
{
...
...
@@ -3020,11 +3022,11 @@ function wp_rel_nofollow_callback( $matches ) {
$html
=
''
;
foreach
(
$atts
as
$name
=>
$value
)
{
$html
.
=
"
{
$name
}
=
\"
$value
\"
"
;
$html
.
=
"
{
$name
}
=
\"
"
.
esc_attr
(
$value
)
.
'" '
;
}
$text
=
trim
(
$html
);
}
return
"<a
$text
rel=
\"
$rel
\"
>"
;
return
"<a
$text
rel=
\"
"
.
esc_attr
(
$rel
)
.
'">'
;
}
/**
...
...
wp-includes/functions.php
View file @
620a1808
...
...
@@ -6830,3 +6830,60 @@ function wp_update_php_annotation() {
);
echo
'</p>'
;
}
/**
* Gets the URL for directly updating the PHP version the site is running on.
*
* A URL will only be returned if the `WP_DIRECT_UPDATE_PHP_URL` environment variable is specified or
* by using the {@see 'wp_direct_php_update_url'} filter. This allows hosts to send users directly to
* the page where they can update PHP to a newer version.
*
* @since 5.1.1
*
* @return string URL for directly updating PHP or empty string.
*/
function
wp_get_direct_php_update_url
()
{
$direct_update_url
=
''
;
if
(
false
!==
getenv
(
'WP_DIRECT_UPDATE_PHP_URL'
)
)
{
$direct_update_url
=
getenv
(
'WP_DIRECT_UPDATE_PHP_URL'
);
}
/**
* Filters the URL for directly updating the PHP version the site is running on from the host.
*
* @since 5.1.1
*
* @param string $direct_update_url URL for directly updating PHP.
*/
$direct_update_url
=
apply_filters
(
'wp_direct_php_update_url'
,
$direct_update_url
);
return
$direct_update_url
;
}
/**
* Display a button directly linking to a PHP update process.
*
* This provides hosts with a way for users to be sent directly to their PHP update process.
*
* The button is only displayed if a URL is returned by `wp_get_direct_php_update_url()`.
*
* @since 5.1.1
*/
function
wp_direct_php_update_button
()
{
$direct_update_url
=
wp_get_direct_php_update_url
();
if
(
empty
(
$direct_update_url
)
)
{
return
;
}
echo
'<p class="button-container">'
;
printf
(
'<a class="button button-primary" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>'
,
esc_url
(
$direct_update_url
),
__
(
'Update PHP'
),
/* translators: accessibility text */
__
(
'(opens in a new tab)'
)
);
echo
'</p>'
;
}
wp-includes/js/comment-reply.js
View file @
620a1808
...
...
@@ -32,7 +32,7 @@ window.addComment = ( function( window ) {
* Check browser supports dataset.
* !! sets the variable to true if the property exists.
*/
var
supportsDataset
=
!!
document
.
body
.
dataset
;
var
supportsDataset
=
!!
document
.
documentElement
.
dataset
;
// For holding the cancel element.
var
cancelElement
;
...
...
@@ -46,11 +46,24 @@ window.addComment = ( function( window ) {
// The mutation observer.
var
observer
;
// Initialise the events.
init
();
if
(
cutsTheMustard
&&
document
.
readyState
!==
'
loading
'
)
{
ready
();
}
else
if
(
cutsTheMustard
)
{
window
.
addEventListener
(
'
DOMContentLoaded
'
,
ready
,
false
);
}
// Set up a MutationObserver to check for comments loaded late.
observeChanges
();
/**
* Sets up object variables after the DOM is ready.
*
* @since 5.1.1
*/
function
ready
()
{
// Initialise the events.
init
();
// Set up a MutationObserver to check for comments loaded late.
observeChanges
();
}
/**
* Add events to links classed .comment-reply-link.
...
...
@@ -163,6 +176,14 @@ window.addComment = ( function( window ) {
postId
=
getDataAttribute
(
replyLink
,
'
postid
'
),
follow
;
if
(
!
commId
||
!
parentId
||
!
respondId
||
!
postId
)
{
/*
* Theme or plugin defines own link via custom `wp_list_comments()` callback
* and calls `moveForm()` either directly or via a custom event hook.
*/
return
;
}
/*
* Third party comments systems can hook into this function via the global scope,
* therefore the click event needs to reference the global scope.
...
...
wp-includes/js/comment-reply.min.js
View file @
620a1808
window
.
addComment
=
function
(
a
){
function
b
(
a
){
if
(
s
&&
(
l
=
i
(
q
.
cancelReplyId
),
m
=
i
(
q
.
commentFormId
),
l
)){
l
.
addEventListener
(
"
touchstart
"
,
d
),
l
.
addEventListener
(
"
click
"
,
d
);
for
(
var
b
,
f
=
c
(
a
),
g
=
0
,
h
=
f
.
length
;
g
<
h
;
g
++
)
b
=
f
[
g
],
b
.
addEventListener
(
"
touchstart
"
,
e
),
b
.
addEventListener
(
"
click
"
,
e
)}}
function
c
(
a
){
var
b
,
c
=
q
.
commentReplyClass
;
return
a
&&
a
.
childNodes
||
(
a
=
p
),
b
=
p
.
getElementsByClassName
?
a
.
getElementsByClassName
(
c
):
a
.
querySelectorAll
(
"
.
"
+
c
)}
function
d
(
a
){
var
b
=
this
,
c
=
q
.
temporaryFormId
,
d
=
i
(
c
);
d
&&
n
&&
(
i
(
q
.
parentIdFieldId
).
value
=
"
0
"
,
d
.
parentNode
.
replaceChild
(
n
,
d
),
b
.
style
.
display
=
"
none
"
,
a
.
preventDefault
())}
function
e
(
b
){
var
c
,
d
=
this
,
e
=
h
(
d
,
"
belowelement
"
),
f
=
h
(
d
,
"
commentid
"
),
g
=
h
(
d
,
"
respondelement
"
),
i
=
h
(
d
,
"
postid
"
);
c
=
a
.
addComment
.
moveForm
(
e
,
f
,
g
,
i
),
!
1
===
c
&&
b
.
preventDefault
()}
function
f
(){
if
(
r
){
var
a
=
{
childList
:
!
0
,
subTree
:
!
0
};
o
=
new
r
(
g
),
o
.
observe
(
p
.
body
,
a
)}}
function
g
(
a
){
for
(
var
c
=
a
.
length
;
c
--
;)
if
(
a
[
c
].
addedNodes
.
length
)
return
void
b
()}
function
h
(
a
,
b
){
return
t
?
a
.
dataset
[
b
]:
a
.
getAttribute
(
"
data-
"
+
b
)}
function
i
(
a
){
return
p
.
getElementById
(
a
)}
function
j
(
b
,
c
,
d
,
e
){
var
f
=
i
(
b
);
n
=
i
(
d
);
var
g
,
h
,
j
,
o
=
i
(
q
.
parentIdFieldId
),
r
=
i
(
q
.
postIdFieldId
);
if
(
f
&&
n
&&
o
){
k
(
n
),
e
&&
r
&&
(
r
.
value
=
e
),
o
.
value
=
c
,
l
.
style
.
display
=
""
,
f
.
parentNode
.
insertBefore
(
n
,
f
.
nextSibling
),
l
.
onclick
=
function
(){
return
!
1
};
try
{
for
(
var
s
=
0
;
s
<
m
.
elements
.
length
;
s
++
)
if
(
g
=
m
.
elements
[
s
],
h
=!
1
,
"
getComputedStyle
"
in
a
?
j
=
a
.
getComputedStyle
(
g
):
p
.
documentElement
.
currentStyle
&&
(
j
=
g
.
currentStyle
),(
g
.
offsetWidth
<=
0
&&
g
.
offsetHeight
<=
0
||
"
hidden
"
===
j
.
visibility
)
&&
(
h
=!
0
),
"
hidden
"
!==
g
.
type
&&!
g
.
disabled
&&!
h
){
g
.
focus
();
break
}}
catch
(
t
){}
return
!
1
}}
function
k
(
a
){
var
b
=
q
.
temporaryFormId
,
c
=
i
(
b
);
c
||
(
c
=
p
.
createElement
(
"
div
"
),
c
.
id
=
b
,
c
.
style
.
display
=
"
none
"
,
a
.
parentNode
.
insertBefore
(
c
,
a
))}
var
l
,
m
,
n
,
o
,
p
=
a
.
document
,
q
=
{
commentReplyClass
:
"
comment-reply-link
"
,
cancelReplyId
:
"
cancel-comment-reply-link
"
,
commentFormId
:
"
commentform
"
,
temporaryFormId
:
"
wp-temp-form-div
"
,
parentIdFieldId
:
"
comment_parent
"
,
postIdFieldId
:
"
comment_post_ID
"
},
r
=
a
.
MutationObserver
||
a
.
WebKitMutationObserver
||
a
.
MozMutationObserver
,
s
=
"
querySelector
"
in
p
&&
"
addEventListener
"
in
a
,
t
=!!
p
.
body
.
dataset
;
return
b
(),
f
(),{
init
:
b
,
moveForm
:
j
}}(
window
);
\ No newline at end of file
window
.
addComment
=
function
(
a
){
function
b
(){
c
(),
g
()}
function
c
(
a
){
if
(
t
&&
(
m
=
j
(
r
.
cancelReplyId
),
n
=
j
(
r
.
commentFormId
),
m
)){
m
.
addEventListener
(
"
touchstart
"
,
e
),
m
.
addEventListener
(
"
click
"
,
e
);
for
(
var
b
,
c
=
d
(
a
),
g
=
0
,
h
=
c
.
length
;
g
<
h
;
g
++
)
b
=
c
[
g
],
b
.
addEventListener
(
"
touchstart
"
,
f
),
b
.
addEventListener
(
"
click
"
,
f
)}}
function
d
(
a
){
var
b
,
c
=
r
.
commentReplyClass
;
return
a
&&
a
.
childNodes
||
(
a
=
q
),
b
=
q
.
getElementsByClassName
?
a
.
getElementsByClassName
(
c
):
a
.
querySelectorAll
(
"
.
"
+
c
)}
function
e
(
a
){
var
b
=
this
,
c
=
r
.
temporaryFormId
,
d
=
j
(
c
);
d
&&
o
&&
(
j
(
r
.
parentIdFieldId
).
value
=
"
0
"
,
d
.
parentNode
.
replaceChild
(
o
,
d
),
b
.
style
.
display
=
"
none
"
,
a
.
preventDefault
())}
function
f
(
b
){
var
c
,
d
=
this
,
e
=
i
(
d
,
"
belowelement
"
),
f
=
i
(
d
,
"
commentid
"
),
g
=
i
(
d
,
"
respondelement
"
),
h
=
i
(
d
,
"
postid
"
);
e
&&
f
&&
g
&&
h
&&
(
c
=
a
.
addComment
.
moveForm
(
e
,
f
,
g
,
h
),
!
1
===
c
&&
b
.
preventDefault
())}
function
g
(){
if
(
s
){
var
a
=
{
childList
:
!
0
,
subTree
:
!
0
};
p
=
new
s
(
h
),
p
.
observe
(
q
.
body
,
a
)}}
function
h
(
a
){
for
(
var
b
=
a
.
length
;
b
--
;)
if
(
a
[
b
].
addedNodes
.
length
)
return
void
c
()}
function
i
(
a
,
b
){
return
u
?
a
.
dataset
[
b
]:
a
.
getAttribute
(
"
data-
"
+
b
)}
function
j
(
a
){
return
q
.
getElementById
(
a
)}
function
k
(
b
,
c
,
d
,
e
){
var
f
=
j
(
b
);
o
=
j
(
d
);
var
g
,
h
,
i
,
k
=
j
(
r
.
parentIdFieldId
),
p
=
j
(
r
.
postIdFieldId
);
if
(
f
&&
o
&&
k
){
l
(
o
),
e
&&
p
&&
(
p
.
value
=
e
),
k
.
value
=
c
,
m
.
style
.
display
=
""
,
f
.
parentNode
.
insertBefore
(
o
,
f
.
nextSibling
),
m
.
onclick
=
function
(){
return
!
1
};
try
{
for
(
var
s
=
0
;
s
<
n
.
elements
.
length
;
s
++
)
if
(
g
=
n
.
elements
[
s
],
h
=!
1
,
"
getComputedStyle
"
in
a
?
i
=
a
.
getComputedStyle
(
g
):
q
.
documentElement
.
currentStyle
&&
(
i
=
g
.
currentStyle
),(
g
.
offsetWidth
<=
0
&&
g
.
offsetHeight
<=
0
||
"
hidden
"
===
i
.
visibility
)
&&
(
h
=!
0
),
"
hidden
"
!==
g
.
type
&&!
g
.
disabled
&&!
h
){
g
.
focus
();
break
}}
catch
(
t
){}
return
!
1
}}
function
l
(
a
){
var
b
=
r
.
temporaryFormId
,
c
=
j
(
b
);
c
||
(
c
=
q
.
createElement
(
"
div
"
),
c
.
id
=
b
,
c
.
style
.
display
=
"
none
"
,
a
.
parentNode
.
insertBefore
(
c
,
a
))}
var
m
,
n
,
o
,
p
,
q
=
a
.
document
,
r
=
{
commentReplyClass
:
"
comment-reply-link
"
,
cancelReplyId
:
"
cancel-comment-reply-link
"
,
commentFormId
:
"
commentform
"
,
temporaryFormId
:
"
wp-temp-form-div
"
,
parentIdFieldId
:
"
comment_parent
"
,
postIdFieldId
:
"
comment_post_ID
"
},
s
=
a
.
MutationObserver
||
a
.
WebKitMutationObserver
||
a
.
MozMutationObserver
,
t
=
"
querySelector
"
in
q
&&
"
addEventListener
"
in
a
,
u
=!!
q
.
documentElement
.
dataset
;
return
t
&&
"
loading
"
!==
q
.
readyState
?
b
():
t
&&
a
.
addEventListener
(
"
DOMContentLoaded
"
,
b
,
!
1
),{
init
:
c
,
moveForm
:
k
}}(
window
);
\ No newline at end of file
wp-includes/ms-site.php
View file @
620a1808
...
...
@@ -52,23 +52,21 @@ function wp_insert_site( array $data ) {
'lang_id'
=>
0
,
);
// Extract the passed arguments that may be relevant for site initialization.
$args
=
array_diff_key
(
$data
,
$defaults
);
if
(
isset
(
$args
[
'site_id'
]
)
)
{
unset
(
$args
[
'site_id'
]
);
}
$data
=
wp_prepare_site_data
(
$data
,
$defaults
);
if
(
is_wp_error
(
$data
)
)
{
return
$data
;
$prepared_data
=
wp_prepare_site_data
(
$data
,
$defaults
);
if
(
is_wp_error
(
$prepared_data
)
)
{
return
$prepared_data
;
}
if
(
false
===
$wpdb
->
insert
(
$wpdb
->
blogs
,
$data
)
)
{
if
(
false
===
$wpdb
->
insert
(
$wpdb
->
blogs
,
$
prepared_
data
)
)
{
return
new
WP_Error
(
'db_insert_error'
,
__
(
'Could not insert site into the database.'
),
$wpdb
->
last_error
);
}
$new_site
=
get_site
(
$wpdb
->
insert_id
);
if
(
!
$new_site
)
{
return
new
WP_Error
(
'get_site_error'
,
__
(
'Could not retrieve site data.'
)
);
}
clean_blog_cache
(
$new_site
);
/**
...
...
@@ -80,6 +78,12 @@ function wp_insert_site( array $data ) {
*/
do_action
(
'wp_insert_site'
,
$new_site
);
// Extract the passed arguments that may be relevant for site initialization.
$args
=
array_diff_key
(
$data
,
$defaults
);
if
(
isset
(
$args
[
'site_id'
]
)
)
{
unset
(
$args
[
'site_id'
]
);
}
/**
* Fires when a site's initialization routine should be executed.
*
...
...
@@ -95,6 +99,16 @@ function wp_insert_site( array $data ) {
$user_id
=
!
empty
(
$args
[
'user_id'
]
)
?
$args
[
'user_id'
]
:
0
;
$meta
=
!
empty
(
$args
[
'options'
]
)
?
$args
[
'options'
]
:
array
();
// WPLANG was passed with `$meta` to the `wpmu_new_blog` hook prior to 5.1.0.
if
(
!
array_key_exists
(
'WPLANG'
,
$meta
)
)
{
$meta
[
'WPLANG'
]
=
get_network_option
(
$new_site
->
network_id
,
'WPLANG'
);
}
// Rebuild the data expected by the `wpmu_new_blog` hook prior to 5.1.0 using whitelisted keys.
// The `$site_data_whitelist` matches the one used in `wpmu_create_blog()`.
$site_data_whitelist
=
array
(
'public'
,
'archived'
,
'mature'
,
'spam'
,
'deleted'
,
'lang_id'
);
$meta
=
array_merge
(
array_intersect_key
(
$data
,
array_flip
(
$site_data_whitelist
)
),
$meta
);
/**
* Fires immediately after a new site is created.
*
...
...
wp-includes/version.php
View file @
620a1808
...
...
@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version
=
'5.1'
;
$wp_version
=
'5.1
.1
'
;
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment