wp_prepare_revision_for_js

过滤钩子


apply_filters( 'wp_prepare_revision_for_js', $revisions_data, $revision, $post )
参数
  • (array)
    $revisions_data
    {
    The bootstrapped data for the revisions screen.

    @type int $id Revision ID.
    @type string $title Title for the revision’s parent WP_Post object.
    @type int $author Revision post author ID.
    @type string $date Date the revision was modified.
    @type string $dateShort Short-form version of the date the revision was modified.
    @type string $timeAgo GMT-aware amount of time ago the revision was modified.
    @type bool $autosave Whether the revision is an autosave.
    @type bool $current Whether the revision is both not an autosave and the post
    modified date matches the revision modified date (GMT-aware).
    @type bool|false $restoreUrl URL if the revision can be restored, false otherwise.
    }

    Required:
  • (WP_Post)
    $revision
    The revision’s WP_Post object.
    Required:
  • (WP_Post)
    $post
    The revision’s parent WP_Post object.
    Required:
定义位置
  • wp-admin/includes/revision.php
    , line 279
引入
4.4.0
弃用

Filters the array of revisions used on the revisions screen.

$revisions[ $revision->ID ] = apply_filters( 'wp_prepare_revision_for_js', $revisions_data, $revision, $post );
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。