Commit Graph

90 Commits

Author SHA1 Message Date
Sergey Biryukov
12c8f0e678 Code Modernization: Introduce is_gd_image() to check for PHP 8 GdImage object instances.
In PHP 8, the GD extension uses `GdImage` objects instead of resources for its underlying data structures.

This updates the existing `is_resource()` calls for image resources in core to accomodate for `GdImage` instances as well.

Props ayeshrajans, jrf.
Fixes #50833.
Built from https://develop.svn.wordpress.org/trunk@48798


git-svn-id: http://core.svn.wordpress.org/trunk@48560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-16 13:33:09 +00:00
John Blackbourn
57a3f803ae Docs: First pass at some inline docs fixes mostly made by PHPCBF.
See #49572, #50744
Built from https://develop.svn.wordpress.org/trunk@48586


git-svn-id: http://core.svn.wordpress.org/trunk@48348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 20:01:04 +00:00
John Blackbourn
0bf9b04c53 Docs: Various formatting improvements to inline docblocks.
See #49572
Built from https://develop.svn.wordpress.org/trunk@48574


git-svn-id: http://core.svn.wordpress.org/trunk@48336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 00:52:05 +00:00
desrosj
4b60af1a6a General: Remove “whitelist” and “blacklist” in favor of more clear and inclusive language.
“The WordPress open source community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included.”

With this commit, all occurrences of “whitelist” and “blacklist” (with the single exception of the `$new_whitelist_options` global variable) are removed. A new ticket has been opened to explore renaming the `$new_whitelist_options` variable (#50434).

Changing to more specific names or rewording sentences containing these terms not only makes the code more inclusive, but also helps provide clarity. These terms are often ambiguous. What is being blocked or allowed is not always immediately clear. This can make it more difficult for non-native English speakers to read through the codebase.

Words matter. If one contributor feels more welcome because these terms are removed, this was worth the effort.

Props strangerstudios, jorbin, desrosj, joemcgill, timothyblynjacobs, ocean90, ayeshrajans, davidbaumwald, earnjam.
See #48900, #50434.
Fixes #50413.
Built from https://develop.svn.wordpress.org/trunk@48121


git-svn-id: http://core.svn.wordpress.org/trunk@47890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-22 17:26:13 +00:00
Sergey Biryukov
be16bb9fba Docs: Remove extra spaces from @param tags.
Per the documentation standards, `@param` tags should be aligned with each other, but not with the `@return` tag.

See #49572.
Built from https://develop.svn.wordpress.org/trunk@48110


git-svn-id: http://core.svn.wordpress.org/trunk@47879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-20 12:58:10 +00:00
Sergey Biryukov
a576a13246 Docs: Remove an empty line between @param and @return tags, per the documentation standards.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48102


git-svn-id: http://core.svn.wordpress.org/trunk@47871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-20 11:18:09 +00:00
Sergey Biryukov
641c632b0c Coding Standards: Use Yoda conditions where appropriate.
See #49222.
Built from https://develop.svn.wordpress.org/trunk@47219


git-svn-id: http://core.svn.wordpress.org/trunk@47019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-09 16:55:09 +00:00
Sergey Biryukov
001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Sergey Biryukov
3d623995a8 Docs: In various @return tags, list the expected type first, instead of WP_Error.
See #48303.
Built from https://develop.svn.wordpress.org/trunk@46696


git-svn-id: http://core.svn.wordpress.org/trunk@46496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-11 02:43:03 +00:00
John Blackbourn
7c2b9f2a2e Docs: Miscellaneous docblock fixes and improvements.
See #48303

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


git-svn-id: http://core.svn.wordpress.org/trunk@46391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-26 20:43:04 +00:00
Mike Schroder
69bb09df6e Media: Prevent unnecessary whitespace around PDF Thumbnails.
Stops unintended whitespace from showing around PDF thumbnails
when the PDF creation tool utilized a CropBox.

Props michelweimerskirch, joemcgill.
Fixes #45598.
Built from https://develop.svn.wordpress.org/trunk@46238


git-svn-id: http://core.svn.wordpress.org/trunk@46050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 10:36:57 +00:00
Sergey Biryukov
ff38f6fb20 Code Modernization: Remove a workaround for HHVM in WP_Image_Editor_Imagick::test().
Support for HHVM was dropped in 2017 via #40548.

Props jrf.
See #48074.
Built from https://develop.svn.wordpress.org/trunk@46216


git-svn-id: http://core.svn.wordpress.org/trunk@46028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 22:13:57 +00:00
Andrew Ozz
29ea4c6a4c Media/Upload: rotate images on upload according to EXIF Orientation.
Props msaggiorato, wpdavis, markoheijnen, dhuyvetter, msaggiorato, n7studios, triplejumper12, pbiron, mikeschroder, joemcgill, azaozz.

Fixes #14459.
Built from https://develop.svn.wordpress.org/trunk@46202


git-svn-id: http://core.svn.wordpress.org/trunk@46014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 18:21:57 +00:00
Sergey Biryukov
dcb08f0637 Docs: Fix placement of some duplicate hook references.
Hook documentation should be on the line directly above the line containing the `do_action()` or `apply_filters()` call. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of duplicate hook references.

Includes minor code layout fixes.

See #47110.
Built from https://develop.svn.wordpress.org/trunk@46088


git-svn-id: http://core.svn.wordpress.org/trunk@45900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-10 19:23:55 +00:00
Sergey Biryukov
e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Andrew Ozz
c5fed47367 Docs: Improve and update the description of multi_resize() to explain changes and expected use.
See #40439.
Built from https://develop.svn.wordpress.org/trunk@45892


git-svn-id: http://core.svn.wordpress.org/trunk@45703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-25 22:21:58 +00:00
Gary Pendergast
abcbee954f Coding Standards: Fix instances of WordPress.PHP.NoSilencedErrors.Discouraged.
Noteable changes:
- The `magic_quotes_runtime` and `magic_quotes_sybase` settings were removed in PHP 5.4, so no longer need to be set.
- Some functions that use external libraries can generate errors that can't be tested for, so are globally allowed to silence errors.
- Quite a few functions would cause errors if `safe_mode` was set. This setting was removed in PHP 5.4.
- Only a handful of `header()` calls needed corresponding `headers_sent()` checks for unit tests to pass, but more may need to be added as the nightlies builds are tested.

See #46732.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 05:45:58 +00:00
Andrew Ozz
05302bd054 Save progress of intermediate image creation after upload. First run.
- Introduces `wp_get_missing_image_subsizes()` and `wp_update_image_subsizes()` to generate image sub-sizes that are missing or were not created after the upload.
- Adds a way to display errors that happened while creating sub-sizes.
- Introduces `wp_create_image_subsizes()` intended for use after an image was uploaded. It saves/updates the image metadata immediately after each sub-size is created. This fixes the (long standing) problem when some of the sub-size image files were created but there was a timeout or an error and the metadata was not saved. Until now such uploads were considered "failed" which usually resulted in the user trying to upload the same image again, creating even more "orphan" image files.

Note that the patch also includes some unrelated WPCS fixes.

Props mikeschroder, azaozz.
See #40439.
Built from https://develop.svn.wordpress.org/trunk@45538


git-svn-id: http://core.svn.wordpress.org/trunk@45349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-15 01:02:52 +00:00
Sergey Biryukov
08227812a0 Docs: Remove @static notations from method DocBlocks in wp-includes/* classes.
This tag has been used in the past, but should no longer be used. Just using the `static` keyword in code is enough for PhpDocumentor on PHP5+ to recognize static variables and methods, and PhpDocumentor will mark them as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42746


git-svn-id: http://core.svn.wordpress.org/trunk@42576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:22:30 +00:00
Gary Pendergast
aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
John Blackbourn
9891448a42 Media: Rename several attachment related parameters from $post_id to $attachment_id for clarity, and improve related
documentation.

See #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 11:12:44 +00:00
Drew Jaynes
0860bb2771 Docs: Remove @access notations from method DocBlocks in wp-includes/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:41:44 +00:00
Sergey Biryukov
8c55e79bef Docs: Correct @access entry for ::load() in WP_Image_Editor, WP_Image_Editor_GD, and WP_Image_Editor_Imagick.
Props upadalavipul.
Fixes #41423.
Built from https://develop.svn.wordpress.org/trunk@41125


git-svn-id: http://core.svn.wordpress.org/trunk@40965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 14:11:44 +00:00
Drew Jaynes
1d95dcfa2c Docs: Remove superfluous @package WordPress and @subpackage notations used outside of file headers in a variety of core files.
Per the inline documentation standards for PHP, there should only be one `@package` and/or `@subpackage` notation per file, and only in the file header.

See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 16:58:42 +00:00
Mike Schroder
f780259d88 Media: After [40123], Feature check setImageOrientation.
In [40123], `WP_Image_Editor_Imagick` started using
`Imagick::setImageOrientation` and `Imagick::ORIENTATION_TOPLEFT`,
but had no equivalent feature check.

While they were introduced more than 9 years ago, it's important
to double-check everything is available before using with Imagick.

Fixes #37140.
Built from https://develop.svn.wordpress.org/trunk@40129


git-svn-id: http://core.svn.wordpress.org/trunk@40066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-27 04:22:51 +00:00
Mike Schroder
454acad22e Media: Reset Exif orientation after rotate in WP_Image_Editor_Imagick.
Due to inconsistencies in the way browsers handle Exif orientation data,
if a user manually rotates an image within WordPress, set the Exif orientation to
the default (1) so that the image displays with the same rotation/flip in every browser.

Props sanchothefat, triplejumper12, joemcgill, azaozz, markoheijnen, mikeschroder.
See #14459.
Fixes #37140.
Built from https://develop.svn.wordpress.org/trunk@40123


git-svn-id: http://core.svn.wordpress.org/trunk@40060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-25 05:26:41 +00:00
Dion Hulse
0a349c9641 PDF Images: Avoid a PHP Warning when attempting to process a file without an extension.
Props chandrapatel for initial patch.
Fixes #39195.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 06:19:41 +00:00
Mike Schroder
e12d3813f0 Media: Allow override of PDF setup for multiple pages or DPI.
After [39187], WordPress started loading only the first page of a PDF.

This is appropriate for performance, but made it impossible to
write plugins that read other pages without overriding `load()`.

Introduces `WP_Image_Editor_Imagick->pdf_setup()`, to allow an override
to change WordPress' rendering DPI defaults or which pages are loaded.

Fixes #38832. See #38522, #31050.
Props markoheijnen, joemcgill, mikeschroder.
Built from https://develop.svn.wordpress.org/trunk@39303


git-svn-id: http://core.svn.wordpress.org/trunk@39243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-18 22:22:32 +00:00
Mike Schroder
5cdb46c16a Media: Only load first PDF page for thumbnails.
To improve performance, directly load the first page of uploaded PDFs
to reduce the total clock time necessary to generate thumbnails.

Props dglingren, lukecavanagh, helen, johnbillion, mikeschroder.
See #38522.
Built from https://develop.svn.wordpress.org/trunk@39187


git-svn-id: http://core.svn.wordpress.org/trunk@39127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 21:05:30 +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
Dominik Schilling
aa561e67a1 Bootstrap: Enhance core's memory limit handling.
* Don't lower memory limit if the current limit is greater than `WP_MAX_MEMORY_LIMIT`.
* Set `WP_MEMORY_LIMIT` and `WP_MAX_MEMORY_LIMIT` to current limit if the `memory_limit` setting can't be changed at runtime.
* Use `wp_convert_hr_to_bytes()` when parsing the value of the `memory_limit` setting because it can be a shorthand or an integer value.
* Introduce `wp_raise_memory_limit( $context )` to raise the PHP memory limit for memory intensive processes. This DRYs up some logic and includes the existing `admin_memory_limit` and `image_memory_limit` filters. The function can also be used for custom contexts, the `{$context}_memory_limit` filter allows to customize the limit.
* Introduce `wp_is_ini_value_changeable( $setting )` to determine whether a PHP ini value is changeable at runtime.
* Remove a `function_exists( 'memory_get_usage' )` check. Since PHP 5.2.1 support for memory limit is always enabled.

Related commits: [38011-38013]

Props jrf, A5hleyRich, swissspidy, ocean90.
Fixes #32075.
Built from https://develop.svn.wordpress.org/trunk@38015


git-svn-id: http://core.svn.wordpress.org/trunk@37956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-08 14:37:30 +00:00
Drew Jaynes
311f800907 Docs: Ensure hook and duplicate hook docs directly precede all instances of the image_memory_limit filter.
Hook docs must directly precede hooks in order for the Code Reference parser to correctly identify them as such.

Fixes #36968. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@37560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-30 02:14:30 +00:00
Drew Jaynes
a7c601b74f Docs: Correct a duplicate filter comment for the image_memory_limit hook to point to the correct file.
Props bobbingwide.
See #36968.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-30 02:10:30 +00:00
Drew Jaynes
602b51a209 Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:15:28 +00:00
Drew Jaynes
b1804afeaf Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs.
Also use 'back-compat' in some inline comments where backward compatibility is the subject and shorthand feels more natural.

Note: 'backwards compatibility/compatibile' can also be considered correct, though it's primary seen in regular use in British English.

Props ocean90.
Fixes #36835.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-13 18:41:31 +00:00
Mike Schroder
5102c98ab6 Media: Resolve fatal error on resize with ImageMagick < 6.4.6
Improper checking for 'Imagick::ALPHACHANNEL_UNDEFINED' and
'Imagick::ALPHACHANNEL_OPAQUE' caused fatal errors for some users
with Imagick when compiled against ImageMagick < 6.4.6, when these
constants were introduced. Fixes these compatibility checks.

Props gblsm.
Fixes #36501.
Built from https://develop.svn.wordpress.org/trunk@37192


git-svn-id: http://core.svn.wordpress.org/trunk@37158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-13 06:18:28 +00:00
Mike Schroder
9af79e2582 Media: Fall back to GD when loading URL in HHVM Imagick.
HHVM does not currently support loading URLs in its port of Imagick.
Fixes `test_wp_crop_image_url()` failure introduced in [36916].

See #35973.
Built from https://develop.svn.wordpress.org/trunk@36996


git-svn-id: http://core.svn.wordpress.org/trunk@36963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-15 00:15:26 +00:00
Dominik Schilling
4497ddfcb2 Media: Merge two error messages and use sprintf() for the method names.
See #33642.
Built from https://develop.svn.wordpress.org/trunk@36968


git-svn-id: http://core.svn.wordpress.org/trunk@36936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 23:36:26 +00:00
Aaron Jorbin
1972aa2a2a Add grunt prerelease task
An unintended consequence of improving the precommit task is that when it's time to run a release, more tasks need to get run to verify things. This adds a prerelease task to help fix that situation. grunt prerelease should include tasks that verify the code base is ready to be released to the wild and find all the tears on the mausoleum floor and help Blood stain the Colosseum doors.

See #35557

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


git-svn-id: http://core.svn.wordpress.org/trunk@36898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 05:37:27 +00:00
Mike Schroder
1e120a01ec Media: Progressive enhancement for Imagick; add profiles to whitelist.
- Progressive enhancement for optional compression improvements and stripping meta.
- Whitelist IPTC and XMP profiles to maintain Copyright and Rights Usage Terms.
- Whitelist EXIF profile to maintain orientation information. If handled on upload in the future, it can be stripped as well.

Fixes #33642. See #28634.
Props joemcgill, juliobox, ahockley, markoheijnen, adamsilverstein, wonderboymusic, mikeschroder.
Built from https://develop.svn.wordpress.org/trunk@36891


git-svn-id: http://core.svn.wordpress.org/trunk@36858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-09 04:44:26 +00:00
Drew Jaynes
bbc3cde9b0 Docs: Improve DocBlock syntax and add a missing @return notation for WP_Image_Editor_Imagick::strip_meta(), introduced in [36700].
See: #33642, #30402, #28634. See #35986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-04 17:37:27 +00:00
Drew Jaynes
d8f8f68d42 Docs: Improve the hook doc summary for the image_strip_meta filter, introduced in [36700].
See: #33642, #30402, #28634. See #35986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-04 17:33:26 +00:00
Mike Schroder
f3afec6974 Media: Correct "Exception" typo in WP_Image_Editor_Imagick::strip_meta().
Exceptions are caught better if they're not excpeted.

Props joemcgill.
See #33642.
Built from https://develop.svn.wordpress.org/trunk@36742


git-svn-id: http://core.svn.wordpress.org/trunk@36709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-26 21:58:26 +00:00
Mike Schroder
2656dff5ad Media: Optimize Imagick settings for quality and filesize
- 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
2016-02-24 22:51:26 +00:00
Scott Taylor
d8eacd51d8 Media: add a new image size, medium_large. Bumps db version to add new options.
Adds unit tests.

Props DH-Shredder, joemcgill, azaozz.
Fixes #34196.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-31 20:50:25 +00:00
Drew Jaynes
b1b3fc5deb Docs: Re-clarify the $sizes[ $size ] section of the hash notations for WP_Image_Editor_GD::multi_resize() and WP_Image_Editor_Imagick::multi_resize() as not fully-optional.
The `$width` value is optional if `$height` is specified, and vice versa. The `$crop` value is always optional and defaults to false.

Props dh-shredder.
See #32246. See [35061] and [35062].

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


git-svn-id: http://core.svn.wordpress.org/trunk@35028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-12 16:34:23 +00:00
Drew Jaynes
041e3dd285 Docs: Fix hash notation syntax for the $sizes[ $size ] section in the DocBlock for WP_Image_Editor_Imagick::multi_resize().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-12 16:27:24 +00:00
Dominik Schilling
93a5af5753 Image Editor: Merge two error strings.
Props pavelevap.
See #22623.
Built from https://develop.svn.wordpress.org/trunk@34841


git-svn-id: http://core.svn.wordpress.org/trunk@34806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 22:40:25 +00:00
Scott Taylor
84da11d918 Pass false as the 2nd argument to class_exists() to disable autoloading and to not cause problems for those who define __autoload().
Fixes #20523.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 03:52:25 +00:00
Sergey Biryukov
3fb3d2a762 Replace @returns with @return in PHP docblocks.
props kraftbj.
fixes #32865.
Built from https://develop.svn.wordpress.org/trunk@33052


git-svn-id: http://core.svn.wordpress.org/trunk@33023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-02 21:05:24 +00:00