Commit Graph

36237 Commits

Author SHA1 Message Date
Sergey Biryukov 830f60ffb8 REST API: Unify some more permission error messages.
Props ramiy.
Fixes #38803.

git-svn-id: https://develop.svn.wordpress.org/trunk@39259 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 23:35:50 +00:00
Sergey Biryukov 6e997f7cf9 Text Changes: Unify permission error messages in `wp-admin/users.php`.
Props ramiy.
Fixes #38804.

git-svn-id: https://develop.svn.wordpress.org/trunk@39258 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 22:24:30 +00:00
Sergey Biryukov 922878c13f REST API: Unify permission error messages.
Props ramiy.
Fixes #38803.

git-svn-id: https://develop.svn.wordpress.org/trunk@39257 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 22:22:33 +00:00
Helen Hou-Sandi 2c3006d7a1 Theme starter content: Add more social link items to select from.
New: Foursquare, GitHub, LinkedIn, Pinterest, and YouTube. They are also now all alphabetized.

see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39256 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 21:19:40 +00:00
Helen Hou-Sandi 345341f8d9 Theme starter content: Revamp the credits widget into an about widget.
The credits widget from the original commit was a nice test to see the date changing, but isn't really very inspirational. Also, implement it in Twenty Seventeen.

see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39255 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 21:07:36 +00:00
Sergey Biryukov b059e8df3e I18N: Remove `<code>` tags from translatable strings in `wp-includes/class-wp-customize-manager.php`.
Props ramiy.
Fixes #38802.

git-svn-id: https://develop.svn.wordpress.org/trunk@39254 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 20:53:18 +00:00
Sergey Biryukov a0be8c4393 Text Changes: Unify permission error message in `wp-ajax-response.js`.
See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@39253 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 20:41:40 +00:00
Sergey Biryukov 72b100ed7e REST API: Remove two duplicate strings, use the ones we already have.
See #38791.

git-svn-id: https://develop.svn.wordpress.org/trunk@39252 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 20:39:13 +00:00
Sergey Biryukov 4230b2a17c REST API: Unify permission error messages.
Props ramiy.
See #38791, #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@39251 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 20:36:27 +00:00
Joe Hoyle d76017c51e REST API: Clean up argument and property types.
There's a couple of places where we were missing type notes for arguments, which mainly affects documentation.

Props jnylen0.
Fixes #38792.


git-svn-id: https://develop.svn.wordpress.org/trunk@39250 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 18:15:30 +00:00
Helen Hou-Sandi d37312f3bf Customize: More visible focus and hover states for close and back buttons.
props celloexpressions, folletto.
fixes #29158.


git-svn-id: https://develop.svn.wordpress.org/trunk@39249 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 18:10:16 +00:00
Joe McGill e9c20890da Twenty Seventeen: Compress the default header image.
This replaces the default `header.jpg` with a compressed version.
The original was 209KB and the new version is 143KB with almost no
distinguishable visual loss.

Props Presskopp.
Fixes #38793.

git-svn-id: https://develop.svn.wordpress.org/trunk@39248 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 18:00:22 +00:00
Andrea Fercia a3e9876c39 Accessibility: Improve the Post Attributes meta box fields labels.
With [38951] the support for custom page templates has been extended to all post
types. By making the visible meta box titles real labels, accessibility improves
for all users and form fields have meaningful labels.

Fixes #38790.


git-svn-id: https://develop.svn.wordpress.org/trunk@39247 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 16:00:41 +00:00
Joe McGill f922c64efa Media: Make PDF preview sizes filterable.
This adds a new filter, `fallback_intermediate_image_sizes`, which
can be used to modify the array of image sizes created for previewing
PDFs in the media library and checks for the existence of sizes before
processing any image representations of a PDF.

Fixes #38594.

git-svn-id: https://develop.svn.wordpress.org/trunk@39246 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 13:25:46 +00:00
Sergey Biryukov 9ae30a3725 REST API: After [39238] and [39239], move the remaining translator comments to preceding line.
See #38791.

git-svn-id: https://develop.svn.wordpress.org/trunk@39245 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 13:06:11 +00:00
Dominik Schilling (ocean90) 6e19fe7f5c Docs: Apply documentation standards to the new `get_available_languages` filter.
See #38788.

git-svn-id: https://develop.svn.wordpress.org/trunk@39244 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 09:51:17 +00:00
Weston Ruter 8bb2e8e9f7 Customize: Ensure edit shortcuts have same background color regardless of theme colors.
Fixes #38776.


git-svn-id: https://develop.svn.wordpress.org/trunk@39243 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 09:13:21 +00:00
Weston Ruter b7efb95bc9 Customize: Add `!important` `line-height` to edit shortcut buttons.
Ensure that icon inside edit shortcut is centered when theme defines default `line-height` for `button` elements.

Fixes #38787.


git-svn-id: https://develop.svn.wordpress.org/trunk@39242 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 09:07:49 +00:00
Weston Ruter 29629ecc52 Customize: Allow starter content to apply in a new theme when switching from another theme containing changes.
* Ensure that starter content can apply from theme B after previewing starter content in theme A.
* Introduce new `starter_content` flag in changeset setting params which is used to capture whether a value is starter content and thus can be overridden.
* Create changeset up-front with `starter_content` flags instead of waiting for `AUTOSAVE_INTERVAL`.
* Eliminate instantiation of settings for widget instances in favor of directly calling `sanitize_widget_js_instance`. This eliminates issues with looking for widgets before they are registered.
* Ensure that non-placeholders (inline arrays instead of string references) can be supplied in starter content.
* Re-use auto-draft posts as starter content across theme switches.
* Introduce `starter_content` param for `WP_Customize_Manager::save_changeset_post()` which is `false` except when starter content is being loaded on a `fresh_site`.

See #38114.
Fixes #38541.


git-svn-id: https://develop.svn.wordpress.org/trunk@39241 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 09:02:38 +00:00
Peter Wilson 55fd899391 Themes: Remove front page restriction from video header functions.
Adds a callback for determining when video headers should be displayed in themes supporting custom headers. By default, video headers are only displayed on the front page of a site.

Theme authors may set a custom callback by passing `'video-active-callback' => 'mytheme_video_active_callback'` as an argument. The default callback is `is_front_page()`.

This introduces the new function `is_header_video_active()` - returns `true` on pages that should display video headers. The return value can be filtered using the new filter of the same name.

Props flixos90, bradyvercher, peterwilsoncc, joemcgill.
Fixes #38738.


git-svn-id: https://develop.svn.wordpress.org/trunk@39240 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 07:15:20 +00:00
Ryan McCue 2d0cd4493c REST API: Move translator comments to preceding line.
Inline translator comments break POT file generation.

Props dd32.
See #38791.


git-svn-id: https://develop.svn.wordpress.org/trunk@39239 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 05:38:21 +00:00
Ryan McCue 6fee13fda7 REST API: Add translator comments to text with placeholders.
Props dimadin.
Fixes #38791.


git-svn-id: https://develop.svn.wordpress.org/trunk@39238 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 04:27:49 +00:00
Weston Ruter c03e8cd51c Customize: Only show video header controls if previewing front page; show explanatory notice when controls are hidden.
Also include todo for the `header_video` control's `button_labels`. See #38796.

Props westonruter, joemcgill, celloexpressions.
Fixes #38778.


git-svn-id: https://develop.svn.wordpress.org/trunk@39237 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 03:46:14 +00:00
Peter Wilson f62112fa16 Posts, Post Types: Improve sanitisation of templates' post types.
Prevents post type templates ignoring post types due to invalid characters. Each entry in the `Template Post Type` comment is run through `sanitize_key()` to match the sanitisation used by `register_post_type()`.

Fixes #38766.


git-svn-id: https://develop.svn.wordpress.org/trunk@39236 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 03:36:13 +00:00
Gary Pendergast 80bd60fb88 I18N: Add the `get_available_languages` filter.
Sometimes, a language file may not exist in exactly the format or location that `get_available_languages()` expects it to be in - for sites with this level of customisation, they need to be able to add their own language files to the list of those available.

Props yoavf.
Fixes #38788.



git-svn-id: https://develop.svn.wordpress.org/trunk@39235 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 01:18:37 +00:00
Weston Ruter 32325e8e1d Customize: Use video-specific labels for buttons in Header Video media control.
See #38172.


git-svn-id: https://develop.svn.wordpress.org/trunk@39234 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 00:21:33 +00:00
Weston Ruter ad0dae996e Customize: Adjust layout for edit shortcuts only when shown.
Add theme-specific positioning of edit shortcuts in Twenty Fourteen and Twenty Seventeen.

Props sirbrillig, sstoqnov, westonruter.
Fixes #38651.


git-svn-id: https://develop.svn.wordpress.org/trunk@39233 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 00:14:24 +00:00
Tammie Lister c8b86fdd52 Twenty Seventeen: Fix for mobile menu parent items requiring double tap
After further review from the accessibility team, it was determined that the menu items with sub-menus don't need the aria-haspopup attribute.

Props davidakennedy, celloexpressions, voldemortensen, afercia
See #38397



git-svn-id: https://develop.svn.wordpress.org/trunk@39232 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 22:33:40 +00:00
Helen Hou-Sandi 7ba0908947 Theme starter content: Add context to all strings.
fixes #38770.


git-svn-id: https://develop.svn.wordpress.org/trunk@39231 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 21:37:55 +00:00
Dominik Schilling (ocean90) cf220df2b7 I18N: Don't use `get_available_languages()` in `_load_textdomain_just_in_time()`.
`get_available_languages()` is only designed to work with translations for core. Using it for plugins/themes means unnecessary `strpos()` checks and incomplete results for plugins/themes whose names are beginning with `admin-` or `ms-`.

Props swissspidy, ocean90.
Fixes #38590.

git-svn-id: https://develop.svn.wordpress.org/trunk@39230 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 21:06:22 +00:00
Weston Ruter 58d01ff805 Customize: Maximize height of Custom CSS `textarea` without causing doubled scrollbars.
Textarea will fill vertical height of Custom CSS section for browsers that support `calc()` and when plugins don't add other controls to the section. Also run CSS autoprefixer.

Props michaelarestad, westonruter.
See #35395.
Fixes #38755.


git-svn-id: https://develop.svn.wordpress.org/trunk@39229 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 19:11:35 +00:00
Weston Ruter 292011aecc Customize: Improve styles for hover, focus, and active states on edit shortcuts.
Props michaelarestad.
Fixes #38758.


git-svn-id: https://develop.svn.wordpress.org/trunk@39228 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 18:48:59 +00:00
Weston Ruter 64e9d9f4eb Customize: Use selective refresh for custom header changes when possible.
* Use `postMessage` transport for header image settings by default when video headers are supported, and thus `the_custom_header_markup()` will necessarily be used (and thus a selective refresh partial will be available).
* Ensure that `the_custom_header_markup()` always outputs a container element in the customizer preview even if the header is empty.
* Ensure that edit shortcut appearing for custom header does not get positioned off-screen.

Props bradyvercher, westonruter.
See #38639.
Fixes #38737.


git-svn-id: https://develop.svn.wordpress.org/trunk@39227 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 18:40:08 +00:00
Tammie Lister 28befc73cd Twenty Fourteen: Removes video header support
Support was added to test implementation but never completed. This removes the test implementation.

Props davidakennedy
Fixes #38783


git-svn-id: https://develop.svn.wordpress.org/trunk@39226 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 17:16:04 +00:00
Tammie Lister bffa48a6ee Twenty Seventeen: Resolves focused controls hidden by the top menu.
When a page is scrolled, the top nav menu become fixed. Depending on the page content this caused issue where focused links or buttons may be hidden behind the  nav menu.

Props afercia, davidakennedy, Fencer04
Fixes #38476



git-svn-id: https://develop.svn.wordpress.org/trunk@39225 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 17:00:57 +00:00
Tammie Lister 6d7ed1e861 Twenty Seventeen: Fixes custom header text color issues
Removes default header text color and updates and updates selectors.

Props laurelfulford, davidakennedy, Idealien
Fixes #38391



git-svn-id: https://develop.svn.wordpress.org/trunk@39224 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 16:48:32 +00:00
Joe Hoyle 850dd1be76 REST API: Make all collection params filterable.
For developers wanting to add their own registered collection parameters, they can now use the `rest_$type_collection_params` filter. This brings consistency with the already existing `rest_$post_type_collection_params`.

Fixes #38710.
Props jnylen0.


git-svn-id: https://develop.svn.wordpress.org/trunk@39223 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 16:41:40 +00:00
Joe Hoyle 58169b04fa REST API: Validate and Sanitize registered meta based off the schema.
With the addition of Array support in our schema validation functions, it's now possible to use these in the meta validation and sanitization steps. Also, this increases the test coverage of using registered via meta the API significantly.

Fixes #38531.
Props rachelbaker, tharsheblows.


git-svn-id: https://develop.svn.wordpress.org/trunk@39222 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 16:35:35 +00:00
David A. Kennedy 76e44c9166 Twenty Seventeen: Make sure theme JavaScript follows proper coding standards
Props sstoqnov, afercia.

Fixes #38752.


git-svn-id: https://develop.svn.wordpress.org/trunk@39221 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 11:40:55 +00:00
David A. Kennedy 5b41a1c33e Twenty Seventeen: Make custom header preview match front end in Customizer when changed
* Toggles `has-header-image` body class  in Customizer preview whenever images or videos are added or removed.
* Hides the `.custom-header-image`div in CSS when an image or video haven't been set so preview changes are smoother.
* Also fixes the main issues in #38391 – making the preview match.

Props bradyvercher.

Fixes #38627.
See #38391.


git-svn-id: https://develop.svn.wordpress.org/trunk@39220 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 11:22:25 +00:00
Ryan McCue ecb1e33d0d REST API: Improve validation for usernames and passwords.
Also improves the slashing of user data in the REST API to avoid data loss.

Props jnylen0.
Fixes #38739.


git-svn-id: https://develop.svn.wordpress.org/trunk@39219 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 07:12:31 +00:00
Weston Ruter 47a04c044d Customize: Remove root panel description text which notes that edit shortcuts can be toggled by clicking anywhere in the preview.
Amends [39131], in which this method of toggling edit shortcuts was removed.
Props presskopp.
See #27403.


git-svn-id: https://develop.svn.wordpress.org/trunk@39218 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 04:32:47 +00:00
Andrew Ozz 61de8de75a TinyMCE: fix black outline around `_moz_abspos`. This is added in Firefox in paragraphs inserted after a non-editable block.
See #38757.

git-svn-id: https://develop.svn.wordpress.org/trunk@39217 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 02:33:05 +00:00
David A. Kennedy 2835aa5f99 Twenty Seventeen: Adds numbers to the table of contents in `style.css`
Props karmatosed.

Fixes #38767.


git-svn-id: https://develop.svn.wordpress.org/trunk@39216 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 23:44:39 +00:00
David A. Kennedy 40b3a5a878 Twenty Seventeen: Fix Customizer preview display issues in IE9
IE9 doesn't understands `vh ` (vertical height) when inside of an `iframe`. Normally IE9 will understand `vh` as the vertical height relative to the viewport, but in an `iframe`, IE9 thinks the vertical height is relative to the size of the whole page. So this fixes that when the site is viewed in the Customizer preview – an `iframe`.

Props laurelfulford.

Fixes #38722.


git-svn-id: https://develop.svn.wordpress.org/trunk@39215 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 23:30:53 +00:00
Weston Ruter 2158edc28f Customize: Prevent the "Hide Controls" button label from overrunning the device preview buttons.
Adds translation context for "Hide Controls" strings so translators can supply shorter strings where space is constrained. Adds styles to fade-out long the "Hide Controls" label where it would run into the device preview buttons.

Props westonruter, ocean90.
Fixes #38762.


git-svn-id: https://develop.svn.wordpress.org/trunk@39214 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 18:59:21 +00:00
Helen Hou-Sandi 0c044ba8d9 Media: Clearly indicate that PDF thumbnails are just document previews.
This helps affirm that your upload is fine, and has not been reduced down to the first page or changed into an image. This applies to the attachment details modal in the media library, where media is also now centered in the preview area.

props folletto, helen.
fixes #38717.


git-svn-id: https://develop.svn.wordpress.org/trunk@39213 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 16:38:06 +00:00
Dion Hulse 6ade77e936 WP_HTTP: Map internal Requests hooks to WordPress actions.
This change introduces a `requests-{$hook}` action which can be used to hook into Requests hooks, and restores the `http_api_curl` action.

Props rmccue.
Fixes #37843.


git-svn-id: https://develop.svn.wordpress.org/trunk@39212 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 10:35:15 +00:00
Dion Hulse 4404f32cb5 Updates: Allow background updates to update multiple plugins/themes in the same request.
Due to the `clear_update_cache` parameter not being respected, update caches were being cleared incorrectly which prevented multiple plugins to be updated at the same time in background updates - failing with a `fs_unavailable` error message.

Fixes #38024


git-svn-id: https://develop.svn.wordpress.org/trunk@39211 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 09:52:49 +00:00
Dion Hulse 7e9960edad Posts, Post Types: Fix Quick Edit to correctly set the page template for non-hierarchical post types.
Props dd32, swissspidy.
Fixes #38655.


git-svn-id: https://develop.svn.wordpress.org/trunk@39210 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 07:41:30 +00:00