Commit Graph

13568 Commits

Author SHA1 Message Date
johnbillion 4af1237176 Docs: Correct the `@since` property for the `page_attributes_misc_attributes` action.
Props jeremyescott, jfarthing84

Fixes #42607


git-svn-id: https://develop.svn.wordpress.org/trunk@42203 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-19 11:51:01 +00:00
Felix Arntz b424eecd0b Multisite: Do not show edit links in network users table for users that cannot be edited.
Props ocean90.
Fixes #42552.


git-svn-id: https://develop.svn.wordpress.org/trunk@42202 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-17 21:34:01 +00:00
Dion Hulse 21ad5a9e40 Remove the `svn:executable` property from files that don't need it.
See #42594


git-svn-id: https://develop.svn.wordpress.org/trunk@42200 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-17 02:57:27 +00:00
Sergey Biryukov 603e195f10 Rewrite Rules: Correct the logic in `extract_from_markers()` after [41928].
Props stodorovic.
Fixes #42579. See #39920.

git-svn-id: https://develop.svn.wordpress.org/trunk@42199 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-16 13:24:57 +00:00
Weston Ruter aec1fb9aa0 Editor: Re-build `tinymce.min.js` after [42191].
See #42553.


git-svn-id: https://develop.svn.wordpress.org/trunk@42193 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-15 23:34:57 +00:00
Weston Ruter 7371834069 Editor: Disable `wp_keep_scroll_position` in IE11 since buggy; fix `matches` polyfill conflict with ME.js by doing runtime feature detection in context window.
Props westonruter, SergeyBiryukov, Clorith for testing.
See #41962, #42029.
Fixes #42553 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42191 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-15 18:58:26 +00:00
Weston Ruter 551163278b File Editor: Eliminate gap inserted between code editor and heading in IE11 when CodeMirror initializes.
Props afercia, melchoyce, Clorith for testing, SergeyBiryukov for testing.
See #12423.
Fixes #42554 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42189 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-15 18:28:33 +00:00
Weston Ruter 323a8c95f0 Customize: Prevent themes panel from auto-expanding in IE11.
In IE11 the `input` event erroneously gets triggered initially without any user input.

Amends [41648].
See #37661.
Fixes #42556 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42187 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-15 18:11:17 +00:00
Weston Ruter 672eb9206b Widgets: Set global `$post` to current queried object instead of nullifying when `is_singular()` while applying filters (and shortcodes) in Text widget and (via plugin) Custom HTML widget.
Also prevent `[gallery]` shortcode from dumping out every attachment on the site when a containing Text widget is shown on an archive template.

Props westonruter, bobbingwide, joemcgill for testing.
See #10457.
Fixes #42548, #42547 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42185 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-15 02:26:56 +00:00
Weston Ruter c9b825d5f5 Editor: Improve scrolling behavior and prevent autosave logic from causing dirty state when just switching between Visual and Text tabs.
Props pento.
See #41962, #42029.
Fixes #42530 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42183 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-15 00:20:21 +00:00
Weston Ruter 4126cbbd9c About Page: Fix issue with overlapping images and text on IE11 and Edge 15.
Props Clorith, ryelle, afercia, la-geek, SergeyBiryukov.
See #42514.
Fixes #42545.


git-svn-id: https://develop.svn.wordpress.org/trunk@42181 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-14 23:01:55 +00:00
Peter Wilson ca40a244d7 Editor: Cease adding paragraphs when switching editor tabs.
Fixes an error since [41783] in which extra paragraphs could be added to content when switching editor tabs.

Props pento, adamsilverstein, aduth.
Fixes #42531.



git-svn-id: https://develop.svn.wordpress.org/trunk@42177 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-14 05:23:55 +00:00
Gary Pendergast 7dfdbf2754 Editor: When switching Editor tabs, don't scroll unnecessarily.
- When switching to the Text view, wait until after the Visual editor element has been hidden, before focussing the `<textarea>`.
- When switching to the Visual view, only scroll if the cursor is not visible on the current screen.

Fixes #42530.



git-svn-id: https://develop.svn.wordpress.org/trunk@42175 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-14 05:18:10 +00:00
Weston Ruter cc68415a23 About: Fix jumping behavior for titles and columns when scrolling.
Props ryelle.
See #42087.
Fixes #42514, #42526.


git-svn-id: https://develop.svn.wordpress.org/trunk@42173 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-13 22:28:20 +00:00
Weston Ruter e260210294 Customize: Allow notifications for linting errors in code editor control (for Additional CSS) to be overridden to allow saving.
Implements the same override that was implemented in [41721] for the theme/plugin editors.

See #41897, #41887.
Fixes #42528.


git-svn-id: https://develop.svn.wordpress.org/trunk@42171 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-13 21:18:49 +00:00
Weston Ruter 33f7cfd2b9 Customize: Prevent PHP notice on theme-switch dashboard welcome link (and link to themes admin screen) when user cannot `customize`.
Props skostadinov, ocean90.
Amends [41699].
See #42050.
Fixes #42525.


git-svn-id: https://develop.svn.wordpress.org/trunk@42169 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-13 19:24:49 +00:00
Boone Gorges f7dabb40c1 Correct documentation for `status` param of `WP_Comment_Query`.
The `status` parameter accepts an array or string/comma-separated list.

Introduced in [30084].

Props pbiron.
Fixes #41338.

git-svn-id: https://develop.svn.wordpress.org/trunk@42165 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-13 16:25:18 +00:00
Weston Ruter e26f3b5baf I18N: Fix passing singular/plural strings to JS.
This is a temporary solution while waiting for full I18N support in JS.

Props ocean90, dd32, westonruter, Mirucon for testing.
Amends [41376], [41721], [41389],
See #20491.
Fixes #42510 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42163 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-13 07:07:55 +00:00
Weston Ruter 2f297cfeff About: Add vertical alignment for developer happiness sections.
Also run CSS autoprefixer to add `-ms-` prefixes for CSS grid identifiers for IE11.

Props Presskopp.
Amends [42121].
See #42087.
Fixes #42524 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42161 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-13 05:47:05 +00:00
Weston Ruter e6e518cbe5 About: Fix grammar typo with pluralization.
Props metodiew, westonruter.
Amends [42121].
See #42087.
Fixes #42476 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42159 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-13 05:18:10 +00:00
Weston Ruter 48980cd541 About: Synchronize 4.9 tagline across about pages for credits, freedoms, and privacy.
Props dave.pullig.
Amends [41943].
See #42087.
Fixes #42518 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42157 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-12 19:58:13 +00:00
Weston Ruter 64a9b85f77 Theme Editor: Fix styling of child theme notice.
Props westonruter, melchoyce, ndiego.
See #24048.
Fixes #42491 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42155 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-11 20:42:04 +00:00
Weston Ruter 138ffd49a9 Customize: Restore ability to add Custom Link nav menu items for jump links and other URLs that were previously allowed.
Simplify regular expression for checking URL validity to just do basic checks to confirm the value looks like a URL. Leave the complete validation to the server-side logic in `WP_Customize_Nav_Menu_Item_Setting::sanitize()` to avoid having to maintain two separate codebases for validating URLs.

Props westonruter, SergeyBiryukov for testing.
Amends [41697].
See #32816.
Fixes #42506 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42153 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-10 23:40:41 +00:00
Weston Ruter b4c66ad91b Customize: Prevent nav menu location assignment checkbox change from increasing height by 1px.
Props obenland.
Amends [41817].
See #42157.
Fixes #42492.


git-svn-id: https://develop.svn.wordpress.org/trunk@42152 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-10 23:00:21 +00:00
John Blackbourn fc40dea2fd Docs: Correct parameter type documentation for various `__call()` methods.
See #42505


git-svn-id: https://develop.svn.wordpress.org/trunk@42151 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-10 22:56:01 +00:00
Weston Ruter f42f19e1c5 Customize: Improve accuracy of message displayed when accessing Customizer with a changeset that is already published or trashed.
Amends [38810].
Props dlh.
Fixes #42497.


git-svn-id: https://develop.svn.wordpress.org/trunk@42150 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-10 22:50:49 +00:00
Weston Ruter d0fefcde8b Customize: Ensure customization drafts are published instead of trashed when scheduled changeset goes live while non-admin user is authenticated (such as during WP Cron).
Props designsimply for testing, dlh for testing, melchoyce for testing.
See #28721, #34923, #42220.
Fixes #42489 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42148 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-10 22:43:30 +00:00
Weston Ruter 08a3691775 Settings: Replace `count()` call with `empty()` in `get_settings_errors()` to prevent PHP 7.2 warnings when `$wp_settings_errors` is `null`.
Props pross, dd32, westonruter.
See #40109.
Fixes #42498 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42146 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-10 22:29:45 +00:00
Weston Ruter 89bea84d6e Customize: Ensure autosave revision is dismissed immediately after implicit restoration notice dismissal as done with explicit notice dismissal.
Fixes issue where a drafted/scheduled changeset could inadvertently re-use the previous autosave revision in the preview while a user expects it to have been dismissed.

See #39896, [41597].
Fixes #42502 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42144 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-10 21:43:32 +00:00
John Blackbourn 605505e9f7 Docs: Improve inline docs for the `wp_redirect()` and `wp_safe_redirect()` functions.
See #42505, #42108


git-svn-id: https://develop.svn.wordpress.org/trunk@42143 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-10 13:43:07 +00:00
Gary Pendergast 58fad5bf57 REST API: Add `permalink_structure` to the index endpoint.
This allows Gutenberg to implement permalink editing.

Props schlessera.
Fixes #42465.



git-svn-id: https://develop.svn.wordpress.org/trunk@42142 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-10 06:10:23 +00:00
Weston Ruter d7af48d421 Widgets: Style the Image Widget's link field as invalid when a bad URL is supplied.
Fixes issue where user may supply an invalid URL and be unable to save the widget on the Widgets admin screen without being told why.

Amends [41252].
See #41274.
Fixes #42488.


git-svn-id: https://develop.svn.wordpress.org/trunk@42140 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-10 01:27:30 +00:00
Weston Ruter c994a2e9bb Customize: Fix reliability of just-in-time publishing for changesets that miss their schedule when visiting `customize.php`.
When just doing `wp_publish_post()` for the changeset from `customize.php`, any option-based settings will fail to get saved because `WP_Customize_Manager` would have already been loaded with `settings_previewed`, resulting in `update_option()` calls being short-circuited. So an admin-ajax request to `customize_save` is used to work around this.

Props westonruter, jeremyfelt, dlh for testing, LittleBigThing for testing.
Amends [41626].
See #28721, #39221.
Fixes #42457 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42138 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-09 04:43:09 +00:00
Weston Ruter d671098003 Customize: Ensure `autosaving` message gets sent to preview after initial change when `saved` state is first dirty.
Amends [41667].
Fixes #42475 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42136 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-09 04:14:46 +00:00
Weston Ruter ac5a3fc7a8 Settings: Fix date/time format previewing.
Props afercia.
Amends [41857].
Fixes #41603.


git-svn-id: https://develop.svn.wordpress.org/trunk@42134 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-09 03:54:13 +00:00
Weston Ruter 7a6ed11319 Customize: Restore search icon to available widgets pane incorrectly removed in [41893].
See #42215.
Fixes #42472 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@42132 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-09 01:01:53 +00:00
Gary Pendergast 1c64182c6b Admin Bar: Fix another HTML error introduced in [42128].
Props Otto42.
See #41057.



git-svn-id: https://develop.svn.wordpress.org/trunk@42131 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-08 23:12:37 +00:00
Dion Hulse 56659638dc External Libraries: Update Random_Compat from 1.2.1 to 2.0.11.
Notably this fixes PHP7 parse errors of the files and removes the OpenSSL functionality.
Full Changes: https://github.com/paragonie/random_compat/compare/v1.2.1...v2.0.11

Props jrdelarosa.
See #42439.


git-svn-id: https://develop.svn.wordpress.org/trunk@42130 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-08 11:47:04 +00:00
Gary Pendergast e7d649e621 Admin Bar: Fix a HTML error introduced in [42128].
Props swissspidy.
See #41057.



git-svn-id: https://develop.svn.wordpress.org/trunk@42129 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-08 08:51:03 +00:00
Gary Pendergast e9282049e8 Admin Bar: Reformat the render methods.
The admin bar render methods use some cute tricks which don't come close to the WordPress coding standards. So that we can more easily apply automated code fixing to the codebase, these tricks need to be removed.

See #41057.



git-svn-id: https://develop.svn.wordpress.org/trunk@42128 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-08 08:34:41 +00:00
Weston Ruter 9f77ec13ff Trunk is now 5.0-alpha
git-svn-id: https://develop.svn.wordpress.org/trunk@42127 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-07 05:46:41 +00:00
Weston Ruter ff6114f853 Post WordPress 4.9 RC2 bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@42125 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-07 05:25:47 +00:00
Weston Ruter 6668ba7995 WordPress 4.9 RC2.
git-svn-id: https://develop.svn.wordpress.org/trunk@42124 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-07 04:53:36 +00:00
Konstantin Obenland 03136e1b23 About: Hardcoded image sources.
We're committed to these images now.

See #42087.


git-svn-id: https://develop.svn.wordpress.org/trunk@42123 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-07 04:25:26 +00:00
Weston Ruter a397b8f6bb Customize: Fix logic inversion in [42113] which prevented themes from being installed in Customizer.
Also fix PHP notice related to parent themes and WordPress.org theme query results.

Props dd32, obenland, celloexpressions, westonruter, atachibana for testing.
See #42406, #37661.
Fixes #42442.


git-svn-id: https://develop.svn.wordpress.org/trunk@42122 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-07 04:16:11 +00:00
Mel Choyce 6f8428e8b5 About Page: Implement design.
Props ryelle, karmatosed, transl8or, obenland, melchoyce.
See #42087.


git-svn-id: https://develop.svn.wordpress.org/trunk@42121 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-07 04:10:41 +00:00
Gary Pendergast 000809964a WPDB: Check that `AUTH_SALT` is not empty.
In `wpdb::placeholder_escape()`, the key for `hash_hmac()` defaults to `AUTH_SALT`, but `hash_hmac()` will return an empty string if the key is empty.

This had the side effect of the string `{}` being incorrectly replaced with a `%` character in queries just about to be run on the database.

Props jsonfry.
Fixes #42431.



git-svn-id: https://develop.svn.wordpress.org/trunk@42120 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-07 01:08:11 +00:00
Gary Pendergast f7fbbcba0d WPDB: Fix a PHP notice when `AUTH_SALT` is undefined.
In `wpdb::placeholder_escape()`, the key for `hash_hmac()` falls back to `rand()` when `AUTH_SALT` is undefined. `hash_hmac()` requires the key to be a string, however, so we need to cast it as such.

Props mkomar.
Fixes #42401.



git-svn-id: https://develop.svn.wordpress.org/trunk@42119 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-07 00:29:26 +00:00
Weston Ruter b23d590bf2 Customize: Prevent `customize_autosaved=on` from getting added to frontend preview URLs.
Amends [41969].
See #39896, #42450.
Fixes #42433.


git-svn-id: https://develop.svn.wordpress.org/trunk@42118 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-06 23:10:05 +00:00
Weston Ruter 2ae0f807ce Customize: Fall back to ISO date format for date/time control inputs if year, month, or day are missing from the `date_format` option.
Amends [42111].
Props dlh, westonruter.
Fixes #42394.


git-svn-id: https://develop.svn.wordpress.org/trunk@42117 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-06 20:27:37 +00:00
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