Commit Graph

37881 Commits

Author SHA1 Message Date
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
Weston Ruter d6aece2a33 Bundled Themes: Fix fragile `update-theme` phpunit test which broke after version updates in [42105].
See #42090.


git-svn-id: https://develop.svn.wordpress.org/trunk@42106 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-02 01:25:57 +00:00