Make WordPress Core

Ticket #50502: 50502.diff

File 50502.diff, 1.6 KB (added by stevenlinx, 5 years ago)
  • src/wp-includes/post.php

    diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
    index b5eff61a06..98e02e78d1 100644
    a b function get_post_meta( $post_id, $key = '', $single = false ) { 
    21362136 * @since 1.5.0
    21372137 *
    21382138 * @param int    $post_id    Post ID.
    2139  * @param string $meta_key   Metadata key.
    2140  * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
    2141  * @param mixed  $prev_value Optional. Previous value to check before updating.
     2139 * @param string $meta_key   Metadata key (this should be raw as opposed to sanitized for database queries).
     2140 * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar (this should be raw as opposed to sanitized for database queries).
     2141 * @param mixed  $prev_value Optional. Previous value to check before updating. This is to differentiate between several fields with the same key. If omitted, and there are multiple rows for this post and meta key, all meta values will be updated.
    21422142 *                           Default empty.
    2143  * @return int|bool Meta ID if the key didn't exist, true on successful update,
    2144  *                  false on failure.
     2143 * @return int|bool Meta ID if the key didn't exist; otherwise, true on successful update,
     2144 *                  false on failure. Note: If the meta_value passed to this function is the same as the value that is already in the database, this function returns false.
    21452145 */
    21462146function update_post_meta( $post_id, $meta_key, $meta_value, $prev_value = '' ) {
    21472147        // Make sure meta is added to the post, not a revision.