Weston Ruter
e914c0447c
Customize: Add missing filter docs in WP_Customize_Nav_Menu_Item_Setting::sanitize()
.
...
Props dlh.
Fixes #42257 .
Built from https://develop.svn.wordpress.org/trunk@41894
git-svn-id: http://core.svn.wordpress.org/trunk@41728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 04:57:50 +00:00
Weston Ruter
43b4a2577d
Customize: Improve theme browsing UI on small screens.
...
Props Mahvash-Fatima, melchoyce, celloexpressions.
See #37661 .
Fixes #42215 .
Built from https://develop.svn.wordpress.org/trunk@41893
git-svn-id: http://core.svn.wordpress.org/trunk@41727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 04:06:47 +00:00
Weston Ruter
41bb2125b0
Customize: Remove incorrect test assertions for the post_date
of customization drafts.
...
Amends [41887].
See #42220 .
Built from https://develop.svn.wordpress.org/trunk@41892
git-svn-id: http://core.svn.wordpress.org/trunk@41726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 02:41:49 +00:00
Weston Ruter
b4edf21599
Media: Add missing mediaelement-migrate.js
script to get uglified.
...
Amends [41877].
See #42189 , #39686 .
Built from https://develop.svn.wordpress.org/trunk@41891
git-svn-id: http://core.svn.wordpress.org/trunk@41725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 02:26:48 +00:00
Weston Ruter
7ee77760af
Widgets: Use a foreach
loop instead of The Loop to iterate over posts in Recent Posts widget to avoid needing to reset a polluted global $post
.
...
Props welcher, westonruter.
Amends [14607].
See #12320 .
Fixes #37312 .
Built from https://develop.svn.wordpress.org/trunk@41890
git-svn-id: http://core.svn.wordpress.org/trunk@41724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 00:34:46 +00:00
Weston Ruter
dce5306603
Media: Use user locale as ME.js language in admin and add mejsL10n
inline script before mediaelement-core
so WP-exported translation strings are used.
...
See #39686 .
Fixes #42241 .
Built from https://develop.svn.wordpress.org/trunk@41889
git-svn-id: http://core.svn.wordpress.org/trunk@41723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 00:08:45 +00:00
David A. Kennedy
b6539fb5a0
Twenty Seventeen: Fix double bottom-margins below embeds
...
Corrects an issue where both the containing paragraph and embed had bottom margins, causing unwanted extra space.
Props westonruter.
Fixes #42118 .
Built from https://develop.svn.wordpress.org/trunk@41888
git-svn-id: http://core.svn.wordpress.org/trunk@41722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-17 22:50:51 +00:00
Weston Ruter
bd9d1d9178
Customize: Allow post/page stubs to be edited in WP Admin as "customization drafts" when changeset is saved as draft or scheduled.
...
* Update stubs to have draft status when changeset is saved as draft, instead of preventing auto-draft garbage collection by giving them a far-future `post_date`.
* Show notice in publish metabox when editing a customization draft indicating that it will be published automatically with its changeset; a link to Customizer is included.
* Include a new "Customization Draft" display post state in the post list table.
* Disconnect stubs from their changesets when they are updated with a status other than "Draft".
* Trash customization drafts when their related changeset is trashed or deleted.
* Add a `_customize_changeset_uuid` postmeta to stubs to link them with their associated changeset.
* Include `customize_changeset_uuid` as context when requesting to insert a new auto-draft.
Props westonruter, melchoyce.
See #39896 , #39752 , #34923 .
Fixes #42220 .
Built from https://develop.svn.wordpress.org/trunk@41887
git-svn-id: http://core.svn.wordpress.org/trunk@41721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-17 20:15:52 +00:00
Weston Ruter
955d5b0ab1
Widgets: Prevent MediaElement.js player from overflowing sidebar in Audio widget.
...
Props bradyvercher.
See #39686 .
Fixes #42244 .
Built from https://develop.svn.wordpress.org/trunk@41886
git-svn-id: http://core.svn.wordpress.org/trunk@41720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 23:02:47 +00:00
Felix Arntz
021afced82
Role/Capability: Prevent a fatal error when checking a language capability early or in the frontend.
...
The meta capabilities `install_languages` and `update_languages` rely on the admin function `wp_can_install_language_pack()`. That function in turn relies on `request_filesystem_credentials()`, so it needs to be ensured that this function is available as well.
Fixes #42230 .
Built from https://develop.svn.wordpress.org/trunk@41885
git-svn-id: http://core.svn.wordpress.org/trunk@41719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 22:54:57 +00:00
Felix Arntz
3f8621b632
Multisite: Revert [41698] and [41743].
...
In order for `get_site_by()` to be truly beneficial, caching in `WP_Site_Query` needs to be improved to account for common use-cases and have them be invalidated less aggressively.
See #40180 , #40228 , #42091 .
Built from https://develop.svn.wordpress.org/trunk@41884
git-svn-id: http://core.svn.wordpress.org/trunk@41718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 22:35:47 +00:00
Felix Arntz
18789739c1
Multisite: Revert [41719].
...
While `get_site_by()` makes sense as a more explicit and less complex replacement for `get_blog_details()`, it is not ready yet in terms of caching, where it currently falls short of the older function under specific circumstances.
See #40180 , #40228 .
Built from https://develop.svn.wordpress.org/trunk@41883
git-svn-id: http://core.svn.wordpress.org/trunk@41717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 22:29:48 +00:00
Helen Hou-Sandí
bb66a52a14
Code Editors: Minor style improvements.
...
props melchoyce.
see #42214 .
Built from https://develop.svn.wordpress.org/trunk@41882
git-svn-id: http://core.svn.wordpress.org/trunk@41716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 21:36:48 +00:00
Boone Gorges
af960204b6
Taxonomy: Add note about $number
inconsistency to WP_Term_Query
docs.
...
Fixes #41796 .
Built from https://develop.svn.wordpress.org/trunk@41881
git-svn-id: http://core.svn.wordpress.org/trunk@41715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:38:48 +00:00
Boone Gorges
9f73875705
Don't force distinct term queries when specifying number
and object_ids
.
...
This reverts [41377], which caused performance problems on sites with a large
number of terms.
See #41796 .
Built from https://develop.svn.wordpress.org/trunk@41880
git-svn-id: http://core.svn.wordpress.org/trunk@41714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:35:47 +00:00
John Blackbourn
24783cfc3e
Media: Allow the unminified mediaelement script to be enqueued when SCRIPT_DEBUG
is true.
...
Props dsawardekar
Fixes #42229
Built from https://develop.svn.wordpress.org/trunk@41879
git-svn-id: http://core.svn.wordpress.org/trunk@41713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:15:47 +00:00
Andrea Fercia
575e60e96c
Administration: Improve consistency of the "not found" strings.
...
Partially reverts [41608] restoring the original strings without the word `query`.
See #37430 .
Fixes #42231 .
Built from https://develop.svn.wordpress.org/trunk@41878
git-svn-id: http://core.svn.wordpress.org/trunk@41712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:14:48 +00:00
Weston Ruter
2e602a8560
Media: Add MediaElement.js 2.2 back-compat for MediaElement.js 4.2
...
* Introduces `mediaelement-migrate.js`.
* Upgrades ME.js from 4.2.5-74e01a40 to 4.2.6-78496d1.
Props rafa8626, bradyvercher.
See #39686 .
Fixes #42189 .
Built from https://develop.svn.wordpress.org/trunk@41877
git-svn-id: http://core.svn.wordpress.org/trunk@41711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:07:52 +00:00
Andrea Fercia
4085a1b266
Accessibility: Improve the File Editors interstitial warning.
...
The warning displayed upon first visit on the File Editors introduced in [41774]
needs to be the only perceivable content in the page for users of assistive
technologies. It looks like a modal but it's not exactly an ARIA dialog, not an
ARIA alert either, and needs some special treatment.
- constrains tabbing within the modal
- uses `wp.a11y.speak()` to make screen readers announce the modal message
- hides all the other page content from assistive technologies using `aria-hidden="true"`
This way, even if users miss the speak message, the warning is actually the only
perceivable content in the page.
Fixes #42110 .
Built from https://develop.svn.wordpress.org/trunk@41876
git-svn-id: http://core.svn.wordpress.org/trunk@41710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 17:59:52 +00:00
Jeremy Felt
e362e61ae5
Multisite: Explicitly globalize global variables in ms-settings.php
.
...
Explicitly globalize and document `$domain`, `$path`, `$site_id`, and `$public` in `ms-settings.php.
Props csloisel, danielbachhuber.
Fixes #39419 .
Built from https://develop.svn.wordpress.org/trunk@41875
git-svn-id: http://core.svn.wordpress.org/trunk@41709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 17:06:48 +00:00
Sergey Biryukov
a88704d026
Administration: Remove punctuation from the link text in "Site Address" option description.
...
Props Presskopp.
Fixes #42190 .
Built from https://develop.svn.wordpress.org/trunk@41874
git-svn-id: http://core.svn.wordpress.org/trunk@41708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 14:02:50 +00:00
Weston Ruter
862e8c1807
Customize: Use keydown
instead of keyup
for listening for enter key to add page stub via dropdown-pages control.
...
Fixes issue with Japanese input.
Props miyauchi.
Amends [38906].
See #34923 .
Fixes #42233 .
Built from https://develop.svn.wordpress.org/trunk@41873
git-svn-id: http://core.svn.wordpress.org/trunk@41707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 07:57:48 +00:00
Weston Ruter
4150e805d7
Widgets: Update preview for Gallery widget when one of its attachments is modified in the media modal, outside the customized state.
...
* Ensure that changes to captions are shown in preview when modified in media modal.
* Also keep `wp.customize.widgetsPreview.renderedWidgets` updated when widgets are added or removed.
See #41914 , #37887 , #40403 .
Fixes #41979 .
Built from https://develop.svn.wordpress.org/trunk@41872
git-svn-id: http://core.svn.wordpress.org/trunk@41706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 06:46:48 +00:00
Weston Ruter
94f9c7e789
Customize: Prevent theme details modal from being clipped in Safari.
...
Props afercia.
See #42052 , #37661 .
Built from https://develop.svn.wordpress.org/trunk@41871
git-svn-id: http://core.svn.wordpress.org/trunk@41705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 04:41:45 +00:00
Sergey Biryukov
c79492540a
Build/Test Tools: Pass correct $message
argument to WP_UnitTestCase::setExpectedException()
in Tests_Ajax_CompressionTest::test_logged_out()
and Tests_Ajax_TagSearch::test_no_results()
.
...
PHPUnit 6.4.1 and earlier versions ignored the `'0'` value, causing the issue to go unnoticed.
Fixes #42232 .
Built from https://develop.svn.wordpress.org/trunk@41870
git-svn-id: http://core.svn.wordpress.org/trunk@41704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 04:06:49 +00:00
Weston Ruter
2e184426c0
Customize: Add 'save-request-params'
event on wp.customize
for plugins to inject/modify params in save
requests.
...
Allows feature plugins, for example, to supply a `customize_changeset_title` param instead of having to wrap `wp.customize.previewer.query`.
Props dlh.
Fixes #42206 .
Built from https://develop.svn.wordpress.org/trunk@41869
git-svn-id: http://core.svn.wordpress.org/trunk@41703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 22:42:48 +00:00
Weston Ruter
12f647679b
Widgets: Rename "Custom Menu" widget to "Navigation Menu".
...
Props gk.loveweb, ChrisHardie, ajayghaghretiya1, melchoyce.
Fixes #40442 .
Built from https://develop.svn.wordpress.org/trunk@41868
git-svn-id: http://core.svn.wordpress.org/trunk@41702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 22:23:47 +00:00
Sergey Biryukov
46ff957961
Widgets: Move empty title checks out of the apply_filters( 'widget_title' )
calls for clarity.
...
See #42226 .
Built from https://develop.svn.wordpress.org/trunk@41867
git-svn-id: http://core.svn.wordpress.org/trunk@41701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 21:43:47 +00:00
Sergey Biryukov
0ae79ece9f
Widgets: In WP_Widget_Media
, apply widget_title
filter regardless of whether the title is empty, same as other widgets do.
...
Props Bsop.
Fixes #42226 .
Built from https://develop.svn.wordpress.org/trunk@41866
git-svn-id: http://core.svn.wordpress.org/trunk@41700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 21:29:51 +00:00
Weston Ruter
ad8c9f0170
File Editor: Move inline to external style to fix extra padding in RTL page direction.
...
Props afercia.
Fixes #42221 .
Built from https://develop.svn.wordpress.org/trunk@41865
git-svn-id: http://core.svn.wordpress.org/trunk@41699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 05:51:49 +00:00
Weston Ruter
191beede5e
File Editor: Prevent the scrolling of current-file into view to also change initially-focused element in Chrome.
...
Props afercia.
Fixes #24048 .
Built from https://develop.svn.wordpress.org/trunk@41864
git-svn-id: http://core.svn.wordpress.org/trunk@41698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 05:37:51 +00:00
Weston Ruter
8562e4bfac
Customize: Fix visibility of theme browser header in Safari.
...
Props benoitchantre, afercia.
See #42052 , #37661 .
Built from https://develop.svn.wordpress.org/trunk@41863
git-svn-id: http://core.svn.wordpress.org/trunk@41697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 04:59:10 +00:00
Felix Arntz
e4550efbb7
Multisite: Return get_current_blog_id()
value instead of hard-coded 1 in get_main_site_id()
for non-multisite environments.
...
See #41936 .
Built from https://develop.svn.wordpress.org/trunk@41862
git-svn-id: http://core.svn.wordpress.org/trunk@41696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-14 22:46:48 +00:00
Felix Arntz
5ea3d62192
Multisite: Take WP_Network::$blog_id
into account in get_main_site_id()
.
...
When the `WP_Network::$blog_id` property is set manually, for example in the multisite bootstrap process, `get_main_site_id()` should use that value instead of running its own logic. The main logic for the function was therefore moved into the internal `WP_Network::get_main_site_id()` method, which is now being accessed by the function through the magic property handling for `WP_Network::$blog_id` (and its equivalent `WP_Network::$site_id`).
Props spacedmonkey, jeremyfelt.
Fixes #41936 .
Built from https://develop.svn.wordpress.org/trunk@41861
git-svn-id: http://core.svn.wordpress.org/trunk@41695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-14 22:42:54 +00:00
Weston Ruter
24d304a0a1
Customize: Fix positioning of device-previewed window when publish settings are open.
...
* Update date control padding.
* Collapse publish settings section when opening panes for available widgets or nav menus.
* Remove save and cog buttons in mobile preview only mode.
* Move definition of `wp.customize.previewedDevice` to `wp.customize.state('previewedDevice')` for centralization, maintaining old alias.
* Remove unused CSS because the section is inside form now.
Props sayedwp, westonruter.
See #39896 .
Fixes #42027 , #42199 .
Built from https://develop.svn.wordpress.org/trunk@41860
git-svn-id: http://core.svn.wordpress.org/trunk@41694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 21:21:55 +00:00
Helen Hou-Sandí
e48b16d96a
File editor warning: Add a "Go back" button.
...
see #42100 , #31779 .
Built from https://develop.svn.wordpress.org/trunk@41859
git-svn-id: http://core.svn.wordpress.org/trunk@41693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 20:56:50 +00:00
Weston Ruter
d975dccac9
Code Editor: Fix syntax error in PHP 5.2 and PHP 5.3 after [41855].
...
See #41871 .
Built from https://develop.svn.wordpress.org/trunk@41858
git-svn-id: http://core.svn.wordpress.org/trunk@41692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 19:43:49 +00:00
Mel Choyce
e5db49d607
Settings: Widen time/day input fields on General Settings page, and move the preview onto the next line.
...
Props desrosj, afercia.
Fixes #41603 .
Built from https://develop.svn.wordpress.org/trunk@41857
git-svn-id: http://core.svn.wordpress.org/trunk@41691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 18:39:48 +00:00
Adam Silverstein
59c3c7ae14
Media Grid: Fix escape key sometimes failing to close details modal.
...
Fix an issue where the escape key would no longer close the attachment details modal after attempting to navigate over the navigation boundaries (by clicking the left arrow key on the first media item or clicking the right arrow key on the last media item). Remove a focus blur which caused the underlying Backbone View to not receive the 'keydown' event.
Props subrataemfluence, afercia.
Fixes #42180 .
Built from https://develop.svn.wordpress.org/trunk@41856
git-svn-id: http://core.svn.wordpress.org/trunk@41690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 18:21:49 +00:00
Weston Ruter
22ecf792b5
Code Editor: Add unit tests for wp_enqueue_code_editor()
and WP_Widget_Custom_HTML
.
...
Props ryotsun.
See #12423 .
Fixes #41871 .
Built from https://develop.svn.wordpress.org/trunk@41855
git-svn-id: http://core.svn.wordpress.org/trunk@41689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 17:58:46 +00:00
Mel Choyce
af6d136163
Improve File Credentials / Code Editor modal responsive styles.
...
Makes the modal full-width and height.
Props sami.keijonen, Mirucon, helen.
Fixes #42111 .
Built from https://develop.svn.wordpress.org/trunk@41854
git-svn-id: http://core.svn.wordpress.org/trunk@41688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 14:39:54 +00:00
Weston Ruter
8af4e6e3f9
Customize: Fix positioning of Preview button in mobile.
...
Props Mahvash-Fatima.
Fixes #42172 .
Built from https://develop.svn.wordpress.org/trunk@41853
git-svn-id: http://core.svn.wordpress.org/trunk@41687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 08:23:50 +00:00
Weston Ruter
d44acf01dc
Code Editor: Remove keeping track of wp.codeEditor
instances since unused and no removal of instances upon deletion, leading to memory leak.
...
See #12423 .
Built from https://develop.svn.wordpress.org/trunk@41852
git-svn-id: http://core.svn.wordpress.org/trunk@41686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 04:34:52 +00:00
Weston Ruter
0659de4e21
File Editors: Display list of theme/plugin files in scrollable directory tree.
...
Props WraithKenny, afercia, melchoyce, westonruter.
Amends [41721].
Fixes #24048 .
Built from https://develop.svn.wordpress.org/trunk@41851
git-svn-id: http://core.svn.wordpress.org/trunk@41685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 02:39:47 +00:00
Gary Pendergast
95cfb7f5e4
Login: Swap bloginfo()
usage for get_bloginfo()
.
...
[41843] introduced a use of `bloginfo()`, where it should be using `get_bloginfo()`.
Props dlh.
Fixes #34625 .
Built from https://develop.svn.wordpress.org/trunk@41850
git-svn-id: http://core.svn.wordpress.org/trunk@41684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 02:10:48 +00:00
Boone Gorges
a1879766ed
Bump 'posts' query cache incrementor when modifying postmeta.
...
This ensures that the `get_pages()` query cache doesn't go stale when
postmeta is modified.
Props spacedmonkey.
Fixes #40669 .
Built from https://develop.svn.wordpress.org/trunk@41849
git-svn-id: http://core.svn.wordpress.org/trunk@41683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 15:20:47 +00:00
Boone Gorges
0fce77da25
Invalidate comment query cache when modifying comment meta.
...
Comment queries are sensitive to comment meta due to the `meta_query`
parameter, so the cache must be invalidated when comment meta is changed,
added, or deleted.
Props spacedmonkey.
See #40669 .
Built from https://develop.svn.wordpress.org/trunk@41848
git-svn-id: http://core.svn.wordpress.org/trunk@41682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 14:59:47 +00:00
Weston Ruter
3bfe1f6c21
Post WordPress 4.9 Beta 2 version bump.
...
Built from https://develop.svn.wordpress.org/trunk@41847
git-svn-id: http://core.svn.wordpress.org/trunk@41681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 06:25:48 +00:00
Weston Ruter
2601b16e76
WordPress 4.9 Beta 2.
...
Built from https://develop.svn.wordpress.org/trunk@41846
git-svn-id: http://core.svn.wordpress.org/trunk@41680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 05:43:47 +00:00
Weston Ruter
39a2308a94
Customize: Prevent showing confirmation dialog when leaving Customizer after previewing theme switch without making any changes.
...
Fixes #42173 .
Built from https://develop.svn.wordpress.org/trunk@41845
git-svn-id: http://core.svn.wordpress.org/trunk@41679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 05:17:49 +00:00