Commit Graph

37649 Commits

Author SHA1 Message Date
Mel Choyce
f7aa0e24a7 About Page: Update the blurb in "Warning: Potential Danger Ahead!" to be more accurate.
Props transl8or, karmatosed, chanthaboune.
See #42087.

Built from https://develop.svn.wordpress.org/trunk@42044


git-svn-id: http://core.svn.wordpress.org/trunk@41878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 20:58:50 +00:00
Felix Arntz
82c6a301f2 Multisite: Pass network object instead of ID to pre_get_main_site_id.
In the original function introduced in [41380], and subsequently [41861], only the network ID was passed to the new `pre_get_main_site_id` filter. In order to make give quick access to other network properties, it was decided to pass the whole object instead. The changeset includes an additional test.

Fixes #29684.

Built from https://develop.svn.wordpress.org/trunk@42043


git-svn-id: http://core.svn.wordpress.org/trunk@41877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 19:56:47 +00:00
Weston Ruter
ca84147401 Customize: Allow 0:00-0:59 in date/time control when 24-hour time used.
* Let min hour be 0 and max be 23 in 24-hour time; let min hour be 1 and max be 12 in 12-hour time.
* Show error notification when an invalid date value is provided, not just when not a future date.
* Fix translation of custom validity message.
* Start checking for validity after all inputs have been initially populated.
* Remove support for being able to enter 24:00.
* Cease forcing date input elements from being casted to integers, to allow for invalid inputs to be detected.

Props westonruter, Presskopp, peterwilsoncc, atachibana for testing.
See #39896, #28721.
Fixes #42373.

Built from https://develop.svn.wordpress.org/trunk@42042


git-svn-id: http://core.svn.wordpress.org/trunk@41876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 16:40:47 +00:00
Weston Ruter
285c6a57c8 Tests: Remove references to deleted JS files in QUnit tests.
Amends [41570], [40584].
See #41755, #40690.

Built from https://develop.svn.wordpress.org/trunk@42041


git-svn-id: http://core.svn.wordpress.org/trunk@41875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 04:06:48 +00:00
Weston Ruter
fbb0b8bc8f Customize: Debounce requests for theme searches and the updating of the resulting filter count.
Props celloexpressions.
See #37661.
Fixes #42343.

Built from https://develop.svn.wordpress.org/trunk@42040


git-svn-id: http://core.svn.wordpress.org/trunk@41874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 03:57:52 +00:00
Weston Ruter
9a18c87e0c Customize: Fix phpdoc for params in WP_Customize_Manager::add_section().
Amends [40804].
See #39671.
Fixes #42372.

Built from https://develop.svn.wordpress.org/trunk@42039


git-svn-id: http://core.svn.wordpress.org/trunk@41873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-29 03:22:49 +00:00
Weston Ruter
5fc9fddccc Customize: Fix interface alignment between Setting and Control, adding defaults to wp.customize.Setting and using wp.customize.previewer as default previewer param.
Also move jsdoc from class to `initialize` method and correct the param types.

Amends [41726], [42037], [32681].
See #42083, #30737.

Built from https://develop.svn.wordpress.org/trunk@42038


git-svn-id: http://core.svn.wordpress.org/trunk@41872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-29 03:08:53 +00:00
Weston Ruter
35172737ef Customize: Support instantiation of partials with flat/unwrapped params for parity with controls, sections, and panels in [41726].
* Passing `options.params` when constructing `Partial` is now deprecated in favor of just passing `options`.
* Improve usage of jsdoc in JS `Partial` class.
* Also add `defaults` property to `wp.customize.selectiveRefresh.Partial` class for parity with `Control`.

See #42083.

Built from https://develop.svn.wordpress.org/trunk@42037


git-svn-id: http://core.svn.wordpress.org/trunk@41871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-29 00:15:53 +00:00
Weston Ruter
cb7483b595 Customize: Fix mobile placement of panes for available widgets and nav menu items.
Props Mahvash-Fatima.
Amends [41893].
See #42215.
Fixes #42359.

Built from https://develop.svn.wordpress.org/trunk@42036


git-svn-id: http://core.svn.wordpress.org/trunk@41870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 06:54:47 +00:00
Weston Ruter
84b969efea Customize: Ensure id for section and panel is passed among params to respective templates.
Fixes issue where JS-added Publish Settings section failed to get container element ID set properly to hide its section-meta.

Amends [42025].
See #42337, #42083.

Built from https://develop.svn.wordpress.org/trunk@42035


git-svn-id: http://core.svn.wordpress.org/trunk@41869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 06:37:47 +00:00
Weston Ruter
685e3c1a67 Customize: Deprecate nav menu classes that are no longer used, instead of removing them immediately.
* Deprecate PHP classes `WP_Customize_New_Menu_Section` and `WP_Customize_New_Menu_Control`.
* Deprecate JS class `wp.customize.Menus.NewMenuControl`.
* Also introduce `wp.customize.Menus.createNavMenu()` for logic to create nav menus separately from the logic for handling UI interactions.

Amends [41768].
See #40104, #42364.
Fixes #42357.

Built from https://develop.svn.wordpress.org/trunk@42034


git-svn-id: http://core.svn.wordpress.org/trunk@41868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 05:48:47 +00:00
Weston Ruter
9dca5ae189 Customize: Fix deep-linking to sections for themes via autofocus[section] query parameter.
* Expand containing panel when expanding themes section.
* Consolidate UI changes related to a section's expanded state change.
* Prevent collapsing current section when expanding.
* Auto-expand first themes section when expanding panel if one is not expanded already.

See #37661, #42354.
Fixes #42360.

Built from https://develop.svn.wordpress.org/trunk@42033


git-svn-id: http://core.svn.wordpress.org/trunk@41867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 05:22:46 +00:00
Gary Pendergast
615a9afab8 Tests: Update wp-api-generated.js.
[41979] caused a change in `wp-api-generated.js`, so it needs to be updated.

See #39996.


Built from https://develop.svn.wordpress.org/trunk@42032


git-svn-id: http://core.svn.wordpress.org/trunk@41866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 01:56:46 +00:00
Weston Ruter
d348f1624b Customize: Improve Media control accessibility and compatibility for settings passed as arrays or as solitary setting.
* Eliminate Media control template from having dependency on `params.settings.default` for element ID, to fix compat with `params.settings` array or single `params.setting`. See #36167.
* Move description out of label and add `aria-describedby` to Media control's Select button. See #30738, #33085.
* Obtain notification container whenever content is (re-)rendered (such as for Media control). See #38794.
* Re-render notifications after control content is re-rendered, if control is in expanded section. See #38794.

Amends [41390].
See #36167, #38794, #33085, #30738.

Built from https://develop.svn.wordpress.org/trunk@42031


git-svn-id: http://core.svn.wordpress.org/trunk@41865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-27 20:18:47 +00:00
Weston Ruter
cb877e10ba Widgets: Prevent showing underlying attachment excerpt as caption when empty caption value is supplied in Image widget.
Allow underlying attachment to display if `caption` is `null`.

Props miyauchi, westonruter.
See #39993.
Fixes #42350.

Built from https://develop.svn.wordpress.org/trunk@42030


git-svn-id: http://core.svn.wordpress.org/trunk@41864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-27 05:05:51 +00:00
Weston Ruter
7b0de1f1b0 Themes: Switch back from throttling to debouncing in theme searches on admin screen.
Start debouncing after initial search performed when `search` query param is present to prevent initial "flash of unsearched themes".

Props afercia, westonruter.
Amends [41797].
See #40254.
Fixes #42348.

Built from https://develop.svn.wordpress.org/trunk@42029


git-svn-id: http://core.svn.wordpress.org/trunk@41863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-27 03:31:53 +00:00
John Blackbourn
c6fd6b0374 External Libraries: Remove usage of each() from the Text_Diff_Engine_native class.
This removes deprecated notices in PHP 7.2 but takes a different approach to the upstream class from Horde, which appears to be buggy.

Props SergeyBiryukov
Fixes #41526

Built from https://develop.svn.wordpress.org/trunk@42028


git-svn-id: http://core.svn.wordpress.org/trunk@41862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-26 12:52:53 +00:00
John Blackbourn
4550ef5b2c External Libraries: Remove usage of text strings in assert() in the Text_Diff_Engine_native class.
See #41526

Built from https://develop.svn.wordpress.org/trunk@42027


git-svn-id: http://core.svn.wordpress.org/trunk@41861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-26 11:32:48 +00:00
Konstantin Obenland
db00af7cc2 Menus: Add menu-$i slugs to mapping groups
Helps to future proof the feature.
Also orders slugs by popularity to optimize mapping time.

See #39692.

Built from https://develop.svn.wordpress.org/trunk@42026


git-svn-id: http://core.svn.wordpress.org/trunk@41860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 22:29:49 +00:00
Weston Ruter
a6af74ec32 Customize: Register the Publish Settings section in JS to ensure it does not get unregistered via PHP.
The `publish_settings` section is a fundamental dependency for Customizer, so it must be guaranteed to be registered.

Also unconditionally register core types for panels, sections, and controls in case plugin unhooks all `customize_register` actions.

See #39896.
Fixes #42337.

Built from https://develop.svn.wordpress.org/trunk@42025


git-svn-id: http://core.svn.wordpress.org/trunk@41859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 21:45:49 +00:00
Weston Ruter
3ed6bbf4a4 Customize: Link elements prior to embedding to prevent possible errors when a control is associated with a non-existent section.
Fixes issue specifically with attempting to access an orphaned control's `elements` immediately after it has been added. Normally this would not happen because a control would not be registered without a section, and also a control should only be interacted with once its `embedded` deferred has been resolved.

Also harden logic for gathering list of deferred setting IDs.

See #37964.
Fixes #42330.

Built from https://develop.svn.wordpress.org/trunk@42024


git-svn-id: http://core.svn.wordpress.org/trunk@41858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 16:49:49 +00:00
Sergey Biryukov
6b3b489a5d Permalinks: Change mention of URI to URL in the description of %category% tag.
Props danieltj, tobifjellner.
Fixes #42147.
Built from https://develop.svn.wordpress.org/trunk@42023


git-svn-id: http://core.svn.wordpress.org/trunk@41857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 11:11:45 +00:00
John Blackbourn
7fc62bbd4f External Libraries: Revert [41633]. This causes warnings when editing and viewing certain revisions.
See #41526

Built from https://develop.svn.wordpress.org/trunk@42022


git-svn-id: http://core.svn.wordpress.org/trunk@41856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 09:56:53 +00:00
Weston Ruter
6794fd18ef Post WordPress 4.9 Beta 4 version bump.
Built from https://develop.svn.wordpress.org/trunk@42021


git-svn-id: http://core.svn.wordpress.org/trunk@41855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 07:08:52 +00:00
Weston Ruter
f6bf73792c WordPress 4.9 Beta 4.
Built from https://develop.svn.wordpress.org/trunk@42020


git-svn-id: http://core.svn.wordpress.org/trunk@41854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 06:13:47 +00:00
David A. Kennedy
750098da21 Bundled Themes: Make sure new gallery widgets look good in themes
Twenty Ten: Reduces image size and removes image borders for galleries in widget areas.
Twenty Eleven: Reduces image size and removes image borders for galleries in widget areas.
Twenty Twelve: Reduces image size for some gallery sizes in widget areas.
Twenty Thirteen: Ensure proper clearing for images, hide captions for some gallery column combos and ensure good display for galleries in widget areas.
Twenty Fourteen: Ensure proper clearing for images and hide captions for some gallery column combos for galleries in widget areas.
Twenty Seventeen: Hide captions for some gallery column combos for galleries in widget areas.

Props joyously, williampatton, davidakennedy, melchoyce, crunnells.

Fixes #41969.

Built from https://develop.svn.wordpress.org/trunk@42019


git-svn-id: http://core.svn.wordpress.org/trunk@41853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 02:17:47 +00:00
Weston Ruter
d19c79fa21 Customize: Remove theme_installing notification when installation fails.
Amends [41648].
Props celloexpressions.
See #42184, #37661.

Built from https://develop.svn.wordpress.org/trunk@42018


git-svn-id: http://core.svn.wordpress.org/trunk@41852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 01:14:46 +00:00
Gary Pendergast
3cd984f024 About page: The link URLs in the privacy policy shouldn't be translatable.
Both of these URLs live on the main wordpress.org site, not Rosetta sites.

See #40794.


Built from https://develop.svn.wordpress.org/trunk@42017


git-svn-id: http://core.svn.wordpress.org/trunk@41851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 01:07:47 +00:00
iandunn
2762709d2a Dashboard: Strip ports from IPs to avoid PHP warnings.
Fixes #41083.
Props pento, iandunn, EatonZ, birgire, dd32.

Built from https://develop.svn.wordpress.org/trunk@42016


git-svn-id: http://core.svn.wordpress.org/trunk@41850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 00:07:46 +00:00
Weston Ruter
12c626c82e Update $_old_files to add the deleted MediaElement.js files when it was upgraded from 2.22.0 to 4.2.3.
Amends [41198].
See #39686.
Fixes #42097.

Built from https://develop.svn.wordpress.org/trunk@42015


git-svn-id: http://core.svn.wordpress.org/trunk@41849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 00:02:50 +00:00
Sergey Biryukov
116e4712cb I18N: Use a consistent pattern for translator comments for placeholders in the string added in [42013].
See #41974.
Built from https://develop.svn.wordpress.org/trunk@42014


git-svn-id: http://core.svn.wordpress.org/trunk@41848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:40:46 +00:00
Mel Choyce
7495a110cc Code Editors: Add a persistent notification on CSS files, encouraging people to use the CSS panel in the Customizer instead of editing their CSS files directly.
Props helen, westonruter, nic.bertino, michelleweber.
Fixes #42100.

Built from https://develop.svn.wordpress.org/trunk@42013


git-svn-id: http://core.svn.wordpress.org/trunk@41847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:35:46 +00:00
Weston Ruter
d96b7af890 Permalinks: Fix placement of structure tags based on last cursor position.
Props felipeelia, afercia.
See #29872.
Fixes #42042.

Built from https://develop.svn.wordpress.org/trunk@42012


git-svn-id: http://core.svn.wordpress.org/trunk@41846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:27:48 +00:00
John Blackbourn
2f3e91028a Filesystem API: Add more specificity to the rules for valid files in validate_file().
This now treats files containing `./` as valid, and also treats files containing a trailing `../` as valid due to widespread use of this pattern in theme and plugin zip files.

Adds tests.

Props Ipstenu, borgesbruno, DavidAnderson, philipjohn, birgire
Fixes #42016, #36170

Built from https://develop.svn.wordpress.org/trunk@42011


git-svn-id: http://core.svn.wordpress.org/trunk@41845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:15:49 +00:00
John Blackbourn
16cfe96580 Filesystem API: Don't immediately return an error for invalid file names contained within a Zip while it's being extracted.
This allows the extraction of the rest of the valid files within the archive to continue.

See #42016

Built from https://develop.svn.wordpress.org/trunk@42010


git-svn-id: http://core.svn.wordpress.org/trunk@41844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:11:50 +00:00
Weston Ruter
48e726bbef Embeds: Improve consistency of update and refresh logic for oEmbed caching between oembed_cache and post meta.
* Allow updating oEmbed cache during `parse-embed` requests for non-post editors (such as widgets).
* Update any existing `oembed_cache` post when `usecache` and TTL has passed.
* Do not overwrite a previously valid cache with `{{unknown}}`.

Props dlh.
See #34115.
Fixes #42310.

Built from https://develop.svn.wordpress.org/trunk@42009


git-svn-id: http://core.svn.wordpress.org/trunk@41843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:10:48 +00:00
Sergey Biryukov
5dd45b38c8 Transients: After [41963], add missing cron task for delete_expired_transients().
Props dlh.
Fixes #41699.
Built from https://develop.svn.wordpress.org/trunk@42008


git-svn-id: http://core.svn.wordpress.org/trunk@41842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:00:47 +00:00
John Blackbourn
4812370aab Docs: Improve the docs for validate_file() and validate_file_to_edit().
See #42016, #36170, #41017

Built from https://develop.svn.wordpress.org/trunk@42007


git-svn-id: http://core.svn.wordpress.org/trunk@41841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 22:50:49 +00:00
Sergey Biryukov
29d5ee851c I18N: Use a consistent pattern for translator comments for placeholders in some more Customizer strings.
See #41974.
Built from https://develop.svn.wordpress.org/trunk@42006


git-svn-id: http://core.svn.wordpress.org/trunk@41840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 22:47:46 +00:00
Sergey Biryukov
f156f90ff5 I18N: Add a context for remaining "Schedule" strings.
Props Mirucon.
Fixes #42165.
Built from https://develop.svn.wordpress.org/trunk@42005


git-svn-id: http://core.svn.wordpress.org/trunk@41839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 22:35:47 +00:00
David A. Kennedy
55c8978f1f Twenty Seventeen: Make gallery link styles consistent in all widget areas
Removes the box shadow on gallery links in footer widget areas so they're consistent with the sidebar widget area.

Props transl8or, sami.keijonen, davidakennedy.

Fixes #42302.

Built from https://develop.svn.wordpress.org/trunk@42004


git-svn-id: http://core.svn.wordpress.org/trunk@41838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:53:51 +00:00
Weston Ruter
a1ec65b695 Themes: Harmonize list of theme features on Theme Install screen with list in the Customizer.
Use the core list, rather than the .org API, due to inconsistencies and to ensure tags are translated.

Props celloexpressions.
See #37661, #42306.

Built from https://develop.svn.wordpress.org/trunk@42003


git-svn-id: http://core.svn.wordpress.org/trunk@41837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:46:47 +00:00
Sergey Biryukov
50c6a55fba I18N: Give context to "Installed" string added in [41648].
Props dimadin.
Fixes #42325.
Built from https://develop.svn.wordpress.org/trunk@42002


git-svn-id: http://core.svn.wordpress.org/trunk@41836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:43:47 +00:00
Weston Ruter
fd2e006968 Widgets: Limit container-constraining logic in Text widget to video, iframe, object, and embed elements.
Amends [41779].
See #40854.

Built from https://develop.svn.wordpress.org/trunk@42001


git-svn-id: http://core.svn.wordpress.org/trunk@41835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:32:46 +00:00
Joe Hoyle
bebb0b0d82 REST API: Don’t remove unregistered properties from objects in schema.
In r41727 the ability to sanitise and validate objects from JSON schema was added, with a whitelist approach. It was decided we should pass through all non-registered properties to reflect the behaviour of the root object in register_rest_route. To prevent arbitrary extra data via setting objects, we force additionalProperties to false in the settings endpoint.

See #38583.
Built from https://develop.svn.wordpress.org/trunk@42000


git-svn-id: http://core.svn.wordpress.org/trunk@41834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:05:49 +00:00
Mel Choyce
c0d0380baa Code Editors: Tweak styles to work better on smaller screens.
See #42100.

Built from https://develop.svn.wordpress.org/trunk@41999


git-svn-id: http://core.svn.wordpress.org/trunk@41833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 20:29:46 +00:00
Mel Choyce
9c7eb32fc2 Credits: Update "Contributing Developers" to "Noteworthy Contributors."
"Developers" excludes the various major contributors in non-developer roles, so let's update this term to be more inclusive.

See #41022.

Built from https://develop.svn.wordpress.org/trunk@41998


git-svn-id: http://core.svn.wordpress.org/trunk@41832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 19:29:47 +00:00
Weston Ruter
6737643773 Customize: Prevent theme installation and deletion in Customizer while SFTP credentials need to be requested.
This is a temporary measure while we wait for credentials to be able to be supplied in the Customizer.

Amends [41788].
See #42184, #37661, #42126.

Built from https://develop.svn.wordpress.org/trunk@41997


git-svn-id: http://core.svn.wordpress.org/trunk@41831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 19:06:47 +00:00
Mel Choyce
b008754486 Code Editors: Update copy in warning modals.
Props helen.
See #42100.

Built from https://develop.svn.wordpress.org/trunk@41996


git-svn-id: http://core.svn.wordpress.org/trunk@41830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 18:47:47 +00:00
Konstantin Obenland
5aa45cd12e Customize: Allow previewed menus to be customized
Fixes a bug where menu assignements couldn't be changed when previewing a theme.
Also removes an unnecessary call to menu mapping after a theme switch from the customizer and makes sure the locations option is always written, for good measure.

Props westonruter.
See #39692.

Built from https://develop.svn.wordpress.org/trunk@41995


git-svn-id: http://core.svn.wordpress.org/trunk@41829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 18:35:48 +00:00