Commit Graph

35997 Commits

Author SHA1 Message Date
Dominik Schilling (ocean90) a9a8a9b121 Users: In `edit_user()` fall back to site's locale instead of `en_US` for invalid user locales.
See #38632, #29783.
Fixes #38798.

git-svn-id: https://develop.svn.wordpress.org/trunk@39269 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 20:11:12 +00:00
Weston Ruter be9b516d42 Customize: Allow URL for Codex link in Additional CSS section to be translated.
Props odysseygate, ocean90, westonruter.
See #35395.
Fixes #38823.


git-svn-id: https://develop.svn.wordpress.org/trunk@39268 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 18:41:13 +00:00
Sergey Biryukov a9b4305084 Tests: Add a missing `$message` argument for `assertEquals()` in [39265].
See #23626.

git-svn-id: https://develop.svn.wordpress.org/trunk@39267 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 13:42:03 +00:00
Sergey Biryukov b91eca1291 REST API: After [39252] and [39264], uppercase some more 'ID' references in translatable strings.
See #38791.

git-svn-id: https://develop.svn.wordpress.org/trunk@39266 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 13:27:10 +00:00
Sergey Biryukov 701b2d23f2 Tests: Use `assertEquals()`' native functionality for delta comparison in `test_wp_convert_bytes_to_hr()`.
See #23626.

git-svn-id: https://develop.svn.wordpress.org/trunk@39265 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 13:14:44 +00:00
Sergey Biryukov 9421418577 REST API: Uppercase 'ID' in endpoint descriptions and error messages for consistency with other strings.
See #38791.

git-svn-id: https://develop.svn.wordpress.org/trunk@39264 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 12:17:31 +00:00
Helen Hou-Sandi 93583764b5 Post-4.7 beta 4 bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@39263 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 01:53:12 +00:00
Helen Hou-Sandi d8fbae7fc3 WordPress 4.7 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@39262 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 01:34:31 +00:00
Helen Hou-Sandi 5d43d3a353 Theme starter content: Add reference IDs for most default widgets.
Some widgets that require more configuration are not included, such as RSS and Custom Menu. Tag Cloud is also not included because fresh sites do not have any tags to display.

Also adds a search widget to a Twenty Seventeen footer widget area.

see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39261 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 00:39:47 +00:00
Helen Hou-Sandi e29ff6f4ca Theme starter content: Refine the content for pages.
see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39260 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 00:28:27 +00:00
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