Commit Graph

32284 Commits

Author SHA1 Message Date
Drew Jaynes 73cfcece73 Docs: Adjust documentation for the `$size` parameter in the `begin_fetch_post_thumbnail_html` hook doc to clarify the required order of width and height values when an array is passed.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35070 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:48:26 +00:00
Drew Jaynes e918b66538 Docs: Adjust documentation for the `$size` parameter in the `post_thumbnail_size` hook doc to clarify the required order of width and height values when an array is passed.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35069 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:47:22 +00:00
Drew Jaynes debd363cd7 Docs: Adjust documentation for the `$size` parameter in `get_the_post_thumbnail()` to clarify the required order of width and height values when passing an array.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35068 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:46:15 +00:00
Drew Jaynes 5f5bcfb15a Docs: Adjust documentation for the `$size` parameter in `the_post_thumbnail()` to clarify the required order of width and height values when passing an array.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35067 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:45:18 +00:00
Drew Jaynes b0093711e4 Docs: Normalize spacing in the `wp_get_attachment_link` hook doc following [35065].
See #34257. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35066 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:43:19 +00:00
Drew Jaynes e73fbb948c Docs: Adjust documentation for the `$size` parameter in the `wp_get_attachment_link` hook doc to clarify the required order of width and height values when an array is passed.
Also adds the `array` type to the parameter documentation (already supported).

See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35065 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:41:54 +00:00
Drew Jaynes 6e4fdc4cbf Docs: Improve documentation for `get_site_icon_url()`, introduced in [32994].
Adds a missing `@since` version, fixes optional parameter syntax, adds default values, and fixes the return description.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35064 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:37:13 +00:00
Drew Jaynes 6cfda71af7 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].


git-svn-id: https://develop.svn.wordpress.org/trunk@35063 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:33:30 +00:00
Drew Jaynes f66e753d46 Docs: Fix hash notation syntax for the `$sizes[ $size ]` section in the DocBlock for `WP_Image_Editor_Imagick::multi_resize()`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35062 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:26:22 +00:00
Drew Jaynes 9575f53d50 Docs: Fix hash notation syntax for the `$sizes[ $size ]` section in the DocBlock for `WP_Image_Editor_GD::multi_resize()`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35061 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:25:24 +00:00
Drew Jaynes 8749c5fa18 Docs: Adjust documentation for the `$size` parameter in the `admin_post_thumbnail_size` hook doc to clarify the required order of width and height values when an array is passed.
See #34257. See #28512.


git-svn-id: https://develop.svn.wordpress.org/trunk@35060 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:21:57 +00:00
Drew Jaynes 6db985862a Docs: Normalize spacing in the `image_send_to_editor` hook doc following [35058].
See #34257. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35059 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:18:32 +00:00
Drew Jaynes 59db8cfe93 Docs: Adjust documentation for the `$size` parameter in the `image_send_to_editor` hook doc to clarify the required order of width and height values when an array is passed.
Also adds the `array` type to the parameter documentation (already supported).

See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35058 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:16:35 +00:00
Drew Jaynes f948ce0902 Docs: Fix the syntax for marking parameters optional and add defaults in the DocBlock for `wp_get_attachment_link()`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35057 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:14:03 +00:00
Drew Jaynes 25c0710f4c Docs: Fix syntax and properly mark optional parameters as such in the DocBlock for `get_image_send_to_editor()`.
Also fixes the return description, and adds the `$size` default value, missed in [35055].

See #34257. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35056 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:10:44 +00:00
Drew Jaynes 4d967258f2 Docs: Adjust documentation for the `$size` parameter in `get_image_send_to_editor()` to clarify the required order of width and height values when passing an array.
Also adds the `array` type to the parameter documentation (already supported).

See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35055 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:07:25 +00:00
Drew Jaynes 0cf4a5e121 Docs: Adjust the order of 'width' and 'height' (for consistency) for the `$crop` parameter documentation in `image_make_intermediate_size()`.
Props jaspermdegroot.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35054 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:05:30 +00:00
Drew Jaynes 6eb8c85678 Docs: Adjust the order of 'width' and 'height' (for consistency) for the `$crop` parameter documentation in `image_resize_dimensions()`.
Also similarly adjusts the `$crop` parameter description in the corresponding `image_resize_dimensions` hook doc.

Props jaspermdegroot.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35053 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 16:01:10 +00:00
Drew Jaynes 4d2fa13bf5 Docs: Adjust the order of 'width' and 'height' (for consistency) for the `$crop` parameter documentation in `set_post_thumbnail_size()`.
Props jaspermdegroot.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35052 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:59:11 +00:00
Drew Jaynes 1165053220 Docs: Adjust the order of 'width' and 'height' (for consistency) for the `$crop` parameter documentation in `add_image_size()`.
Props jaspermdegroot.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35051 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:58:13 +00:00
Drew Jaynes 9a3fcf9fee Docs: Adjust documentation for the `$size` parameter in `wp_get_attachment_link()` to clarify the required order of width and height values when passing an array.
Also adds the `array` type to the parameter documentation (already supported).

Props jaspermdegroot.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35050 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:55:12 +00:00
Drew Jaynes ac9254faf8 Docs: Adjust documentation for the `$size` parameter in `adjacent_image_link()` to clarify the required order of width and height values when passing an array.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35049 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:52:30 +00:00
Drew Jaynes e1d1e7a4af Docs: Adjust documentation for the `$size` parameter in `next_image_link()` to clarify the required order of width and height values when passing an array.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35048 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:49:52 +00:00
Drew Jaynes 0cebe5df94 Docs: Adjust documentation for the `$size` parameter in `previous_image_link()` to clarify the required order of width and height values when passing an array.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35047 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:47:50 +00:00
Drew Jaynes da8c9d6c7e Docs: Normalize spacing in the `$attr` hash notation for `gallery_shortcode()` following [35045].
See #34257. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35046 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:45:23 +00:00
Drew Jaynes 447cdf9fc1 Docs: Adjust documentation for the `$size` argument in `gallery_shortcode` to clarify the required order of width and height values when passing an array.
Also adds the `array` type to the argument documentation.

Props jaspermdegroot.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35045 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:42:22 +00:00
Drew Jaynes aeb289ca5f Docs: Adjust documentation for the `$size` parameter in `wp_get_attachment_image_url()` to clarify the required order of width and height values when passing an array.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35044 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:38:55 +00:00
Drew Jaynes 0d954c2c0b Docs: Adjust documentation for the `$size` parameter in the `wp_get_attachment_image_attributes` hook doc to clarify the required order of width and height values when an array is passed.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35043 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:37:17 +00:00
Drew Jaynes 4781b9d5d3 Docs: Adjust documentation for the `$size` parameter in `wp_get_attachment_image()` to clarify the required order of width and height values when passing an array.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35042 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:35:17 +00:00
Drew Jaynes 479532865d Docs: Adjust documentation for the `$size` parameter in the `wp_get_attachment_image_src` hook doc to clarify the required order of width and height values when an array is passed.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35041 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:33:48 +00:00
Drew Jaynes 43c2e54456 Docs: Adjust documentation for the `$size` parameter in `wp_get_attachment_image_src()` to clarify the required order of width and height values when passing an array.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35040 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:30:24 +00:00
Drew Jaynes cc1bcb6add Docs: Adjust documentation for the `$size` parameter in `image_get_intermediate_size()` to clarify the required order of width and height values when passing an array.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35039 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:28:45 +00:00
Drew Jaynes bb5c3bff20 Docs: Adjust documentation for the `$size` parameter in the `get_image_tag` hook doc to clarify the required order of width and height values when an array is passed.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35038 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:26:44 +00:00
Drew Jaynes 3fc7fea5f8 Docs: Adjust documentation for the `$size` parameter in the `get_image_tag_class` hook doc to clarify the required order of width and height values when an array is passed.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35037 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:25:41 +00:00
Drew Jaynes ac370db0cb Docs: Adjust documentation for the `$size` parameter in `get_image_tag()` to clarify the required order of width and height values when passing an array.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35036 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:20:55 +00:00
Drew Jaynes eae2d93f08 Docs: Adjust documentation for the `$size` parameter in the `image_downside` hook doc to clarify the required order of width and height values when an array is passed.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35035 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:19:13 +00:00
Drew Jaynes 259077deb5 Docs: Adjust documentation for the `$size` parameter in `image_downsize()` to clarify the required order of width and height values when passing an array.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35034 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:17:21 +00:00
Drew Jaynes bdfb256110 Docs: Adjust documentation for the `$size` parameter in `image_constrain_size_for_editor()` to clarify the required order of width and height values when passing an array.
See #34257.


git-svn-id: https://develop.svn.wordpress.org/trunk@35033 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:15:07 +00:00
Boone Gorges ed4eee668e Don't cache `WP_Term` objects in `wp_get_object_cache()`.
The data stored in the cache should be raw database query results, not
`WP_Term` objects (which may be modified by plugins, and may contain additional
properties that shouldn't be cached).

If term relationships caches were handled in `wp_get_object_terms()` - where
a database query takes place - it would be straightforward to cache raw data.
See #34239. Since, in fact, `get_the_terms()` caches the value it gets from
`wp_get_object_terms()`, we need a technique that allows us to get raw data
from a `WP_Term` object. Mirroring `WP_User`, we introduce a `data` property
on term objects, which `get_the_terms()` uses to fetch cacheable term info.

Fixes #34262.

git-svn-id: https://develop.svn.wordpress.org/trunk@35032 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:12:29 +00:00
Boone Gorges be5065a3ad Be stricter about sanitizing values coming out of `WP_Term`.
Data passed into `get_instance()` should be run through `sanitize_term()`
before being used.

See #34262.

git-svn-id: https://develop.svn.wordpress.org/trunk@35031 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:12:22 +00:00
Boone Gorges e8b0d11989 Fix incorrect setup in 'tag' query var test.
The test, introduced in [33724], was intended to demonstrate the behavior of
`example.com?tag=foo` routing. But an error in the test setup meant that a
URL-encoded tag object was being set as the value of 'tag'. Due to a quirk in
the way that `parse_request()` parses query vars, an object value for 'tag'
would inadvertently produce correct results in certain cases. But it's not a
usage we actively support, and it's not what was meant to be tested.

See #33532, #34262.

git-svn-id: https://develop.svn.wordpress.org/trunk@35030 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 15:03:43 +00:00
Boone Gorges d632e2c4c1 After [35028], normalize `get_term_field()` doc formatting.
Fixes #34245.

git-svn-id: https://develop.svn.wordpress.org/trunk@35029 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 04:13:31 +00:00
Boone Gorges 8847a58443 Don't require a `$taxonomy` to be specified in `get_term_field()`.
After [34997], the `$taxonomy` parameter of `get_term()` is optional. This
changeset brings `get_term_field()` in line with the new usage.

Adds unit tests for `get_term_field()`.

Props DrewAPicture.
See #34245.

git-svn-id: https://develop.svn.wordpress.org/trunk@35028 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 04:13:25 +00:00
Drew Jaynes ff65d77908 Docs: Wrap a couple of hook name references in inline `@see` tags in the hook docs for `custom_menu_order` and `menu_order`.
Inline `@see` tags in the context of hooks are parsed as links to hook pages in the Code Reference.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35027 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 03:38:11 +00:00
Jeremy Felt c8019610c8 MS: Reflect falsy values for `upload_space_check_disabled` in UI.
If the network option for `upload_space_check_disabled` is missing or an empty string, we should reflect how it will be treated elsewhere in the UI.

Props stephenharris.
Fixes #33986.


git-svn-id: https://develop.svn.wordpress.org/trunk@35026 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-12 00:00:28 +00:00
Jeremy Felt 3ee40d6652 MS: Reject truthy, non-numeric network ids in `_network_option()`.
A valid `$network_id` or `null`/`false` is expected as the first parameter for `_network_option()`. If something other than that is passed, we immediately return `false` rather than attempting to guess what network was intended.

See #28290.


git-svn-id: https://develop.svn.wordpress.org/trunk@35025 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-11 23:29:55 +00:00
Jeremy Felt 55122c1538 MS: Adjust `_network_option()` parameter order, `$network_id` is first.
This better aligns with expectations and matches the structure used by `_blog_option()`. The `_site_option()` functions remain as an appropriate method for working with the current network.

See #28290.


git-svn-id: https://develop.svn.wordpress.org/trunk@35024 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-11 22:43:59 +00:00
Drew Jaynes 16f56f4114 Media: Remove logic for unnecessarily overloading the `$content_width` global when passing default dimensions used to display the post thumbnail image in the 'Featured Image' meta box.
Updates documentation for the `$size` parameter in `admin_post_thumbnail_size` filter doc.

See #28512.


git-svn-id: https://develop.svn.wordpress.org/trunk@35023 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-11 17:09:33 +00:00
Drew Jaynes 4d98b99cc3 Media: Introduce the `admin_post_thumbnail_size` filter, which enables manipulation of the image size used to display the post thumbnail in the 'Featured Image' meta box.
This filter has no effect on the image size used to display post thumbnails on the front-end.

Props dboulet, DrewAPicture.
Fixes #28512.


git-svn-id: https://develop.svn.wordpress.org/trunk@35022 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-11 16:53:35 +00:00
Drew Jaynes bf0fa3a570 Docs: Fix some syntactical issues in property DocBlocks for `WP_List_Table`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35021 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-11 03:33:50 +00:00