Changeset 43582
- Timestamp:
- 08/27/2018 02:27:22 PM (6 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/media/editor.js
r43347 r43582 610 610 }, 611 611 /** 612 * Set the featured image id, save the post thumbnail data and 613 * set the HTML in the post meta box to the new featured image. 612 * Sets the featured image ID property and sets the HTML in the post meta box to the new featured image. 614 613 * 615 614 * @param {number} id The post ID of the featured image, or -1 to unset it. -
trunk/src/wp-admin/includes/post.php
r43571 r43582 1520 1520 * @since 4.6.0 Added the `$thumbnail_id` parameter. 1521 1521 * 1522 * @param string $content Admin post thumbnail HTML markup.1523 * @param int $post_id Post ID.1524 * @param int $thumbnail_id Thumbnail ID.1522 * @param string $content Admin post thumbnail HTML markup. 1523 * @param int $post_id Post ID. 1524 * @param int|null $thumbnail_id Thumbnail attachment ID, or null if there isn't one. 1525 1525 */ 1526 1526 return apply_filters( 'admin_post_thumbnail_html', $content, $post->ID, $thumbnail_id ); -
trunk/src/wp-includes/class-wp-query.php
r43571 r43582 1687 1687 1688 1688 /** 1689 * Retrieve theposts based on query variables.1689 * Retrieves an array of posts based on query variables. 1690 1690 * 1691 1691 * There are a few filters and actions that can be used to modify the post … … 1694 1694 * @since 1.5.0 1695 1695 * 1696 * @return array List of posts.1696 * @return WP_Post[]|int[] Array of post objects or post IDs. 1697 1697 */ 1698 1698 public function get_posts() { … … 3358 3358 * 3359 3359 * @param string|array $query URL query string or array of query arguments. 3360 * @return array List of posts.3360 * @return WP_Post[]|int[] Array of post objects or post IDs. 3361 3361 */ 3362 3362 public function query( $query ) { -
trunk/src/wp-includes/class-wp-user.php
r43571 r43582 81 81 * 82 82 * @since 2.0.0 83 * @var array 83 * @var bool[] Array of key/value pairs where keys represent a capability name and boolean values 84 * represent whether the user has that capability. 84 85 */ 85 86 public $allcaps = array(); … … 479 480 480 481 /** 481 * Retrieve all of the role capabilities and merge with individual capabilities. 482 * 483 * All of the capabilities of the roles the user belongs to are merged with 484 * user's individual capabilities. This also means that the user can be denied 485 * specific capabilities that their role might have, but the user isn't granted 486 * permission to. 487 * 488 * @since 2.0.0 489 * 490 * @return array List of all capabilities for the user. 482 * Retrieves all of the capabilities of the roles of the user, and merges them with individual user capabilities. 483 * 484 * All of the capabilities of the roles of the user are merged with the user's individual capabilities. This means 485 * that the user can be denied specific capabilities that their role might have, but the user is specifically denied. 486 * 487 * @since 2.0.0 488 * 489 * @return bool[] Array of key/value pairs where keys represent a capability name and boolean values 490 * represent whether the user has that capability. 491 491 */ 492 492 public function get_role_caps() { … … 752 752 * 753 753 * @since 2.0.0 754 * @since 3.7.0 Added the user object.754 * @since 3.7.0 Added the `$user` parameter. 755 755 * 756 * @param bool[] $allcaps An array of all the user's capabilities. 757 * @param string[] $caps Actual capabilities for meta capability. 758 * @param array $args Optional parameters passed to has_cap(), typically object ID. 756 * @param bool[] $allcaps Array of key/value pairs where keys represent a capability name and boolean values 757 * represent whether the user has that capability. 758 * @param string[] $caps Required primitive capabilities for the requested capability. 759 * @param array $args { 760 * Arguments that accompany the requested capability check. 761 * 762 * @type string $0 Requested capability. 763 * @type int $1 Concerned user ID. 764 * @type mixed ...$2 Optional second and further parameters, typically object ID. 765 * } 759 766 * @param WP_User $user The user object. 760 767 */ -
trunk/src/wp-includes/general-template.php
r43571 r43582 2905 2905 2906 2906 /** 2907 * Filters the site icon meta tags, so Plugins can add their own.2907 * Filters the site icon meta tags, so plugins can add their own. 2908 2908 * 2909 2909 * @since 4.3.0 2910 2910 * 2911 * @param array $meta_tags Site Icon meta elements.2911 * @param string[] $meta_tags Array of Site Icon meta tags. 2912 2912 */ 2913 2913 $meta_tags = apply_filters( 'site_icon_meta_tags', $meta_tags ); -
trunk/src/wp-includes/media.php
r43571 r43582 3415 3415 * @since 3.5.0 3416 3416 * 3417 * @param array $response Array of prepared attachment data.3418 * @param WP_Post $attachment Attachment object.3419 * @param array $meta Array of attachment meta data.3417 * @param array $response Array of prepared attachment data. 3418 * @param WP_Post $attachment Attachment object. 3419 * @param array|false $meta Array of attachment meta data, or false if there is none. 3420 3420 */ 3421 3421 return apply_filters( 'wp_prepare_attachment_for_js', $response, $attachment, $meta ); -
trunk/src/wp-includes/meta.php
r43571 r43582 151 151 * @param mixed $prev_value Optional. If specified, only update existing metadata entries with 152 152 * the specified value. Otherwise, update all entries. 153 * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure. 153 * @return int|bool The new meta field ID if a field with the given key didn't exist and was 154 * therefore added, true on successful update, false on failure. 154 155 */ 155 156 function update_metadata( $meta_type, $object_id, $meta_key, $meta_value, $prev_value = '' ) { -
trunk/src/wp-includes/post.php
r43571 r43582 1824 1824 1825 1825 /** 1826 * Retrieve list of latest posts or posts matchingcriteria.1826 * Retrieves an array of the latest posts, or posts matching the given criteria. 1827 1827 * 1828 1828 * The defaults are as follows: … … 1845 1845 * @type bool $suppress_filters Whether to suppress filters. Default true. 1846 1846 * } 1847 * @return array List of posts.1847 * @return WP_Post[]|int[] Array of post objects or post IDs. 1848 1848 */ 1849 1849 function get_posts( $args = null ) { … … 1892 1892 1893 1893 /** 1894 * Add meta data field to apost.1894 * Adds a meta field to the given post. 1895 1895 * 1896 1896 * Post meta data is called "Custom Fields" on the Administration Screen. … … 1919 1919 1920 1920 /** 1921 * Remove metadata matching criteria from a post.1921 * Deletes a post meta field for the given post ID. 1922 1922 * 1923 1923 * You can match based on the key, or key and value. Removing based on key and 1924 1924 * value, will keep from removing duplicate metadata with the same key. It also 1925 * allows removing all metadata matching key, if needed.1925 * allows removing all metadata matching the key, if needed. 1926 1926 * 1927 1927 * @since 1.5.0 … … 1947 1947 1948 1948 /** 1949 * Retrieve post meta field for a post.1949 * Retrieves a post meta field for the given post ID. 1950 1950 * 1951 1951 * @since 1.5.0 … … 1954 1954 * @param string $key Optional. The meta key to retrieve. By default, returns 1955 1955 * data for all keys. Default empty. 1956 * @param bool $single Optional, default is false. 1957 * If true, return only the first value of the specified meta_key. 1958 * This parameter has no effect if meta_key is not specified. 1959 * @return mixed Will be an array if $single is false. Will be value of meta data 1956 * @param bool $single Optional. If true, returns only the first value for the specified meta key. 1957 * This parameter has no effect if $key is not specified. Default false. 1958 * @return mixed Will be an array if $single is false. Will be value of the meta 1960 1959 * field if $single is true. 1961 1960 */ … … 1965 1964 1966 1965 /** 1967 * Update post meta field based on post ID.1966 * Updates a post meta field based on the given post ID. 1968 1967 * 1969 1968 * Use the $prev_value parameter to differentiate between meta fields with the 1970 1969 * same key and post ID. 1971 1970 * 1972 * If the meta field for the post does not exist, it will be added .1971 * If the meta field for the post does not exist, it will be added and its ID returned. 1973 1972 * 1974 1973 * @since 1.5.0 … … 1977 1976 * @param string $meta_key Metadata key. 1978 1977 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar. 1979 * @param mixed $prev_value Optional. Previous value to check before removing. 1980 * Default empty. 1981 * @return int|bool Meta ID if the key didn't exist, true on successful update, 1982 * false on failure. 1978 * @param mixed $prev_value Optional. Previous value to check before updating. 1979 * @return int|bool The new meta field ID if a field with the given key didn't exist and was 1980 * therefore added, true on successful update, false on failure. 1983 1981 */ 1984 1982 function update_post_meta( $post_id, $meta_key, $meta_value, $prev_value = '' ) { … … 1996 1994 1997 1995 /** 1998 * Delete everything from post meta matchingmeta key.1996 * Deletes everything from post meta matching the given meta key. 1999 1997 * 2000 1998 * @since 2.3.0 … … 6491 6489 6492 6490 /** 6493 * Return the post's parent post ID.6491 * Returns the ID of the post's parent. 6494 6492 * 6495 6493 * @since 3.1.0 6496 6494 * 6497 6495 * @param int|WP_Post $post Post ID or post object. Defaults to global $post. 6498 * @return int|false Post parent ID , otherwise false.6496 * @return int|false Post parent ID (which can be 0 if there is no parent), or false if the post does not exist. 6499 6497 */ 6500 6498 function wp_get_post_parent_id( $post ) { … … 6560 6558 6561 6559 /** 6562 * Set a post thumbnail.6560 * Sets the post thumbnail (featured image) for the given post. 6563 6561 * 6564 6562 * @since 3.1.0 … … 6582 6580 6583 6581 /** 6584 * Remove a post thumbnail.6582 * Removes the thumbnail (featured image) from the given post. 6585 6583 * 6586 6584 * @since 3.3.0 6587 6585 * 6588 * @param int|WP_Post $post Post ID or post object where thumbnail should be removed from.6586 * @param int|WP_Post $post Post ID or post object from which the thumbnail should be removed. 6589 6587 * @return bool True on success, false on failure. 6590 6588 */ -
trunk/src/wp-includes/rest-api/class-wp-rest-response.php
r42343 r43582 194 194 195 195 /** 196 * Retrieves the handler that was responsible for generating the response.196 * Sets the handler that was responsible for generating the response. 197 197 * 198 198 * @since 4.4.0 -
trunk/src/wp-includes/rest-api/class-wp-rest-server.php
r43571 r43582 905 905 * @since 4.7.0 906 906 * 907 * @param WP_HTTP_Response $response Result to send to the client. Usually a WP_REST_Response.908 * @param WP_REST_Server $handler ResponseHandler instance (usually WP_REST_Server).909 * @param WP_REST_Request $request Request used to generate the response.907 * @param WP_HTTP_Response|WP_Error $response Result to send to the client. Usually a WP_REST_Response or WP_Error. 908 * @param array $handler Route handler used for the request. 909 * @param WP_REST_Request $request Request used to generate the response. 910 910 */ 911 911 $response = apply_filters( 'rest_request_before_callbacks', $response, $handler, $request ); … … 933 933 * @since 4.5.0 Added `$route` and `$handler` parameters. 934 934 * 935 * @param bool$dispatch_result Dispatch result, will be used if not empty.935 * @param mixed $dispatch_result Dispatch result, will be used if not empty. 936 936 * @param WP_REST_Request $request Request used to generate the response. 937 937 * @param string $route Route matched for the request. … … 964 964 * @since 4.7.0 965 965 * 966 * @param WP_HTTP_Response $response Result to send to the client. Usually a WP_REST_Response.967 * @param WP_REST_Server $handler ResponseHandler instance (usually WP_REST_Server).968 * @param WP_REST_Request $request Request used to generate the response.966 * @param WP_HTTP_Response|WP_Error $response Result to send to the client. Usually a WP_REST_Response or WP_Error. 967 * @param array $handler Route handler used for the request. 968 * @param WP_REST_Request $request Request used to generate the response. 969 969 */ 970 970 $response = apply_filters( 'rest_request_after_callbacks', $response, $handler, $request );
Note: See TracChangeset
for help on using the changeset viewer.