Changeset 47611 for trunk/src/wp-includes/post.php
- Timestamp:
- 04/22/2020 10:29:34 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r47610 r47611 2091 2091 * @param int $post_id Post ID. 2092 2092 * @param string $meta_key Metadata name. 2093 * @param mixed $meta_value Optional. Metadata value. Must be serializable if 2094 * non-scalar. Default empty. 2093 * @param mixed $meta_value Optional. Metadata value. If provided, 2094 * rows will only be removed that match the value. 2095 * Must be serializable if non-scalar. Default empty. 2095 2096 * @return bool True on success, false on failure. 2096 2097 */ … … 2111 2112 * 2112 2113 * @param int $post_id Post ID. 2113 * @param string $key Optional. The meta key to retrieve. By default, returns 2114 * data for all keys. Default empty. 2115 * @param bool $single Optional. If true, returns only the first value for the specified meta key. 2116 * This parameter has no effect if $key is not specified. Default false. 2117 * @return mixed Will be an array if $single is false. Will be value of the meta 2118 * field if $single is true. 2114 * @param string $key Optional. The meta key to retrieve. By default, 2115 * returns data for all keys. Default empty. 2116 * @param bool $single Optional. Whether to return a single value. 2117 * This parameter has no effect if $key is not specified. 2118 * Default false. 2119 * @return mixed An array if $single is false. The value of the meta field 2120 * if $single is true. 2119 2121 */ 2120 2122 function get_post_meta( $post_id, $key = '', $single = false ) { … … 2137 2139 * @param string $meta_key Metadata key. 2138 2140 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar. 2139 * @param mixed $prev_value Optional. Previous value to check before updating. Default empty. 2140 * @return int|bool The new meta field ID if a field with the given key didn't exist and was 2141 * therefore added, true on successful update, false on failure. 2141 * @param mixed $prev_value Optional. Previous value to check before updating. 2142 * Default empty. 2143 * @return int|bool Meta ID if the key didn't exist, true on successful update, 2144 * false on failure. 2142 2145 */ 2143 2146 function update_post_meta( $post_id, $meta_key, $meta_value, $prev_value = '' ) { … … 6767 6770 * 6768 6771 * @param int[] $post_ids Array of post IDs. 6769 * @return array|false Returns false if there is nothing to update or an array 6770 * of metadata. 6772 * @return array|false An array of metadata on success, false if there is nothing to update. 6771 6773 */ 6772 6774 function update_postmeta_cache( $post_ids ) {
Note: See TracChangeset
for help on using the changeset viewer.