Make WordPress Core


Ignore:
Timestamp:
08/31/2024 02:44:50 PM (5 weeks ago)
Author:
SergeyBiryukov
Message:

Docs: Correct comment formatting in wp_autosave_post_revisioned_meta_fields().

Follow-up to [56714].

See #61608.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/post.php

    r58419 r58961  
    20062006
    20072007/**
    2008  * Autosave the revisioned meta fields.
     2008 * Autosaves the revisioned meta fields.
    20092009 *
    20102010 * Iterates through the revisioned meta fields and checks each to see if they are set,
     
    20282028
    20292029    /*
    2030      * Go thru the revisioned meta keys and save them as part of the autosave, if
    2031      * the meta key is part of the posted data, the meta value is not blank and
    2032      * the the meta value has changes from the last autosaved value.
     2030     * Go through the revisioned meta keys and save them as part of the autosave,
     2031     * if the meta key is part of the posted data, the meta value is not blank,
     2032     * and the meta value has changes from the last autosaved value.
    20332033     */
    20342034    foreach ( wp_post_revision_meta_keys( $post_type ) as $meta_key ) {
    20352035
    2036         if (
    2037         isset( $posted_data[ $meta_key ] ) &&
    2038         get_post_meta( $new_autosave['ID'], $meta_key, true ) !== wp_unslash( $posted_data[ $meta_key ] )
     2036        if ( isset( $posted_data[ $meta_key ] )
     2037            && get_post_meta( $new_autosave['ID'], $meta_key, true ) !== wp_unslash( $posted_data[ $meta_key ] )
    20392038        ) {
    20402039            /*
     
    20452044            delete_metadata( 'post', $new_autosave['ID'], $meta_key );
    20462045
    2047             /*
    2048              * One last check to ensure meta value not empty().
    2049              */
     2046            // One last check to ensure meta value is not empty.
    20502047            if ( ! empty( $posted_data[ $meta_key ] ) ) {
    2051                 /*
    2052                  * Add the revisions meta data to the autosave.
    2053                  */
     2048                // Add the revisions meta data to the autosave.
    20542049                add_metadata( 'post', $new_autosave['ID'], $meta_key, $posted_data[ $meta_key ] );
    20552050            }
Note: See TracChangeset for help on using the changeset viewer.