Make WordPress Core

Changeset 56989


Ignore:
Timestamp:
10/23/2023 07:54:27 PM (6 months ago)
Author:
jorbin
Message:

Docs: Improve documentation for meta revision functions.

Backports [56984] to 6.4 branch.

Includes:

  • Correcting the position of @since 6.4.0 in a few places.
  • Adding missing @return documentation.
  • Adjusting parameter spacing.
  • Follow-up to [56714].

Props jeremyfelt, mukesh27, SergeyBiryukov.
Fixes #59666.

Location:
branches/6.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.4

  • branches/6.4/src/wp-includes/revision.php

    r56715 r56989  
    517517 * Restore the revisioned meta values for a post.
    518518 *
     519 * @since 6.4.0
     520 *
    519521 * @param int $post_id     The ID of the post to restore the meta to.
    520522 * @param int $revision_id The ID of the revision to restore the meta from.
    521  *
    522  * @since 6.4.0
    523523 */
    524524function wp_restore_post_revision_meta( $post_id, $revision_id ) {
     
    541541 * Copy post meta for the given key from one post to another.
    542542 *
     543 * @since 6.4.0
     544 *
    543545 * @param int    $source_post_id Post ID to copy meta value(s) from.
    544546 * @param int    $target_post_id Post ID to copy meta value(s) to.
    545547 * @param string $meta_key       Meta key to copy.
    546  *
    547  * @since 6.4.0
    548548 */
    549549function _wp_copy_post_meta( $source_post_id, $target_post_id, $meta_key ) {
     
    564564 *
    565565 * @param string $post_type The post type being revisioned.
    566  *
    567566 * @return array An array of meta keys to be revisioned.
    568567 */
     
    588587     * @since 6.4.0
    589588     *
    590      * @param array $keys       An array of meta fields to be revisioned.
     589     * @param array  $keys      An array of meta fields to be revisioned.
    591590     * @param string $post_type The post type being revisioned.
    592591     */
     
    597596 * Check whether revisioned post meta fields have changed.
    598597 *
     598 * @since 6.4.0
     599 *
    599600 * @param bool    $post_has_changed Whether the post has changed.
    600601 * @param WP_Post $last_revision    The last revision post object.
    601602 * @param WP_Post $post             The post object.
    602  *
    603  * @since 6.4.0
     603 * @return bool Whether the post has changed.
    604604 */
    605605function wp_check_revisioned_meta_fields_have_changed( $post_has_changed, WP_Post $last_revision, WP_Post $post ) {
Note: See TracChangeset for help on using the changeset viewer.