Commit Graph

13568 Commits

Author SHA1 Message Date
John Blackbourn 7cc10e6ccb Administration: Ensure the new Privacy Policy screen appears when within the Network Admin and User Admin.
Props hnle, dd32
Fixes #42443


git-svn-id: https://develop.svn.wordpress.org/trunk@42116 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-06 18:16:25 +00:00
Konstantin Obenland a4f27c25bc File Editors: Account for network admin use
Fixes a bug where files couldn't be accessed in multisite installs.

Props flixos90, westonruter.
Fixes #42420.



git-svn-id: https://develop.svn.wordpress.org/trunk@42115 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-03 18:50:43 +00:00
Weston Ruter 9976cd2b66 Customize: Ensure `changeset_uuid` param for autosave auto-draft gets stripped from location after previewing theme switch when not in branching mode.
Amends [41597].
See #39896.
Fixes #42415.


git-svn-id: https://develop.svn.wordpress.org/trunk@42114 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-03 17:36:27 +00:00
Weston Ruter c7cb694732 Customize: Make sure theme switch blocking in the Customizer is consistently applied when changeset is drafted/scheduled.
* Consider both `selectedChangesetStatus` and `changesetStatus` states when deciding to disable.
* Factor out common logic into `canSwitchTheme` function on `ThemesPanel`.
* Keep Live Preview and Install buttons disabled in Themes controls and detail overlays when appropriate.

Props westonruter, dlh.
Amends [41788].
See #42126, #37661, #39896.
Fixes #42406.


git-svn-id: https://develop.svn.wordpress.org/trunk@42113 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-03 00:58:25 +00:00
Weston Ruter 3fab757196 Theme Editor: Ensure files listed recursively can be both viewed and edited.
Prevent edits to 2-level deep theme files from returning a `disallowed_theme_file` error when attempting to save an edit. Aligns logic for gathering `$allowed_files` in `theme-editor.php` for listing files with the validation logic in `wp_edit_theme_plugin_file()`.

Amends [41806].
See #6531.
Fixes #42425.


git-svn-id: https://develop.svn.wordpress.org/trunk@42112 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-02 23:04:54 +00:00
Weston Ruter 4f0527afdc Customize: Present the date/time control input fields in the same format (and order) as `date_format`.
Props westonruter, obenland, atachibana for testing, Mirucon for testing.
See #42373, #28721.
Fixes #42394.


git-svn-id: https://develop.svn.wordpress.org/trunk@42111 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-02 22:59:04 +00:00
Konstantin Obenland f0cb7b5696 Codemirror: Unify line endings in csslint.js
This is likely a problem caused upstream and will probably be a non-issue once #41870 is merged in a future release.

Fixes #42424.



git-svn-id: https://develop.svn.wordpress.org/trunk@42110 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-02 22:30:16 +00:00
Weston Ruter bdee44c461 Customize: Always use underlying changeset post date as initial date in scheduled date fields if date is future.
Prevent user from having to re-enter the previously-supplied future date if they had switched from schedule to draft but wanted to switch back again. Improves parity with behavior of post edit screen.

Props dlh, westonruter, obenland.
See #39896, #28721.
Fixes #42413.


git-svn-id: https://develop.svn.wordpress.org/trunk@42109 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-02 19:59:55 +00:00
Weston Ruter 884fa6476e Customize: Prevent `history.replaceState()` and `history.pushState()` calls from causing error in customize preview before DOM ready.
Amends [41597].
See #39896.
Fixes #42414.


git-svn-id: https://develop.svn.wordpress.org/trunk@42108 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-02 19:26:23 +00:00
Weston Ruter dc3c350eab Customize: Prevent re-importing starter content when changeset is saved as draft or scheduled.
Themes cannot currently be switched in Customizer after changeset is saved anyway.

Props dlh, westonruter.
See #40146, #42411, #42126.
Fixes #42395.


git-svn-id: https://develop.svn.wordpress.org/trunk@42107 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-02 18:59:40 +00:00
David A. Kennedy ec2b0be9a6 Bundled Themes: Bump version numbers and update changelogs for 4.9 release
* Also, updates POT files for Twenty Ten and Twenty Eleven.

Props lemacarl, maedahbatool, mrahmadawais, davidakennedy.

Fixes #42090.


git-svn-id: https://develop.svn.wordpress.org/trunk@42105 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-01 22:42:50 +00:00
Weston Ruter 7b33220fa3 Customize: Strip zero padding when setting month to prevent de-selection; add zero-padding for `number` input fields when blurring.
Amends [42042].
See #42373.
Fixes #42392.


git-svn-id: https://develop.svn.wordpress.org/trunk@42104 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-01 21:03:36 +00:00
Gary Pendergast a39d599adf Database: Restore numbered placeholders in `wpdb::prepare()`.
[41496] removed support for numbered placeholders in queries send through `wpdb::prepare()`, which, despite being undocumented, were quite commonly used.

This change restores support for numbered placeholders (as well as a subset of placeholder formatting), while also adding extra checks to ensure the correct number of arguments are being passed to `wpdb::prepare()`, given the number of placeholders.

See #41925.



git-svn-id: https://develop.svn.wordpress.org/trunk@42056 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 11:59:43 +00:00
westonruter 15f74e83fa Post WordPress 4.9 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@42050 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 04:31:03 +00:00
Weston Ruter 53af23a241 WordPress 4.9 RC1.
git-svn-id: https://develop.svn.wordpress.org/trunk@42049 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 03:41:16 +00:00
Weston Ruter 00eb9473b2 Customize: Consolidate sourcing of control `params`.
Prevent needlessly iterating over `controlConstructor` to find `type` when it is already supplied.

Amends [41750], [41726].
See #42083.


git-svn-id: https://develop.svn.wordpress.org/trunk@42048 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 02:58:42 +00:00
Adam Silverstein 0a964a48f8 REST API: JS client - Enumerate endpoints supporting trash.
Improve the logic determining which endpoints support the trash by enumerating them. Endpoints that don't support the trash require `force=true` when deleting. The previous approach relied on the `force` argument description, which is a translated string and was fragile. In the future, we can expose whether an endpoint supports the trash as part of its schema and automate this logic.

Props Soean.
Fixes #40672.



git-svn-id: https://develop.svn.wordpress.org/trunk@42047 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 02:53:44 +00:00
Konstantin Obenland f19d308ece Customize: Spiff up theme updates
Fixes UI bugs around theme updates in the Customizer. Theme versions now get updated and users are no longer left alone after a successful update.

Props rinkuyadav999, celloexpressions for initial patch.
Fixes #42365.


git-svn-id: https://develop.svn.wordpress.org/trunk@42046 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 01:32:15 +00:00
Gary Pendergast 2c0031b21d About page: Tweak the privacy policy language, for clarity.
See #40794.



git-svn-id: https://develop.svn.wordpress.org/trunk@42045 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-31 00:20:58 +00:00
Mel Choyce a3ca329182 About Page: Update the blurb in "Warning: Potential Danger Ahead!" to be more accurate.
Props transl8or, karmatosed, chanthaboune.
See #42087.


git-svn-id: https://develop.svn.wordpress.org/trunk@42044 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-30 20:57:54 +00:00
Felix Arntz 43396e2b42 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42043 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-30 19:55:09 +00:00
Weston Ruter 8f661ef667 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42042 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-30 16:39:06 +00:00
Weston Ruter 9461f57532 Customize: Debounce requests for theme searches and the updating of the resulting filter count.
Props celloexpressions.
See #37661.
Fixes #42343.


git-svn-id: https://develop.svn.wordpress.org/trunk@42040 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-30 03:56:26 +00:00
Weston Ruter 8f0dbb4f43 Customize: Fix phpdoc for params in `WP_Customize_Manager::add_section()`.
Amends [40804].
See #39671.
Fixes #42372.


git-svn-id: https://develop.svn.wordpress.org/trunk@42039 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-29 03:21:27 +00:00
Weston Ruter 3c7bf038d8 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42038 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-29 03:07:30 +00:00
Weston Ruter 9368a2efa8 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42037 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-29 00:14:06 +00:00
Weston Ruter 69b8d057da Customize: Fix mobile placement of panes for available widgets and nav menu items.
Props Mahvash-Fatima.
Amends [41893].
See #42215.
Fixes #42359.


git-svn-id: https://develop.svn.wordpress.org/trunk@42036 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-28 06:53:40 +00:00
Weston Ruter f9472e94b8 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42035 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-28 06:36:12 +00:00
Weston Ruter 01bb1fd6cb 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42034 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-28 05:47:06 +00:00
Weston Ruter d1e1b9bf24 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42033 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-28 05:21:42 +00:00
Weston Ruter acd03e1ecb 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42031 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-27 20:17:49 +00:00
Weston Ruter 6eacf2f06b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42030 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-27 05:04:04 +00:00
Weston Ruter 49ec33ae71 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42029 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-27 03:30:27 +00:00
John Blackbourn afa1b06984 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


git-svn-id: https://develop.svn.wordpress.org/trunk@42028 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-26 12:51:51 +00:00
John Blackbourn 54602b9904 External Libraries: Remove usage of text strings in `assert()` in the `Text_Diff_Engine_native` class.
See #41526


git-svn-id: https://develop.svn.wordpress.org/trunk@42027 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-26 11:31:20 +00:00
Konstantin Obenland 2ddcc549d2 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42026 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-25 22:28:43 +00:00
Weston Ruter 6f5777ecbf 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42025 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-25 21:44:48 +00:00
Weston Ruter 610b1f05de 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42024 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-25 16:48:19 +00:00
Sergey Biryukov a33d615433 Permalinks: Change mention of URI to URL in the description of `%category%` tag.
Props danieltj, tobifjellner.
Fixes #42147.

git-svn-id: https://develop.svn.wordpress.org/trunk@42023 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-25 11:10:12 +00:00
John Blackbourn 3a3f3c435d External Libraries: Revert [41633]. This causes warnings when editing and viewing certain revisions.
See #41526


git-svn-id: https://develop.svn.wordpress.org/trunk@42022 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-25 09:55:39 +00:00
Weston Ruter a05bfe001c Post WordPress 4.9 Beta 4 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@42021 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-25 07:07:07 +00:00
Weston Ruter add4294ca6 WordPress 4.9 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@42020 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-25 06:12:26 +00:00
David A. Kennedy 5a7f9c48b1 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42019 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-25 02:16:39 +00:00
Weston Ruter 273e0e8ecc Customize: Remove `theme_installing` notification when installation fails.
Amends [41648].
Props celloexpressions.
See #42184, #37661.


git-svn-id: https://develop.svn.wordpress.org/trunk@42018 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-25 01:13:09 +00:00
Gary Pendergast fdc3e41085 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@42017 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-25 01:06:19 +00:00
Ian Dunn cac531f50b Dashboard: Strip ports from IPs to avoid PHP warnings.
Fixes #41083.
Props pento, iandunn, EatonZ, birgire, dd32.


git-svn-id: https://develop.svn.wordpress.org/trunk@42016 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-25 00:06:06 +00:00
Weston Ruter 88497dc5d5 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42015 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-25 00:01:29 +00:00
Sergey Biryukov 3ef1cabd1e I18N: Use a consistent pattern for translator comments for placeholders in the string added in [42013].
See #41974.

git-svn-id: https://develop.svn.wordpress.org/trunk@42014 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 23:39:48 +00:00
Mel Choyce 7201576757 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42013 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 23:34:31 +00:00
Weston Ruter 2d249b2535 Permalinks: Fix placement of structure tags based on last cursor position.
Props felipeelia, afercia.
See #29872.
Fixes #42042.


git-svn-id: https://develop.svn.wordpress.org/trunk@42012 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 23:26:38 +00:00
John Blackbourn 3e9a42ed27 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


git-svn-id: https://develop.svn.wordpress.org/trunk@42011 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 23:14:33 +00:00
John Blackbourn 49b7cb458f 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


git-svn-id: https://develop.svn.wordpress.org/trunk@42010 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 23:10:37 +00:00
Weston Ruter 18a231bad6 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42009 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 23:09:43 +00:00
Sergey Biryukov 8d56eff073 Transients: After [41963], add missing cron task for `delete_expired_transients()`.
Props dlh.
Fixes #41699.

git-svn-id: https://develop.svn.wordpress.org/trunk@42008 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 23:00:01 +00:00
John Blackbourn 7329816301 Docs: Improve the docs for `validate_file()` and `validate_file_to_edit()`.
See #42016, #36170, #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@42007 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 22:49:13 +00:00
Sergey Biryukov 80fd300ebf I18N: Use a consistent pattern for translator comments for placeholders in some more Customizer strings.
See #41974.

git-svn-id: https://develop.svn.wordpress.org/trunk@42006 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 22:46:27 +00:00
Sergey Biryukov 6768a2cd2a I18N: Add a context for remaining "Schedule" strings.
Props Mirucon.
Fixes #42165.

git-svn-id: https://develop.svn.wordpress.org/trunk@42005 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 22:34:05 +00:00
David A. Kennedy 9d294d7ea1 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42004 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 21:52:40 +00:00
Weston Ruter e28dfcd584 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42003 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 21:45:14 +00:00
Sergey Biryukov 1e39d4f2de I18N: Give context to "Installed" string added in [41648].
Props dimadin.
Fixes #42325.

git-svn-id: https://develop.svn.wordpress.org/trunk@42002 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 21:42:33 +00:00
Weston Ruter 5a02f2cd50 Widgets: Limit container-constraining logic in Text widget to `video`, `iframe`, `object`, and `embed` elements.
Amends [41779].
See #40854.


git-svn-id: https://develop.svn.wordpress.org/trunk@42001 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 21:31:16 +00:00
Joe Hoyle fb2e44456e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42000 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 21:04:50 +00:00
Mel Choyce 36f253d1d9 Code Editors: Tweak styles to work better on smaller screens.
See #42100.


git-svn-id: https://develop.svn.wordpress.org/trunk@41999 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 20:29:00 +00:00
Mel Choyce f06055cf90 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41998 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 19:28:43 +00:00
Weston Ruter 2b64083fba 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41997 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 19:05:48 +00:00
Mel Choyce dbafaf152a Code Editors: Update copy in warning modals.
Props helen.
See #42100.


git-svn-id: https://develop.svn.wordpress.org/trunk@41996 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 18:46:26 +00:00
Konstantin Obenland 619f0b4b34 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41995 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 18:34:21 +00:00
Ella Van Dorpe 7ddfa7c135 TinyMCE: Set undefined FloatPanel zIndex
See [40995] for the Customizer.
Fixes #42322.



git-svn-id: https://develop.svn.wordpress.org/trunk@41993 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 16:51:50 +00:00
Weston Ruter c0a61efdad Code Editor: Define default `gutters` and toggle lint markers based on changes to `lint` option.
Explicitly define `gutters` in base `defaultSettings` to improve merges of multiple calls to `wp_enqueue_code_editor()`.

Props westonruter, georgestephanis for testing.
Amends [41974].
See #12423.


git-svn-id: https://develop.svn.wordpress.org/trunk@41992 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 16:34:12 +00:00
Sergey Biryukov 18f91933fb Canonical: Strip trailing punctuation from permalinks.
Previously attempted in [40256], which caused the test for decoded curly quotes to fail in some environments.

`$_SERVER['REQUEST_URI']` contains the encoded URI, so this version removes the failing tests and only checks for encoded curly quotes.

Props joostdevalk, lancewillett, SergeyBiryukov.
Fixes #20383.

git-svn-id: https://develop.svn.wordpress.org/trunk@41991 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 14:17:22 +00:00
Sergey Biryukov b36ed916e8 Formatting: Make sure `wp_allowed_protocols()` is filterable until `wp_loaded` has fired.
Fixes the issue with plugins not being able to use the `kses_allowed_protocols` filter if `esc_url()` was called too early.

Props turtlepod, SergeyBiryukov.
Fixes #36033.

git-svn-id: https://develop.svn.wordpress.org/trunk@41990 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 13:24:43 +00:00
John Blackbourn 4b6528e760 Docs: Correct a class name in the docs for `WP_Customize_Manager::post_value()`.
See #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@41989 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 11:56:32 +00:00
Sergey Biryukov 92d8a1799e Taxonomy: Use `keypress` instead of `keyup` for listening for Enter key to add a tag via Tags meta box.
Fixes issue with Japanese input.

Props miyauchi.
Fixes #42234.

git-svn-id: https://develop.svn.wordpress.org/trunk@41988 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 11:29:34 +00:00
Sergey Biryukov eac206b375 Taxonomy: After [40984], add the `most_used` label for non-hierarchical taxonomies too, and use it on the Menus screen.
Props johnbillion.
Fixes #41150.

git-svn-id: https://develop.svn.wordpress.org/trunk@41987 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 11:21:47 +00:00
Sergey Biryukov 08421dfc72 I18N: Remove `<code>` and `<kbd>` tags from translatable strings on Settings screens.
Move URLs to separate strings.

Props ramiy.
Fixes #40763.

git-svn-id: https://develop.svn.wordpress.org/trunk@41986 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 10:50:40 +00:00
Weston Ruter ac68181c94 Editor: Specify `maxwidth` in `parse-embed` requests based on width of editor iframe so that TinyMCE view embeds fit, particularly in Text widgets.
See #40854, #34115.


git-svn-id: https://develop.svn.wordpress.org/trunk@41985 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-24 04:06:23 +00:00
Helen Hou-Sandi ace979586b Buttons: Ensure active styling applies to both `:active` and `.active`.
props sayedwp, helen.
fixes #42236.


git-svn-id: https://develop.svn.wordpress.org/trunk@41984 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 23:33:54 +00:00
Sergey Biryukov 0e87ef42d0 Docs: Fix typo in `path_is_absolute()` description.
Props octalmage, birgire.
Fixes #42317.

git-svn-id: https://develop.svn.wordpress.org/trunk@41983 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 22:50:30 +00:00
westonruter d5e4547ef9 Menus: Don't prime nav menu items cache if a persistent cache is being used.
Amends [14560].
Props david.binda.
See #12734.
Fixes #41662.


git-svn-id: https://develop.svn.wordpress.org/trunk@41982 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 22:39:02 +00:00
Mel Choyce 5a4a469bc2 About Page: Revised strings to be easier to translate.
Props kristastevens, Presskopp, swissspidy.
See #42087.


git-svn-id: https://develop.svn.wordpress.org/trunk@41981 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 22:23:35 +00:00
Peter Wilson 733a81d74d Comments: Check if `wp_new_comment()` returns an error.
Adds checks throughout to allow for `wp_new_comment()` returning a `WP_Error` instance.

Updates the docs for the `pre_comment_approved` filter to include that it can be passed an error.

Props enrico.sorcinelli, ryotsun.
Fixes #39730.



git-svn-id: https://develop.svn.wordpress.org/trunk@41980 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 22:11:11 +00:00
Weston Ruter a0910276f1 REST API: Allow passing existing template value for posts even when template no longer exists.
Also remove `enum` for validating allowed templates to allow plugins to dynamically supply their own templates for specific posts, even when they are not in the theme.

Props TimothyBlynJacobs, jnylen0, swissspidy.
Fixes #39996.


git-svn-id: https://develop.svn.wordpress.org/trunk@41979 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 22:10:48 +00:00
Aaron Jorbin 074009ecdb Dashboard: Remove "Try Gutenberg" callout.
Reverting this for 4.9. It will be added back in a future version of WordPress. This doesn't mean that you shouldn't be trying Gutenberg, just that it isn't ready for a call out to a larger audience. But if you are the type to read commit messages, https://github.com/WordPress/gutenberg could use your pull requests and comments on issues.

Reverts [41931] [41900] [41896] [41895]
See #41316



git-svn-id: https://develop.svn.wordpress.org/trunk@41978 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 20:47:27 +00:00
Weston Ruter a719234281 Code Editor: Add `underscore` as a dependency for the `code-editor` script.
Amends [41376].
See #12423.


git-svn-id: https://develop.svn.wordpress.org/trunk@41977 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 20:37:22 +00:00
Pascal Birchler 87d77bc24a Themes: Show templates from both parent and child theme when calling `WP_Theme::get_post_templates()`.
Props birgire for initial patch.
Fixes #41717.


git-svn-id: https://develop.svn.wordpress.org/trunk@41975 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 20:07:06 +00:00
Weston Ruter 852174ad7f Code Editor: Keep linting and its error reporting configured when `lint` option is changed dynamically.
Also explicitly disable `lint` option for SCSS and LESS.

See #12423.


git-svn-id: https://develop.svn.wordpress.org/trunk@41974 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 19:54:33 +00:00
Konstantin Obenland fbf27f0c23 Customize: Ease extendability of filter drawer
By moving the `wporg` conditional inside the method body, the filter drawer can be overridden without having to also override the entire section template.

Props celloexpressions.
Closes #42212.



git-svn-id: https://develop.svn.wordpress.org/trunk@41973 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 18:57:46 +00:00
Andrea Fercia 9dc63e7cab Customize: Make sure the FTP credentials modal is visible.
The customizer and the theme installer use `visibility: hidden` on the body when
they open full-overlays screens. The FTP credentials modal needs a visibility
property set back to `visible` to be visible over those overlays.

Props purnendu.
Fixes #42205.


git-svn-id: https://develop.svn.wordpress.org/trunk@41972 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 17:53:36 +00:00
Weston Ruter 3bcd5075f5 Customize: Keep frontend preview link updated to reflect the current state of previewed URL, active theme, and autosaved state.
See #39896.


git-svn-id: https://develop.svn.wordpress.org/trunk@41969 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-23 00:40:05 +00:00
Weston Ruter e06f346a2c Customize: Update 'Save & Activate' reference to 'Publish & Activate' in themes help tab text.
See #39896.
Fixes #42305.


git-svn-id: https://develop.svn.wordpress.org/trunk@41968 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-22 20:02:26 +00:00
John Blackbourn 81149488e8 Docs: Correct docs introduced in [41965].
See #16778


git-svn-id: https://develop.svn.wordpress.org/trunk@41967 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-21 22:41:57 +00:00
Gary Pendergast 2ce903ffc3 Docs: Expand the docs for the `core_version_check_query_args` filter.
Add documentation for the parameters in the `$query` parameter.

Props MattyRob.
Fixes #16778.



git-svn-id: https://develop.svn.wordpress.org/trunk@41965 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-21 13:45:05 +00:00
Gary Pendergast 4670c8f3af Media: Don't backdate media uploaded to pages.
When media is uploaded to a post, the upload directory is set according to the date of the post, so that the media URLs in the post match when the post was published.

A page is a slightly different beast, pages often live for years, and are regularly updated to stay relevant. This change causes media uploaded to pages to use the upload date to determine the upload directory.

Fixes #10752.



git-svn-id: https://develop.svn.wordpress.org/trunk@41964 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-21 13:26:24 +00:00
Dion Hulse 899fb2f7f6 Transients: Clear expired transients from the database in a daily cron task.
Fixes #41699


git-svn-id: https://develop.svn.wordpress.org/trunk@41963 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-21 13:21:24 +00:00
Gary Pendergast 5233a95355 Updates: Add the `core_version_check_query_args` filter.
This filter allows the data being sent for core update checks to be controlled for privacy concerns.

Props toscho, MattyRob, swissspidy, pento.
Fixes #16778.



git-svn-id: https://develop.svn.wordpress.org/trunk@41962 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-21 11:54:47 +00:00
Weston Ruter dbfb9f0f0b Customize: Improve back-compat for `wp.customize.Control` subclasses that expect `options.params` to be present for direct manipulation before calling parent `initialize` method.
Fixes known incompatibility with Make theme.

Amends [41726].
See #30741.


git-svn-id: https://develop.svn.wordpress.org/trunk@41961 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-21 08:50:43 +00:00
Weston Ruter 931bcb0f7d Customize: Allow control subclasses to add to the `deferred` object before the base class initializes.
Update the `CodeEditorControl`'s `codemirror` deferred to be set before calling the parent class's `initialize` method. Since the `ready` method may be called directly by `initialize` it may be too late to add a new `Deferred` to the control's `deferred` property after calling the base control class's `initialize`.

Amends [41958].
See #41897.


git-svn-id: https://develop.svn.wordpress.org/trunk@41960 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-21 08:43:36 +00:00
Sergey Biryukov 1a8b08418b Docs: Document `$wp_version` global in `wp_initial_constants()`.
Props mt8.biz.
Fixes #42259.

git-svn-id: https://develop.svn.wordpress.org/trunk@41959 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-20 22:03:59 +00:00
Weston Ruter c8c16b9f70 Customize: Add `codemirror` deferred object to `CodeEditorControl` which is resolved when CodeMirror is initialized.
CodeMirror gets initialized once the control's containing section is expanded. The deferred will be rejected if user preference for syntax highlighting is disabled.
Also move jsdoc from `wp.customize.Control` to intended `wp.customize.Control#initialize()`.

See #41897, #12423.


git-svn-id: https://develop.svn.wordpress.org/trunk@41958 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-20 21:47:13 +00:00
Weston Ruter f5534ec8d5 Code Editor: Improve ability to create Customizer `CodeEditorControl` instances in JS, lessening PHP dependencies.
Allow `CodeEditorControl` to be instantiated with a `editor_settings` param which is merged with `wp.codeEditor.defaultSettings`.

Also:

* Turn redundant "CSS Code" control label into screen reader text for Additional CSS.
* Remove `code-editor` as script dependency for `custom-html-widgets` since enqueueing is determined by `wp_enqueue_code_editor()`.
* Remove useless exporting of `code_type` param to JS in `WP_Customize_Code_Editor_Control`.
* Add `disabled` class to Custom HTML widget's Save button when linting errors are present.
* Remove redundant `span` inside CodeEditorControl's `label`.

See #41897, #12423, #41872.


git-svn-id: https://develop.svn.wordpress.org/trunk@41957 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-20 16:38:35 +00:00
Sergey Biryukov 01c7f2cf7d Customize: Use typographic quotation marks in the strings added in [41768].
Props audrasjb, tobifjellner.
Fixes #42290. See #40104.

git-svn-id: https://develop.svn.wordpress.org/trunk@41956 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-20 14:06:42 +00:00
Sergey Biryukov 771b56d944 Menus: Remove an extra space in the `<ul>` tag in `Walker_Nav_Menu::start_lvl()`.
Fixes #42289.

git-svn-id: https://develop.svn.wordpress.org/trunk@41955 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-20 10:39:50 +00:00
Mel Choyce 8f08e79987 Customize Menus: Update capitalization of "next" to match case on the "Next" button.
Props hardeepasrani.
Fixes #42287.


git-svn-id: https://develop.svn.wordpress.org/trunk@41954 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-20 10:33:52 +00:00
Mel Choyce 0ff1f1b939 Customization Locking: Update error message to use existing strings.
Props ramiy.
See #42024.


git-svn-id: https://develop.svn.wordpress.org/trunk@41953 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-20 10:31:30 +00:00
Weston Ruter 620eb3052c Customize: Prevent using default template for a base control when it has content rendered on the server.
Also prevent invalid `type` attribute from being added to a `select` element.

See #30738.
Fixes #42286.


git-svn-id: https://develop.svn.wordpress.org/trunk@41952 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-20 03:29:30 +00:00
Weston Ruter d204ba3c00 Widgets: Improve extensibility of the Gallery widget and of media widgets generally.
* Introduce a `widget_{$id_base}_instance_schema` filter for plugins to add new properties to a media widget's instance schema.
* Pass all of a gallery widget's instance props to the gallery media frame, not just the ones that core supports.

See #32417, #41914.
Fixes #42285.


git-svn-id: https://develop.svn.wordpress.org/trunk@41951 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 23:43:22 +00:00
Weston Ruter 8206a9d225 Customize: Prevent re-highlighting "Add Items" button after available nav menu items pane has already been opened.
Amends [41930].
Props bpayton.
See #42114.


git-svn-id: https://develop.svn.wordpress.org/trunk@41950 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 18:37:10 +00:00
Weston Ruter 4238b2895f Customize: Fix alignment of Customize, Activate, and Live Preview buttons appearing on the Themes admin screen.
Amends [41893].
Props Mahvash-Fatima.
See #42215.
Fixes #42275.


git-svn-id: https://develop.svn.wordpress.org/trunk@41949 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 18:09:16 +00:00
Weston Ruter 253c7f03cc Customize: Fix rendering issues in theme browsing when opening theme details or performing search in Safari.
Props sayedwp.
See #37661.
Fixes #42052.


git-svn-id: https://develop.svn.wordpress.org/trunk@41948 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 17:56:56 +00:00
Weston Ruter d15347ae52 Customize: Prevent drawing attention to save button if status unchanged from publish; account for changes to status/date when alerting about unsaved changes.
Also fix malformed ESLint directive from [41933].

Amends [41932].
See #39896, #42211.


git-svn-id: https://develop.svn.wordpress.org/trunk@41947 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 17:41:05 +00:00
Gary Pendergast b4ede0319c About page: Update the privacy policy dashes.
If one were to insert 1—3 dashes into a sentence - on purpose - they should use the correct da–
sh.

See #40794.



git-svn-id: https://develop.svn.wordpress.org/trunk@41946 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 15:35:47 +00:00
Gary Pendergast 3507f4798f About page: Update the privacy policy language.
See #40794.



git-svn-id: https://develop.svn.wordpress.org/trunk@41944 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 15:25:54 +00:00
Mel Choyce 61c11a54d3 About Page: Commit initial strings for 4.9.
Props kristastevens, dd32, hlashbrooke.
See #42087.


git-svn-id: https://develop.svn.wordpress.org/trunk@41943 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 13:56:36 +00:00
Sergey Biryukov 083f2abada Docs: After [37329], update the documentation for `register_widget()` and `unregister_widget()`.
Both functions can accept a `WP_Widget` instance object instead of a `WP_Widget` subclass name, same as `WP_Widget_Factory::register()` and `::unregister()`.

Props behzod.
Fixes #42270.

git-svn-id: https://develop.svn.wordpress.org/trunk@41942 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 13:50:56 +00:00
Sergey Biryukov e18b4c894b Menus: Pass `$recent_args` parameter to `nav_menu_items_{$post_type_name}_recent` filter.
Props welcher, eclev91.
Fixes #39849.

git-svn-id: https://develop.svn.wordpress.org/trunk@41941 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 13:04:28 +00:00
Sergey Biryukov 731d7643d2 Docs: Reference `WP_Comment_Query::__construct()` as the source of information on accepted arguments in `get_comments()` and `get_approved_comments()`.
See #41017.

git-svn-id: https://develop.svn.wordpress.org/trunk@41940 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 08:48:05 +00:00
Weston Ruter ce0d7db409 Post WordPress 4.9 Beta 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@41939 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 05:07:23 +00:00
Weston Ruter ea5fb388da WordPress 4.9 Beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@41938 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 04:42:28 +00:00
Joe McGill 2cce6bb55a Customizer: Improve handling of crops in the media library.
This is a follow up on r41732, implementing the following improvements:

* Attachment parent info is now stored in attachment meta rather than a 
separate post meta key.
* Attachments created from contextual crops (e.g. header, logos, etc.) are
filtered out of the media library using a new `_filterContext` method in
`wp.media.controller.Library`.

Props joemcgill, westonruter.
See #21819.


git-svn-id: https://develop.svn.wordpress.org/trunk@41937 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 04:17:31 +00:00
Weston Ruter aac833887e Customize: Consistently use `input_attrs` as control param key in JS instead of `inputAttrs`.
See #30738, #41897.


git-svn-id: https://develop.svn.wordpress.org/trunk@41936 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 03:24:20 +00:00
Weston Ruter 1c04006909 Customize: Move control's fallback selection of default content template to `renderContent` method to align with sections and panels.
* Only use default control content template when a more specific template doesn't exist.
* Remove extraneous whitespace from being output in `WP_Customize_Control::render()` method.
* Move Custom Header template printing to `customize_controls_print_footer_scripts` action.

See #30738.


git-svn-id: https://develop.svn.wordpress.org/trunk@41935 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 03:03:19 +00:00
Sergey Biryukov b1f20b6763 I18N: Unify permission error message in `wp-admin/ms-delete-site.php`.
Props ramiy.
Fixes #42268.

git-svn-id: https://develop.svn.wordpress.org/trunk@41934 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 00:47:15 +00:00
Weston Ruter 0421a2b0a4 Widgets: Harden logic for checking for valid media URLs.
* Update deprecated `isHostedVideo` method to always return `true` since all oEmbeds are now supported.
* Disable `scanImage` for non-image media widgets.
* Ensure embed URL field element is matched from current media frame instance due to bug where media frames are not destroyed upon closing.
* Update error message for invalid video URLs to ask user to check the URL for validity.

Props gk.loveweb, octalmage, westonruter.
See #42039, #40935.
Fixes #41052.


git-svn-id: https://develop.svn.wordpress.org/trunk@41933 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-19 00:06:25 +00:00
westonruter 285be53824 Customize: Draw attention to save button after collapsing the publish settings section when the changeset status or date had been changed.
Props bpayton, westonruter.
See #42114, #39896.
Fixes #42211.


git-svn-id: https://develop.svn.wordpress.org/trunk@41932 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 23:05:02 +00:00
Sergey Biryukov 3ce1938687 Dashboard: Add missing URL to "Help with testing" link in Gutenberg callout.
See #41316.

git-svn-id: https://develop.svn.wordpress.org/trunk@41931 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 22:40:42 +00:00
Weston Ruter 1c521e35c5 Customize: Draw attention to "Add Items" button after creating a new menu.
Introduce `wp.customize.utils.highlightButton()` and `wp.customize.Menus.MenuSection#highlightNewItemButton()`.

Props bpayton, melchoyce, afercia, westonruter.
Fixes #42114.


git-svn-id: https://develop.svn.wordpress.org/trunk@41930 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 21:59:34 +00:00
Sergey Biryukov 40706838a1 Rewrite Rules: Remove redundant `if` condition in `extract_from_markers()`.
Props Dency, yahil, appchecker.
Fixes #39920.

git-svn-id: https://develop.svn.wordpress.org/trunk@41928 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 21:27:22 +00:00
Sergey Biryukov 6426b0b400 I18N: Unify error messages in XML-RPC methods `wp_deleteCategory()` and `wp_deleteComment()`.
Props ramiy.
Fixes #39019.

git-svn-id: https://develop.svn.wordpress.org/trunk@41927 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 21:11:47 +00:00
Sergey Biryukov ac8bc46b09 Administration: After [41120], check for a registered action before sending a Bad Request HTTP response status code.
Props Clorith.
Fixes #42240.

git-svn-id: https://develop.svn.wordpress.org/trunk@41926 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 21:00:39 +00:00
Sergey Biryukov adfa4cd450 Menus: Remove unnecessary top margin for menu item type on Menus screen for correct alignment with the dropdown icon.
Props punit5658.
Fixes #41521.

git-svn-id: https://develop.svn.wordpress.org/trunk@41925 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 20:51:23 +00:00
Sergey Biryukov a8518be72b Network Admin: After [41923], move the second `<p>` tag to a new line for better readability.
See #41652.

git-svn-id: https://develop.svn.wordpress.org/trunk@41924 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 20:50:58 +00:00
Sergey Biryukov 76c2aa8c85 I18N: Remove hardcoded constant from a translatable string in `network_step1()`.
Props ramiy.
Fixes #41652.

git-svn-id: https://develop.svn.wordpress.org/trunk@41923 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 20:01:36 +00:00
Sergey Biryukov 6561981976 Docs: Document `$ini_all` staticvar in `wp_is_ini_value_changeable()`.
Props nileshdudakiya94.
Fixes #41399.

git-svn-id: https://develop.svn.wordpress.org/trunk@41922 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 19:53:40 +00:00
Sergey Biryukov beeb0acd94 I18N: Combine two "Warning" strings in `network_step1()` and `network_step2()`.
Props ramiy.
Fixes #38570.

git-svn-id: https://develop.svn.wordpress.org/trunk@41921 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 19:49:17 +00:00
Weston Ruter 349ccdf2d7 Customize: Fix visibility of overlay notifications in Safari.
Props sayedwp, westonruter.
Amends [41390].
See #35210, #42024, #42052.


git-svn-id: https://develop.svn.wordpress.org/trunk@41919 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 18:12:29 +00:00
Felix Arntz 4124fbfa7c Multisite: Document all return types in get_networks().
Adds more complete documentation to get_networks() and the corresponding methods in WP_Network_Query.

Fixes #42260.


git-svn-id: https://develop.svn.wordpress.org/trunk@41918 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 18:12:20 +00:00
SergeyBiryukov a540d91f8f Docs: Document `$default_scripts` parameter in `_WP_Editors::enqueue_scripts()`.
Props danieltj, ajayghaghretiya1.
Fixes #41322.

git-svn-id: https://develop.svn.wordpress.org/trunk@41917 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 18:08:02 +00:00
Sergey Biryukov 88a6ebaa75 Plugins: Revert unintended change from [41915].
See #37430.

git-svn-id: https://develop.svn.wordpress.org/trunk@41916 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 18:00:54 +00:00
Sergey Biryukov 93a3fa4506 Plugins: After [41608], make the markup in `WP_Plugin_Install_List_Table::no_items()` a bit more readable.
See #37430.

git-svn-id: https://develop.svn.wordpress.org/trunk@41915 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:58:00 +00:00
Sergey Biryukov dca34e10d5 Docs: Add `@since` entry for `WP_Automatic_Updater::after_core_update()`, introduced in [25841].
See #41017, #29086.

git-svn-id: https://develop.svn.wordpress.org/trunk@41914 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:47:34 +00:00
Weston Ruter a7c6a25eba Widgets: Fix previewing embeds in Text widget by allowing `parse-embed` admin ajax requests with an empty `post_ID` just as `WP_oEmbed_Controller::get_proxy_item_permissions_check()` allows.
As of #34115 if there is no post context the oEmbed will be cached in an `oembed_cache` custom post type, so having a post as context is no longer a requirement for caching.

Props biskobe, westonruter.
See #34115, #40450.
Fixes #40854.


git-svn-id: https://develop.svn.wordpress.org/trunk@41913 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:39:46 +00:00
Jeremy Felt d4bdbbf542 Multisite: Document all return types in `get_sites()`.
Adds more complete documentation to `get_sites()` and the corresponding methods in `WP_Site_Query`.

Fixes #41789.


git-svn-id: https://develop.svn.wordpress.org/trunk@41912 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:38:35 +00:00
Sergey Biryukov d3df7a6a18 I18N: Remove `<a>` tag from a translatable string in `confirm_another_blog_signup()`.
Props ramiy.
Fixes #41694.

git-svn-id: https://develop.svn.wordpress.org/trunk@41911 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:35:55 +00:00
Sergey Biryukov aa3e40c32c I18N: Remove `<b>` tag from a translatable string in `post_submit_meta_box()`.
Props ramiy.
Fixes #41681.

git-svn-id: https://develop.svn.wordpress.org/trunk@41910 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:30:35 +00:00
Sergey Biryukov c7e02480bb I18N: Remove `<strong>` tag from a translatable string in `Theme_Upgrader::install_strings()`.
Props ramiy.
Fixes #41695.

git-svn-id: https://develop.svn.wordpress.org/trunk@41909 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:19:21 +00:00
Sergey Biryukov 8aaf0aa4bc I18N: Remove `<code>` tags from translatable strings in `Core_Upgrader`, `Language_Pack_Upgrader`, `Plugin_Upgrader`, `Theme_Upgrader`.
Props ramiy.
Fixes #41705.

git-svn-id: https://develop.svn.wordpress.org/trunk@41908 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:14:58 +00:00
Sergey Biryukov cb3abb4abc Docs: Correct type and description for the `$data` parameter in `WP_Http::browser_redirect_compatibility()`.
Fixes #41380.

git-svn-id: https://develop.svn.wordpress.org/trunk@41907 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 16:37:08 +00:00
Sergey Biryukov 129c9f42da I18N: Replace hardcoded file name in a translatable string in `convert_to_screen()` with a placeholder.
Props ramiy.
Fixes #41668.

git-svn-id: https://develop.svn.wordpress.org/trunk@41906 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 15:45:48 +00:00
Sergey Biryukov 1cc00439ae I18N: Make context for "Schedule" string added in [41898] more accurate.
Props ocean90.
Fixes #42165.

git-svn-id: https://develop.svn.wordpress.org/trunk@41905 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 15:38:27 +00:00
Sergey Biryukov facb2fe0ea I18N: Replace hardcoded file name in translatable strings in `wp-admin/setup-config.php` with a placeholder.
Props ramiy, danieltj.
Fixes #42161.

git-svn-id: https://develop.svn.wordpress.org/trunk@41904 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 15:26:10 +00:00
Konstantin Obenland e27c43d386 Customize: Unstick filter pane in Theme selector
Prevents the filter pane from blocking the view of theme search results when it's open.
Users are now able to just scroll to view results.

Props rclations.
Fixes #42212.


git-svn-id: https://develop.svn.wordpress.org/trunk@41903 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 15:10:19 +00:00
Sergey Biryukov c2db3e5baf Embeds: Avoid "Division by zero" warning in `embed-content.php` template if a thumbnail has a zero height.
Props stevenlinx, aegis123.
Fixes #40931.

git-svn-id: https://develop.svn.wordpress.org/trunk@41902 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 15:08:58 +00:00
Sergey Biryukov 55dd1738fd I18N: Replace function name in error message in `WP_Http_Curl::request()` and `WP_Http_Streams::request()` with a placeholder.
Props ramiy.
Fixes #41666.

git-svn-id: https://develop.svn.wordpress.org/trunk@41901 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 15:03:07 +00:00
Gary Pendergast 3afcaa1374 Dashboard: Ensure the "Dismiss" button on the Gutenberg callout is clickable.
Who likes z-index? We like z-index!

Props joemcgill.
See #41316.




git-svn-id: https://develop.svn.wordpress.org/trunk@41900 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 14:54:39 +00:00
Konstantin Obenland 043609bca4 Customize: Allow menu creation in locations pane
Adds a link to the menu creation workflow from the locations selector in the nav menu control.

Props bpayton, westonruter, Travel_girl, melchoyce, celloexpressions.
Fixes #36279.


git-svn-id: https://develop.svn.wordpress.org/trunk@41899 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 14:50:34 +00:00
Sergey Biryukov f2d01f25ba I18N: Add a context for "Schedule" string.
Props Mirucon.
Fixes #42165.

git-svn-id: https://develop.svn.wordpress.org/trunk@41898 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 14:44:07 +00:00
Mel Choyce 6f326e407d Code Editors: Fix display of "help" cursor.
Props studionashvegas .
Fixes #42210.


git-svn-id: https://develop.svn.wordpress.org/trunk@41897 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 13:10:16 +00:00
Gary Pendergast 65585359c3 Dashboard: Remove a rogue comma introduced in [41895].
See #41316.



git-svn-id: https://develop.svn.wordpress.org/trunk@41896 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 12:39:00 +00:00
Gary Pendergast 5fa59cf197 Dashboard: Introduce a "Try Gutenberg" callout.
To encourage more people to try Gutenberg, this new Dashboard box allows site users to easily install and try out Gutenberg.

Props pento, melchoyce, joen, karmatosed.
Fixes #41316.



git-svn-id: https://develop.svn.wordpress.org/trunk@41895 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 10:03:39 +00:00
Weston Ruter 896db16fc7 Customize: Add missing filter docs in `WP_Customize_Nav_Menu_Item_Setting::sanitize()`.
Props dlh.
Fixes #42257.


git-svn-id: https://develop.svn.wordpress.org/trunk@41894 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 04:56:10 +00:00
Weston Ruter 18057a93a2 Customize: Improve theme browsing UI on small screens.
Props Mahvash-Fatima, melchoyce, celloexpressions.
See #37661.
Fixes #42215.


git-svn-id: https://develop.svn.wordpress.org/trunk@41893 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 04:05:03 +00:00
Weston Ruter 6c6fe52a8d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41890 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 00:34:01 +00:00
Weston Ruter 9bca555920 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41889 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 00:07:30 +00:00
David A. Kennedy 3e3ec01c63 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41888 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-17 22:49:17 +00:00
Weston Ruter ce7a93c235 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41887 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-17 20:14:56 +00:00
Weston Ruter ee678ee1f5 Widgets: Prevent MediaElement.js player from overflowing sidebar in Audio widget.
Props bradyvercher.
See #39686.
Fixes #42244.


git-svn-id: https://develop.svn.wordpress.org/trunk@41886 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 23:01:55 +00:00
Felix Arntz 87410d2692 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41885 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 22:54:01 +00:00
Felix Arntz ad1d11f88d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41884 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 22:34:07 +00:00
Felix Arntz 363445adcb 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41883 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 22:28:52 +00:00
Helen Hou-Sandi 652c632355 Code Editors: Minor style improvements.
props melchoyce.
see #42214.


git-svn-id: https://develop.svn.wordpress.org/trunk@41882 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 21:35:15 +00:00
Boone Gorges fef4f1303a Taxonomy: Add note about `$number` inconsistency to `WP_Term_Query` docs.
Fixes #41796.

git-svn-id: https://develop.svn.wordpress.org/trunk@41881 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 18:37:35 +00:00
Boone Gorges f9dc276353 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41880 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 18:34:29 +00:00
John Blackbourn ae44a0964d Media: Allow the unminified mediaelement script to be enqueued when `SCRIPT_DEBUG` is true.
Props dsawardekar
Fixes #42229


git-svn-id: https://develop.svn.wordpress.org/trunk@41879 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 18:14:33 +00:00
Andrea Fercia d273fd8da1 Administration: Improve consistency of the "not found" strings.
Partially reverts [41608] restoring the original strings without the word `query`.

See #37430.
Fixes #42231.


git-svn-id: https://develop.svn.wordpress.org/trunk@41878 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 18:13:50 +00:00
Weston Ruter 97cde4e4e9 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41877 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 18:06:11 +00:00
Andrea Fercia 9dfb758afc 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41876 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 17:58:07 +00:00
Jeremy Felt 0bfa2d7468 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41875 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 17:05:25 +00:00
Sergey Biryukov b0400815a5 Administration: Remove punctuation from the link text in "Site Address" option description.
Props Presskopp.
Fixes #42190.

git-svn-id: https://develop.svn.wordpress.org/trunk@41874 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 14:01:41 +00:00
Weston Ruter 8661837eb9 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41873 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 07:56:28 +00:00
Weston Ruter 850db3c6a0 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41872 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 06:45:09 +00:00
Weston Ruter 75034a401f Customize: Prevent theme details modal from being clipped in Safari.
Props afercia.
See #42052, #37661.


git-svn-id: https://develop.svn.wordpress.org/trunk@41871 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 04:40:13 +00:00
Weston Ruter 97c5985748 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41869 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 22:42:00 +00:00
Weston Ruter 0e8b17dd64 Widgets: Rename "Custom Menu" widget to "Navigation Menu".
Props gk.loveweb, ChrisHardie, ajayghaghretiya1, melchoyce.
Fixes #40442.


git-svn-id: https://develop.svn.wordpress.org/trunk@41868 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 22:22:59 +00:00
Sergey Biryukov e0598057c8 Widgets: Move empty title checks out of the `apply_filters( 'widget_title' )` calls for clarity.
See #42226.

git-svn-id: https://develop.svn.wordpress.org/trunk@41867 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 21:42:52 +00:00
Sergey Biryukov 2885001d30 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@41866 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 21:28:13 +00:00
Weston Ruter cabd02a137 File Editor: Move inline to external style to fix extra padding in RTL page direction.
Props afercia.
Fixes #42221.


git-svn-id: https://develop.svn.wordpress.org/trunk@41865 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 05:50:43 +00:00
Weston Ruter 93bb527725 File Editor: Prevent the scrolling of current-file into view to also change initially-focused element in Chrome.
Props afercia.
Fixes #24048.


git-svn-id: https://develop.svn.wordpress.org/trunk@41864 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 05:36:10 +00:00
Weston Ruter c8889350e7 Customize: Fix visibility of theme browser header in Safari.
Props benoitchantre, afercia.
See #42052, #37661.


git-svn-id: https://develop.svn.wordpress.org/trunk@41863 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 04:57:46 +00:00
Felix Arntz dd43699344 Multisite: Return `get_current_blog_id()` value instead of hard-coded 1 in `get_main_site_id()` for non-multisite environments.
See #41936.


git-svn-id: https://develop.svn.wordpress.org/trunk@41862 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-14 22:45:28 +00:00
Felix Arntz 4d6c257cf9 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41861 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-14 22:41:15 +00:00
Weston Ruter a626ef6c81 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41860 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 21:20:42 +00:00
Helen Hou-Sandi 99cff48f61 File editor warning: Add a "Go back" button.
see #42100, #31779.


git-svn-id: https://develop.svn.wordpress.org/trunk@41859 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 20:55:50 +00:00
Mel Choyce e6908acb82 Settings: Widen time/day input fields on General Settings page, and move the preview onto the next line.
Props desrosj, afercia.
Fixes #41603.


git-svn-id: https://develop.svn.wordpress.org/trunk@41857 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 18:38:03 +00:00
Adam Silverstein b0cfcbb567 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41856 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 18:20:37 +00:00
Mel Choyce 99e6a95331 Improve File Credentials / Code Editor modal responsive styles.
Makes the modal full-width and height. 

Props sami.keijonen, Mirucon, helen.
Fixes #42111.


git-svn-id: https://develop.svn.wordpress.org/trunk@41854 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 14:39:00 +00:00
Weston Ruter 5ea6f41597 Customize: Fix positioning of Preview button in mobile.
Props Mahvash-Fatima.
Fixes #42172.


git-svn-id: https://develop.svn.wordpress.org/trunk@41853 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 08:22:56 +00:00
Weston Ruter 27a33509fb Code Editor: Remove keeping track of `wp.codeEditor` instances since unused and no removal of instances upon deletion, leading to memory leak.
See #12423.


git-svn-id: https://develop.svn.wordpress.org/trunk@41852 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 04:33:26 +00:00
Weston Ruter 8bf9afb4f4 File Editors: Display list of theme/plugin files in scrollable directory tree.
Props WraithKenny, afercia, melchoyce, westonruter.
Amends [41721].
Fixes #24048.


git-svn-id: https://develop.svn.wordpress.org/trunk@41851 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 02:38:19 +00:00
Gary Pendergast 1eda9654da Login: Swap `bloginfo()` usage for `get_bloginfo()`.
[41843] introduced a use of `bloginfo()`, where it should be using `get_bloginfo()`.

Props dlh.
Fixes #34625.



git-svn-id: https://develop.svn.wordpress.org/trunk@41850 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 02:09:42 +00:00
Boone Gorges 5c8c480d22 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@41849 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 15:19:30 +00:00