- Resamples and sharpens larger images before resize.
- Uses imagick::FILTER_TRIANGLE for a smoother resize.
- Introduces `WP_Image_Editor_Imagick::thumbnail_image()` protected method to efficiently resize images. Similar to the functionality of Imagick's `thumbnailImage()`.
- Introduces `WP_Image_Editor_Imagick::strip_meta()` protected method and `image_strip_meta` filter that, by default, strip image profiles to reduce file size, while leaving color profiles intact.
See: #33642, #30402, #28634.
Props: joemcgill, dnewton, mikeschroder.
Built from https://develop.svn.wordpress.org/trunk@36700
git-svn-id: http://core.svn.wordpress.org/trunk@36667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Splits wp-includes/embed-template.php, introduced in 4.4, into five new templates that can be individually overridden by themes:
* embed.php
* embed-404.php
* embed-content.php
* header-embed.php
* footer-embed.php
Also introduces a new template tag for outputting the site title, `the_embed_site_title()`.
The five new templates live in theme-compat, allowing for graceful fallbacks should themes prefer not to override any or all of them.
Props swissspidy, imath, ocean90, DrewAPicture.
See #34561.
Built from https://develop.svn.wordpress.org/trunk@36693
git-svn-id: http://core.svn.wordpress.org/trunk@36660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When querying for terms in hierarchical taxonomies, `get_terms()` initially
queries for all matching terms, and then trims the located results based on the
`$number` and `$offset` arguments passed to the function. See #8832. However,
a flaw in the original logic meant that results were failing to be trimmed
properly in cases where `$offset` exceeds the total number of matching terms;
in these cases, we should force an empty array.
Props danielbachhuber.
Fixes#35935.
Built from https://develop.svn.wordpress.org/trunk@36691
git-svn-id: http://core.svn.wordpress.org/trunk@36658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Improves parity between partials and controls. A partial or control can be settingless if instantiated with `settings` param as empty array (otherwise, if null, then the partial/control ID is used).
* Eliminate need to create dummy settings that serve no purpose except to place a control in the UI.
* Removes dummy settings for `create_new_menu` and `new_menu_name`.
* Introduces `WP_Customize_Control::$capability` and `WP_Customize_Partial::$capability`, and if set checks them in the respective `check_capabilities()` methods.
* Prevents PHP fatal error from happening when non-existing settings are provided to control: "Call to a member function `check_capabilities()` on a non-object".
* Fixes issue where nav menu items and widgets were no longer working with selective refresh because cap check was failing.
See #27355.
Fixes#35926.
Built from https://develop.svn.wordpress.org/trunk@36689
git-svn-id: http://core.svn.wordpress.org/trunk@36656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Makes the list of comments a list
- Always displays the title of the post the comment relates to, linked to the post itself and no more to the Edit screen
- Headings: changes the visible one in "Recent Comments" and adds a hidden "View more comments" heading before the views links
- Adds the pending status indicator to Pingbacks and Trackbacks
Props rachelbaker, afercia.
Fixes#35392.
Built from https://develop.svn.wordpress.org/trunk@36683
git-svn-id: http://core.svn.wordpress.org/trunk@36650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Use the domain and path combination from `wp_blogs` when displaying the site address for the main site.\
* Update the text from "Site URL" to "Site Address (URL)" for all sites in `site-info.php` to better align with how we refer to this in single site.
Props flixos90, rachelbaker.
Fixes#35632.
Built from https://develop.svn.wordpress.org/trunk@36682
git-svn-id: http://core.svn.wordpress.org/trunk@36649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
To prevent inconsistent data across sites in a network the new email address is now stored in usermeta. Adds visual feedback for the case when an update has failed.
All existing options will be removed on a database upgrade.
Props MikeHansenMe, kovshenin, jeremyfelt, ocean90.
Fixes#23358.
Built from https://develop.svn.wordpress.org/trunk@36679
git-svn-id: http://core.svn.wordpress.org/trunk@36646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On the 21st of November, 2014, I committed tests for WP_REST_Request
to the API plugin. Although I didn't realise at the time, I was
causing my future self to go through hours of sufferring.
Unfortunately, I forgot to call parent::setUp() which would break
the tests in subtle ways in the future and would ruin the good part
of my day.
Let this be a warning to all of you who write future unit tests.
See f0396be17e
for the original commit.
Built from https://develop.svn.wordpress.org/trunk@36678
git-svn-id: http://core.svn.wordpress.org/trunk@36645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Remove the bottom half of the (old) modal and add autocomplete on the URL field.
- Disable the inline edit dialog in old IE (7, 8 and 9). Use only the modal there.
- Fix in IE10 and 11.
- Fix (most?) remaining edge cases.
- Fix focusing the inline dialog, the modal and the editor.
See #33301.
Built from https://develop.svn.wordpress.org/trunk@36677
git-svn-id: http://core.svn.wordpress.org/trunk@36644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
3 new filters that aim to improve the extensibility of Press This:
1) `press_this_save_post_content` - Applied right after the side_load_images in order to allow potential side loads of other types of media.
Example use case: side load non-image media, such as audio or video.
2) `press_this_useful_html_elements`
Allows filtering of currently hard coded array of HTML elements allowed in fetch_source_html step for special cases where additional HTML elements need to be kept.
Example use case: HTML5 elements, such as amp-img, that someone wants to pull in.
3) `press_this_suggested_content`
A filter for the content right before it's passed to the editor and presented to the user.
Example use case is when someone stored posts in a different, non-HTML format, such as Markdown, this is essential.
Fixes#34455.
Props cadeyrn, kraftbj
Built from https://develop.svn.wordpress.org/trunk@36672
git-svn-id: http://core.svn.wordpress.org/trunk@36639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Rename `$linea` to `$remote_source` for clarity.
* Add `remote_source` to comment data, so it's available to `preprocess_comment` and `comment_post` filters.
* Pass the original (unfiltered) response source to the filters too (as `remote_source_original` in comment data).
Props dshanske for the original patch.
Fixes#34141.
Built from https://develop.svn.wordpress.org/trunk@36661
git-svn-id: http://core.svn.wordpress.org/trunk@36628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Move the array processing to a new function, `_wp_post_revision_data()`.
* Make both functions accept a post array or a `WP_Post` object.
* Always apply the `_wp_post_revision_fields` filter and pass the post data to it.
Fixes#13382.
Built from https://develop.svn.wordpress.org/trunk@36659
git-svn-id: http://core.svn.wordpress.org/trunk@36626 1a063a9b-81f0-0310-95a4-ce76da25c4cd