Commit Graph

35910 Commits

Author SHA1 Message Date
Ella van Dorpe bbd3e0174e TinyMCE views: fix Firefox issues.
* Set focus before rendering to prevent reload in Firefox.
* Rerender views if they are unloaded.
* Remove timeout added in [29513].
* Fix argument in wp.mce.views.render.
* Empty views on hide. Missed in #36434.

Props gitlost, azaozz, iseulde.
Fixes #38511.



git-svn-id: https://develop.svn.wordpress.org/trunk@39282 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 20:31:12 +00:00
Sergey Biryukov 3f11a75b2d Docs: Use 3-digit, x.x.x style semantic versioning for `@since 4.7.0` entries.
See #37770.

git-svn-id: https://develop.svn.wordpress.org/trunk@39281 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 18:27:16 +00:00
Sergey Biryukov f493ebb369 Taxonomy: Prevent `wp_list_categories()` from producing not well-nested output if `hide_title_if_empty` is true.
Props chesio.
Fixes #38839. See #33460.

git-svn-id: https://develop.svn.wordpress.org/trunk@39280 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 18:01:13 +00:00
Joe McGill 1c547f56c1 Twenty Seventeen: Additional default header image optimizations.
This is a follow-up to [39248] that applies a bit more compression to
the default header image in Twenty Seventeen.

Props Presskopp, lukecavanagh.
Fixes #38793.

git-svn-id: https://develop.svn.wordpress.org/trunk@39279 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 17:12:49 +00:00
Sergey Biryukov eb26b2a6a7 Text Changes: Merge some duplicate strings with the same meaning in error messages, adjust some other strings for consistency and accuracy.
Props ramiy, SergeyBiryukov.
Fixes #38808.

git-svn-id: https://develop.svn.wordpress.org/trunk@39278 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 15:52:18 +00:00
Andrea Fercia b2983232c3 Small coding standards cleanup of wp-custom-header.js.
Small coding standards cleanup of wp-custom-header.js after [39272].


git-svn-id: https://develop.svn.wordpress.org/trunk@39277 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 09:03:39 +00:00
Weston Ruter a3b66814a7 Customize: Add unit tests for importing theme starter content.
Props welcher, westonruter.
See #38114, #38533, #38615.
Fixes #38540.


git-svn-id: https://develop.svn.wordpress.org/trunk@39276 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 08:17:57 +00:00
Gary Pendergast 365241878f Database: Add support for `LIKE`-escaped tables in `::get_table_from_query()`.
The `SHOW TABLES LIKE` query can be used to search for tables that match a pattern, `wp\_123\_%`, for example. While this isn't the name of an actual table, the `wp_123_` prefix can be used by database drop-ins to direct the query correctly. This change removes the escaping and `%` modifier, to provide this usable prefix.

Props andy, pento.
Fixes #38751.



git-svn-id: https://develop.svn.wordpress.org/trunk@39275 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 04:20:22 +00:00
Boone Gorges 206a330d72 Comments: Query used to fill comment descendants should reset 'offset' and 'number' params.
Descendant queries should not inherit the 'offset' and 'number'
parameters of the parent query, or descendants will be missed.

Previously: [38497].

See #37696.

git-svn-id: https://develop.svn.wordpress.org/trunk@39274 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 03:02:40 +00:00
Joe McGill 1e05bf877e Twenty Seventeen: Add styles for custom header video controls.
Following [39272], this uses the `header_video_settings` filter to modify
the default video header control markup and adds theme specific styles
for the play/pause button.

Props melchoyce, laurelfulford, joemcgill, davidakennedy, bradyvercher.
Fixes #38697.

git-svn-id: https://develop.svn.wordpress.org/trunk@39273 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 23:37:42 +00:00
Joe McGill b5563ef917 Themes: Improve a11y and extendability of custom video headers.
This adds play/pause controls to video headers, along with voice
assistance, using `wp.a11y.speak`, to make custom video headers more
accessible. To make styling the play/pause button easier for themes,
CSS has been omitted from the default implementation.

This also includes a refactor of the `wp.customHeader` code to introduce
a `BaseHandler` class, which can be extended by plugins and themes to modify
or enhance the default video handlers.

Props davidakennedy, afercia, bradyvercher, joemcgill, adamsilverstein, rianrietveld.
Fixes #38678.

git-svn-id: https://develop.svn.wordpress.org/trunk@39272 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 23:25:28 +00:00
Weston Ruter ac9a74eff5 Customize: Ensure Close button actually closes customizer (instead of going back) after switching to a different theme inside a `customize-loader` iframe.
Fixes #38833.


git-svn-id: https://develop.svn.wordpress.org/trunk@39271 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 22:16:10 +00:00
Weston Ruter 0dbb9c4248 Customize: Prevent edit shortcut buttons from being inserted into container elements in the `head` or into elements which should not get interactive children.
See #27403, #38672.
Fixes #38830.


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