The `test_remove_orientation_data_on_rotate()` test was failing on systems that did not have the `exif` extension available.
Skips test when the `exif_read_data()` function does not exist.
Props danielbachhuber, desrosj.
Fixes#42447.
git-svn-id: https://develop.svn.wordpress.org/trunk@42431 602fd350-edb4-49c9-b593-d223f7449a82
Unfortunately, in my overzealous desire to fix all the un-capitalised Ps, [42343] capitalled some Ps that intentionally should not be capitals.
This commit fixes the incorrectly capitalling of Ps, as well as including unit tests and PHPCS instructions to ensure we never capitulate to capitalisationing them again.
Props superdav42.
Fixes#43040.
Fixes#43041.
git-svn-id: https://develop.svn.wordpress.org/trunk@42429 602fd350-edb4-49c9-b593-d223f7449a82
Use the `rest_authorization_required_code()` function to return a 401 status code when a permission callback fails due to a user not being logged in.
Props jaswrks.
Fixes#42828.
git-svn-id: https://develop.svn.wordpress.org/trunk@42421 602fd350-edb4-49c9-b593-d223f7449a82
Add `comments_list_table_query_args` filter to the Comments List Table.
Props soulseekah, birgire.
Fixes#42997.
git-svn-id: https://develop.svn.wordpress.org/trunk@42420 602fd350-edb4-49c9-b593-d223f7449a82
As decided in the JavaScript core chat. With a few reasons:
* It is visually cleaner when reading the source.
* This bring the JavaScript documentation closer to the PHP documentation.
The only disadvantage is that the JSDoc parser doesn't split out the summary and the description in the new format. We've decided to solve this when building the JavaScript documentation parser.
Props herregroen.
Fixes#42901.
git-svn-id: https://develop.svn.wordpress.org/trunk@42411 602fd350-edb4-49c9-b593-d223f7449a82
On the "Attachment Details" screen:
* The crop button is always 'enabled'.
* Clicking the crop button with no selection selects the entire image.
* Clicking the crop button with the entire image selected doesn't do anything.
* Clicking the crop button with a selection crops as expected.
Props sonjanyc, afercia, mikeschroder.
Fixes#30155.
git-svn-id: https://develop.svn.wordpress.org/trunk@42404 602fd350-edb4-49c9-b593-d223f7449a82
JSDoc takes it structural data from `@namespace`, `@lends` and `@memberOf`. This change fixes these tags for all JavaScript files in the wp-admin folder.
* Add jsdoc configuration to parse wp-admin/js files. Use `jsdoc -c jsdoc.conf.json` to generate JSDoc.
* Define all used namespaces using `@namespace`.
* Define each usage of the extend function as a prototype assignment using `@lends`.
* Add `@alias` if JSDoc cannot detect the correct name automatically.
This has previously been corrected for all `wp-includes` JavaScript files: [41351].
Props herregroen.
Fixes#42485.
git-svn-id: https://develop.svn.wordpress.org/trunk@42403 602fd350-edb4-49c9-b593-d223f7449a82
When a post slug is changed, we store a copy of the old slug, so that we can redirect visitors visiting the old URL to the new URL.
In the same way, this stores a copy of the old date, when the post date changes, so we can redirect visitors to the new URL.
Props nickmomrik.
Fixes#15397 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@42401 602fd350-edb4-49c9-b593-d223f7449a82
Rename `$post_ID` to `$post` for consistency with other functions.
Add unit tests for `wp_get_post_parent_id()`.
Props keesiemeijer.
Fixes#42797.
git-svn-id: https://develop.svn.wordpress.org/trunk@42397 602fd350-edb4-49c9-b593-d223f7449a82
Most of the documentation was already present. This change achieves the following:
* Fixes the formatting for most doc blocks.
* Adds `@since` tags to all functions.
* Makes sure the heartbeat public methods are correctly added to the `wp.heartbeat` namespace.
Props andizer, jjcomack, carolinegeven.
Fixes#42675.
git-svn-id: https://develop.svn.wordpress.org/trunk@42389 602fd350-edb4-49c9-b593-d223f7449a82
This change makes WordPress use `mysqli` on PHP <5.5 when available, instead of only in PHP 5.5+ and development installs.
WPDB includes a fallback to `mysql` in the event that the database connection fails with `mysqli` so incompatibilities should be few and far between.
Fixes#42812 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@42388 602fd350-edb4-49c9-b593-d223f7449a82
Fixes an incompatibility with the way caption width is set since 4.9, where the caption element would cover the whole content width.
Props slilley, Clorith, hardeepasrani.
Fixes#42604.
git-svn-id: https://develop.svn.wordpress.org/trunk@42386 602fd350-edb4-49c9-b593-d223f7449a82
The `custom-header.js` file is only used on the `wp-admin/themes.php?page=custom-header` page. As that page is no longer linked from the UI the functions in the file are marked deprecated.
Props nicollle, jipmoors, diedeexterkate.
Fixes#42678.
git-svn-id: https://develop.svn.wordpress.org/trunk@42385 602fd350-edb4-49c9-b593-d223f7449a82
Previously, only the `publish_posts` capability was checked. Now, the correct meta or primitive capability for the post type is used where appropriate.
Props peterwilsoncc
Fixes#42464
git-svn-id: https://develop.svn.wordpress.org/trunk@42380 602fd350-edb4-49c9-b593-d223f7449a82