Commit Graph

35500 Commits

Author SHA1 Message Date
David A. Kennedy
f7552bbf53 Twenty Seventeen: Remove excessive escaping in color-patterns.php
Uses `absint()` to escape when getting value. Removes `esc_attr` from each instance of the variable.

Props fencer04.

Fixes #38449.

Built from https://develop.svn.wordpress.org/trunk@38999


git-svn-id: http://core.svn.wordpress.org/trunk@38941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 21:53:46 +00:00
Tammie Lister
9fccac28d8 Twenty Seventeen: Hidden article tags on home page fix
This prevents the issue of hidden article tags on home page.

Props ElectricFeet, iv.dimova. morettigeorgiev, davidakennedy
Fixes #38404

M    twentyseventeen/inc/template-tags.php
M    twentyseventeen/style.css

Built from https://develop.svn.wordpress.org/trunk@38998


git-svn-id: http://core.svn.wordpress.org/trunk@38940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 21:01:34 +00:00
Andrew Ozz
3807829ac4 TinyMCE: if the current editor configuration is without toolbars, prevent errors when adding the labels for custom shortcuts.
Fixes #38063.
Built from https://develop.svn.wordpress.org/trunk@38997


git-svn-id: http://core.svn.wordpress.org/trunk@38939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 20:07:32 +00:00
David A. Kennedy
a8b19ca223 Twenty Seventeen: Fix broken and crowded pagination navigation on small screens
* Hides page numbers visually at smaller screen sizes.
* Reduced padding around `.wrap` class on smaller screens.
* Fixed issue with the page numbers not displaying the underline on `:hover`. This has been updated in the custom colors files, too.

Props laurelfulford, caspie.

Fixes #38394.

Built from https://develop.svn.wordpress.org/trunk@38996


git-svn-id: http://core.svn.wordpress.org/trunk@38938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 17:38:42 +00:00
Helen Hou-Sandí
529ca4d134 Post-4.7 beta 1 bump.
Built from https://develop.svn.wordpress.org/trunk@38995


git-svn-id: http://core.svn.wordpress.org/trunk@38937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 04:33:42 +00:00
Weston Ruter
e35ac97641 Customize: Remove premature (and verbose) check of fresh_site option due to database not being ready on multisite.
Fixes regression in [38991].
See #38114.

Built from https://develop.svn.wordpress.org/trunk@38994


git-svn-id: http://core.svn.wordpress.org/trunk@38936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 03:43:30 +00:00
Helen Hou-Sandí
7343b3bf40 WordPress 4.7 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@38992


git-svn-id: http://core.svn.wordpress.org/trunk@38935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 03:01:43 +00:00
Weston Ruter
75535c596b Customize: Introduce starter content and site freshness state.
A theme can opt-in for tailored starter content to apply to the customizer when previewing the theme on a fresh install, when `fresh_site` is at its initial `1` value. Starter content is staged in the customizer and does not go live unless the changes are published. Initial starter content is added to Twenty Seventeen.

* The `fresh_site` flag is cleared when a published post or page is saved, when widgets are modified, or when the customizer state is saved.
* Starter content is registered via `starter-content` theme support, where the argument is an array containing `widgets`, `posts`, `nav_menus`, `options`, and `theme_mods`. Posts/pages in starter content are created with the `auto-draft` status, re-using the page/post stubs feature added to nav menus and the static front page controls.
* A `get_theme_starter_content` filter allows for plugins to extend a theme's starter content.
* Starter content in themes can/should re-use existing starter content items in core by using named placeholders.
* Import theme starter content into customized state when fresh site.
* Prevent original_title differences from causing refreshes if title is present.
* Ensure nav menu item url is set according to object when previewing.
* Make sure initial saved state is false if there are dirty settings without an existing changeset.
* Ensure dirty settings are cleaned upon changeset publishing.

Props helen, westonruter, ocean90.
Fixes #38114, #38533.

Built from https://develop.svn.wordpress.org/trunk@38991


git-svn-id: http://core.svn.wordpress.org/trunk@38934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 02:57:35 +00:00
Gary Pendergast
60eb1ddc5c REST API: Revert [38980].
`/users/me` still needs attention, but this change wasn't quite ready.

See #38521.


Built from https://develop.svn.wordpress.org/trunk@38990


git-svn-id: http://core.svn.wordpress.org/trunk@38933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 02:07:35 +00:00
Joe McGill
f9f6dd7958 Customizer: Fix name of a partial in export_header_video_settings()
Following [38985], this updates a check for partials being set in
`export_header_video_settings()` to use the correct name.

Props bradyvercher.
See #38172.
Built from https://develop.svn.wordpress.org/trunk@38989


git-svn-id: http://core.svn.wordpress.org/trunk@38932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 01:51:31 +00:00
David A. Kennedy
69c8c4ede0 Twenty Seventeen: Make border colors for panels match WordPress UI
Also, fixes the visibility of the borders for panels after the header videos commit.

Props celloexpressions.

Fixes #38408.
See #38172.

Built from https://develop.svn.wordpress.org/trunk@38988


git-svn-id: http://core.svn.wordpress.org/trunk@38931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 23:24:32 +00:00
David A. Kennedy
1ccea74e32 Twenty Seventeen: Fix issue with missing background color in dark color scheme.
A background color style that was added to the front page during video header implementation did not get included in the `colors-dark.css`, causing a display issue with the dark color scheme.

Props laurelfulford.

See #38172.

Built from https://develop.svn.wordpress.org/trunk@38987


git-svn-id: http://core.svn.wordpress.org/trunk@38930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 23:01:30 +00:00
David A. Kennedy
769e718d2c Twenty Seventeen: Improve user and developer experience with the customizer integration
* Rename customizer JS files to customize-preview.js and customize-controls.js to align with the core file naming and make it clearer where each file runs.
* Only show the colorscheme_hue control when there's a custom color scheme.
* Update preview JS handling for revised front page section handling, see below.
* Remove all references to "Theme Customizer" in code comments. It hasn't been called that since before 4.0.
* Clarify the purpose of the JS files by updated the code comments in the file headers.
* Improve code readability.
* Make the arbitrary number of front page sections filterable, for UI registration and output.
* Rename twentyseventeen_sanitize_layout to twentyseventeen_sanitize_page_layout to be clearer about what it sanitizes in case child themes or plugins consider reusing it.
* Rename page_options setting/control to page_layout as that's more reflective of what that option does; and again, helps for potential extensions.
* Make the page layout option contextual to pages and the sidebar being inactive, as the option only applies when there is no sidebar (per its description).
* Condense options into a single section.
* Add selective refresh for front page sections.
* Locate active_callback functions within customizer.php so that they're easier to find when editing customizer registrations, similarly to sanitize callbacks.
* Adjust the styling for placeholders for panels that aren't active. 
* Ensure that the new visible edit shortcuts don't have any issues.

Props celloexpressions.

Fixes #38426.

Built from https://develop.svn.wordpress.org/trunk@38986


git-svn-id: http://core.svn.wordpress.org/trunk@38929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 22:09:40 +00:00
Joe McGill
030bc377dd Themes: Enable video in custom headers.
This adds the ability for themes to add support for videos in custom headers
by passing `'video' => true` as an argument when adding theme support for
custom headers.

Custom video headers are managed through the “Header Visuals” (i.e. “Header Image”)
panel in the Customizer where you can select a video from the media library or set a
URL to an external video (YouTube for now) for use in custom headers.

This introduces several new functions:

`has_header_video()` – Check whether a header video is set or not.
`get_header_video_url()` – Retrieve header video URL for custom header.
`the_header_video_url()` – Display header video URL.
`get_header_video_settings()` – Retrieve header video settings.
`has_custom_header()` – Check whether a custom header is set or not.
`get_custom_header_markup()` – Retrieve the markup for a custom header.
`the_custom_header_markup()` – Print the markup for a custom header.

And a new file, `wp-includes/js/wp-custom-header.js` that handles loading videos
in custom headers.

This also enables video headers in the Twenty Seventeen and Twenty Fourteen themes.

Props davidakennedy, celloexpressions, bradyvercher, laurelfulford, joemcgill.
Fixes #38172.
Built from https://develop.svn.wordpress.org/trunk@38985


git-svn-id: http://core.svn.wordpress.org/trunk@38928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 21:51:31 +00:00
Andrea Fercia
7b0abd1cea Accessibility: Hide the Toolbar sub-menu icons from assistive technologies.
CSS generated content is going to be rendered for speech output more and more in
the next future. When it's not intended to be available for speech output, for
example with font icons, then special care should be used to hide it from
assistive technologies. At the moment, the only reliable way to do this is making 
use of a wrapper element and set `aria-hidden="true"` on it.

Fixes #37513.

Built from https://develop.svn.wordpress.org/trunk@38984


git-svn-id: http://core.svn.wordpress.org/trunk@38927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 20:53:30 +00:00
Andrea Fercia
7a60d6571c Accessibility: Remove inappropriate content from the Posts and Edit screens headings.
Props grahamarmfield, SergeyBiryukov, trishasalas, valendesigns, rianrietveld, afercia.

See #26601.

Built from https://develop.svn.wordpress.org/trunk@38983


git-svn-id: http://core.svn.wordpress.org/trunk@38926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 20:39:39 +00:00
Rachel Baker
4a37a04d0f REST API: Return WP_Error when a client is attempting to update an option with a non-scalar value to null.
A `null` value is returned in the response for any option that has a non-scalar value.

To protect clients from accidentally including the `null` values from a response object in a request, we do not allow options with non-scalar values to be updated to `null`. Without this added protection a client could mistakenly delete all options that have non-scalar values from the database.

Props joehoyle, rachelbaker.
Fixes #38527.
Built from https://develop.svn.wordpress.org/trunk@38982


git-svn-id: http://core.svn.wordpress.org/trunk@38925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 16:08:45 +00:00
Andrea Fercia
432f5e76b2 Accessibility: Improve the Menus post type meta boxes pagination links.
- adds hidden text to the pagination links
- slightly increases the links clickable area
- fixes a JS error when clicking on the current page number
- avoids to generate nested `<div>` elements at each click 

Props xavortm, cwpnolen, afercia.

Fixes #35577.

Built from https://develop.svn.wordpress.org/trunk@38981


git-svn-id: http://core.svn.wordpress.org/trunk@38924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 15:23:31 +00:00
Rachel Baker
d42acc530c REST API: Remove the Location header redirect for the /users/me endpoint.
Props youknowriad jnylen0.
Fixes #38521.
Built from https://develop.svn.wordpress.org/trunk@38980


git-svn-id: http://core.svn.wordpress.org/trunk@38923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 14:37:36 +00:00
Weston Ruter
a6d3ba96e8 Customize: Add all dynamic settings for nav menus and nav menu items before previewing to ensure new entries (placeholders) will be recognized.
See #30937.

Built from https://develop.svn.wordpress.org/trunk@38979


git-svn-id: http://core.svn.wordpress.org/trunk@38922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 08:30:30 +00:00
Pascal Birchler
e8af4e510d I18N: Apply the locale filter when returning early in get_locale().
See [38976].
See #29783.
Built from https://develop.svn.wordpress.org/trunk@38978


git-svn-id: http://core.svn.wordpress.org/trunk@38921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 06:40:33 +00:00
Weston Ruter
62445cd41b Customize: Check for existence of controls and settings for background properties before attempting to access.
Amends [38948].
See #22058.
Fixes #38523.

Built from https://develop.svn.wordpress.org/trunk@38977


git-svn-id: http://core.svn.wordpress.org/trunk@38920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 05:02:35 +00:00
Gary Pendergast
1c5c130af9 I18N: Fix a PHP fatal when get_locale() is called before $wpdb is ready.
If WPDB needs to bail early, it loads the translations, which need to load the locale. Without WPDB, we can't get any database options, so can only rely on what's been loaded so far.

Fixes #29783.


Built from https://develop.svn.wordpress.org/trunk@38976


git-svn-id: http://core.svn.wordpress.org/trunk@38919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 03:43:49 +00:00
Boone Gorges
f2a7e841eb Share fixtures in REST API endpoint tests.
As sparrows' tears shed steadily
Make widest rivers filled,

`setUp()` routines run prodig'ly
Add minutes to a build.

So cull ye fixtures profligate!
Direct thine frugal gaze!

Our savings here - a half-minute -
When multiplied: Amaze!

See #30017.
Built from https://develop.svn.wordpress.org/trunk@38975


git-svn-id: http://core.svn.wordpress.org/trunk@38918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 02:57:41 +00:00
Boone Gorges
493f76a3d2 REST API: Use wp_get_object_terms() when fetching terms for a post object.
The WP-API plugin originally used a custom method for fetching object
terms in a way that supported the object cache and also accepted all
parameters for `get_terms()`. In [38667], the internals of
`wp_get_object_terms()` were modified to use `WP_Term_Query`, thus
delivering in a native fashion the features that the API had
previously achieved bespokely.

Fixes #38504.
Built from https://develop.svn.wordpress.org/trunk@38974


git-svn-id: http://core.svn.wordpress.org/trunk@38917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 01:42:32 +00:00
Gary Pendergast
582c8a12d2 Customize: Remove an unused variable.
The cleanup in [38972] missed a variable that is no longer being used.

Fixes #27403.


Built from https://develop.svn.wordpress.org/trunk@38973


git-svn-id: http://core.svn.wordpress.org/trunk@38916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 00:31:29 +00:00
Weston Ruter
022ee8ec36 Customize: Remove unnecessary code for edit shortcuts which is no longer required due to moving buttons inside of partial placement containers.
Props sirbrillig.
Amends [38967].
See #27403.

Built from https://develop.svn.wordpress.org/trunk@38972


git-svn-id: http://core.svn.wordpress.org/trunk@38915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 22:38:33 +00:00
Rachel Baker
21e0f964e3 REST API: Add the default_comment_status and default_ping_status options to the setting endpoint.
Props joehoyle.
See #38490.
Built from https://develop.svn.wordpress.org/trunk@38971


git-svn-id: http://core.svn.wordpress.org/trunk@38914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 22:21:01 +00:00
Andrew Ozz
95720f3b7c TinyMCE: after chats in #core-editor and #desing on Slack, the decision is to not remove Heading 1 for beta1.
See #38049.
Built from https://develop.svn.wordpress.org/trunk@38970


git-svn-id: http://core.svn.wordpress.org/trunk@38913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 22:01:33 +00:00
Tammie Lister
4233a600bf Twenty Seventeen: Placeholder styling
These were designed but never implemented.

Props melchoyce, davidakennedy
Fixes #38519


Built from https://develop.svn.wordpress.org/trunk@38969


git-svn-id: http://core.svn.wordpress.org/trunk@38912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 21:56:29 +00:00
Rachel Baker
d359ffc270 REST API: Remove experimental filter wrapper parameter from the Posts Controller class.
Hiding WP_Query params under the filter key (instead of allowing them to be top-level params) was one of our biggest complaints from users of v1 of our REST API. This walks back the re-introduction of the `filter` param during Beta 15, which introduced an "inconsistent mess" and "exposing WP_Query through filter has and will continue to be difficult to support." See https://github.com/WP-API/WP-API/issues/2799.

Props websupporter, rachelbaker.
Fixes #38378.
Built from https://develop.svn.wordpress.org/trunk@38968


git-svn-id: http://core.svn.wordpress.org/trunk@38911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 21:37:31 +00:00
Weston Ruter
71afe657b6 Customize: Add edit shortcuts in customizer preview to visually expose editable elements and focus on the corresponding controls when clicked.
* Edit shortcuts show initially for a moment and then fade away so as to not get in the way of the preview. 
* Visibility of edit shortcuts is toggled by clicking/touching anywhere inert in the document.
* Implements UI for mobile and touch devices which do not support shift-click.
* Adds `editShortcutVisibility` state.
* Adds new methods to `wp.customize.selectiveRefresh.Partial` for managing edit shortcuts.

Incorporates aspects of the Customize Direct Manipulation feature plugin.

Props sirbrillig, mattwiebe, celloexpressions, melchoyce, westonruter, afercia.
Fixes #27403.

Built from https://develop.svn.wordpress.org/trunk@38967


git-svn-id: http://core.svn.wordpress.org/trunk@38910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 20:03:32 +00:00
David A. Kennedy
834b7c608e Twenty Seventeen: Implement selective refresh for site title and tagline
Adding the `opacity` property to the site title prevents opacity from changing during selective refreshes in the Customizer preview.

Props celloexpressions.

Fixes #38513.

Built from https://develop.svn.wordpress.org/trunk@38966


git-svn-id: http://core.svn.wordpress.org/trunk@38909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 18:43:42 +00:00
Andrea Fercia
6fe17e2a3d Administration: Better accessibility for the "Post locked" indicator.
- hides the locked icon from assistive technologies
- adds hidden text to indicate the post is locked
- moves the info about who's currently editing to the top of the title table cell

Props mariovalney.
Fixes #38185.

Built from https://develop.svn.wordpress.org/trunk@38965


git-svn-id: http://core.svn.wordpress.org/trunk@38908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 17:59:29 +00:00
David A. Kennedy
a6df2cced5 Twenty Seventeen: Fix header height on sub-pages.
Moves `setNavProps` so it's no longer only fired on load when the scroll down arrow is present.

Props laurelfulford.

Fixes #38496.

Built from https://develop.svn.wordpress.org/trunk@38964


git-svn-id: http://core.svn.wordpress.org/trunk@38907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 17:39:31 +00:00
David A. Kennedy
3103b1ac78 Twenty Seventeen: Make table styles more consistent
* Removes the left padding on the first cell in a row, and the right padding on the last cell in each row - the padding is still there between cells, so the contents don't meet.
* Does the opposite for RTL, and fixes some spacing issues.
* Updates the editor styles to match.

Props laurelfulford, snacking.

Fixes #38447.

Built from https://develop.svn.wordpress.org/trunk@38963


git-svn-id: http://core.svn.wordpress.org/trunk@38906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 17:25:40 +00:00
David A. Kennedy
24ab3657cb Twenty Seventeen: Improve front end display in Internet Explorer 8
* Fixes the display issues with the header. The header doesn't look exactly like it does in newer browsers, but it's closer.
* Gets the font sizes a bit more consistent with how it looks like other browsers.
* IE8 doesn't support SVGs, so it's using the fallback styles for some of the icons. The fallbacks are limited to the absolutely necessary icons - so there is one for the submenu dropdown toggle icon, but not for the little 'hamburger' and X that sit in front of the 'menu' button.

Props laurelfulford.

Fixes #38472.

Built from https://develop.svn.wordpress.org/trunk@38962


git-svn-id: http://core.svn.wordpress.org/trunk@38905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 16:43:34 +00:00
Dominik Schilling
7819e2b4ba I18N: Introduce a locale-switching function.
With the introduction of user-specific languages in [38705] it's necessary to be able to switch translations on the fly. For example emails should be sent in the language of the recipient and not the one of the current user.

This introduces a new `WP_Locale_Switcher` class which is used for switching locales and translations. It holds the stack of locales whenever `switch_to_locale( $locale )` is called. With `restore_previous_locale()` you can restore the previous locale. `restore_current_locale()` empties the stack and sets the locale back to the initial value.

`switch_to_locale()` is added to most of core's email functions, either with the value of `get_locale()` (site language) or `get_user_locale()` (user language with fallback to site language).

Props yoavf, tfrommen, swissspidy, pbearne, ocean90.
See #29783.
Fixes #26511.
Built from https://develop.svn.wordpress.org/trunk@38961


git-svn-id: http://core.svn.wordpress.org/trunk@38904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 15:36:31 +00:00
Boone Gorges
91b518a716 REST API: Use term-specific caps for permission checks in term update and delete endpoints.
See #38505.
Built from https://develop.svn.wordpress.org/trunk@38960


git-svn-id: http://core.svn.wordpress.org/trunk@38903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:52:29 +00:00
Sergey Biryukov
919f08fd2d Comments: In comment_form(), bail early if comments for the post are closed.
Props jipmoors.
Fixes #38514.
Built from https://develop.svn.wordpress.org/trunk@38959


git-svn-id: http://core.svn.wordpress.org/trunk@38902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:48:29 +00:00
John Blackbourn
bc5c87710e Administration: Standardise the docblocks for the handle_bulk_actions-* filters.
Props ericlewis, Veraxus
Fixes #16031

Built from https://develop.svn.wordpress.org/trunk@38958


git-svn-id: http://core.svn.wordpress.org/trunk@38901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:45:29 +00:00
John Blackbourn
d2173fd5b0 Administration: Switch to handle_network_bulk_actions-{$screen} for the bulk listing screen actions in the network admin area.
Props ericlewis, Veraxus
See #16031

Built from https://develop.svn.wordpress.org/trunk@38957


git-svn-id: http://core.svn.wordpress.org/trunk@38900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:37:29 +00:00
John Blackbourn
6161ad9020 Formatting: Don't overwrite the status header for Ajax responses that use output buffering or otherwise set their headers early.
Fixes #35666

Built from https://develop.svn.wordpress.org/trunk@38956


git-svn-id: http://core.svn.wordpress.org/trunk@38899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:32:28 +00:00
Dominik Schilling
49c5fb895d I18N: Add $user_id argument to get_user_locale().
This allows to retrieve the locale of any user with the additional fallback to the site locale.

Fixes #38512.
See #29783, #26511.
Built from https://develop.svn.wordpress.org/trunk@38955


git-svn-id: http://core.svn.wordpress.org/trunk@38898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:15:32 +00:00
Rachel Baker
0c2a6184eb REST API: Add constructor to the WP_REST_Settings_Controller class.
Provides consistency with the other API endpoint controller classes.

Props Soean.
Fixes #38429.
Built from https://develop.svn.wordpress.org/trunk@38954


git-svn-id: http://core.svn.wordpress.org/trunk@38897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 13:45:47 +00:00
Sergey Biryukov
4bd54798ec I18N: Allow for WordPress Plugin Directory URL in plugin details modal to be localized.
Props Soean.
Fixes #38495. See #37501.
Built from https://develop.svn.wordpress.org/trunk@38953


git-svn-id: http://core.svn.wordpress.org/trunk@38896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 12:18:06 +00:00
Dominik Schilling
946da2d398 About Page: Use get_user_language() for the video subtitles.
Rename `$locale` to `$lang_code` to avoid stomping of the global `$locale`.

See #38485.
Built from https://develop.svn.wordpress.org/trunk@38952


git-svn-id: http://core.svn.wordpress.org/trunk@38895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 12:11:43 +00:00
Pascal Birchler
81a26f6900 Posts, Post Types: Add support for post type templates.
WordPress has supported custom page templates for over 12 years, allowing developers to create various layouts for specific pages.
While this feature is very helpful, it has always been limited to the 'page' post type and not was not available to other post types.

By opening up the page template functionality to all post types, we continue to improve the template hierarchy's flexibility.

In addition to the `Template Name` file header, the post types supported by a template can be specified using `Template Post Type: post, foo, bar`.
When at least one template exists for a post type, the 'Post Attributes' meta box will be displayed in the back end, without the need to add post type support for `'page-attributes'`. 'Post Attributes' can be customized per post type using the `'attributes'` label when registering a post type.

Props johnbillion, Mte90, dipesh.kakadiya, swissspidy.
Fixes #18375.
Built from https://develop.svn.wordpress.org/trunk@38951


git-svn-id: http://core.svn.wordpress.org/trunk@38894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 08:07:30 +00:00
Konstantin Kovshenin
a91706df62 Tests: Use correct arguments for wp_newComment XML-RPC method.
Fixes #38454
Props markoheijnen

Built from https://develop.svn.wordpress.org/trunk@38950


git-svn-id: http://core.svn.wordpress.org/trunk@38893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 07:52:29 +00:00
Mike Schroder
a8e304ec8e Media: Add support for rendering PDF thumbnails.
When support for PDFs is available, on upload,
render 'Thumbnail', 'Medium', 'Large', and 'Full' sizes of
the first page, and save them in attachment meta.

Use these renders within Add Media, Media Gallery and List views,
Attachment Details, Post/Attachment Edit screens, and Attachment pages.

Support available by default via Imagick -> ImageMagick -> Ghostscript,
but can be provided by any `WP_Image_Editor` that supports PDFs.

Props adamsilverstein, azaozz, celloexpressions, desrosj, dglingren, ericlewis, ipstenu, joemcgill, joyously, markoheijnen, melchoyce, mikeschroder, tomauger.
Fixes #31050.
Built from https://develop.svn.wordpress.org/trunk@38949


git-svn-id: http://core.svn.wordpress.org/trunk@38892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 07:28:32 +00:00