Make WordPress Core


Ignore:
Timestamp:
07/03/2014 02:41:06 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Pass $post object to 'preview_post_link' filter.

props danielbachhuber.
fixes #28729.

File:
1 edited

Legend:

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

    r28539 r28969  
    4848     * @since 2.0.5
    4949     *
    50      * @param string $preview_link URI the user will be directed to for a post preview.
     50     * @param string  $preview_link URI the user will be directed to for a post preview.
     51     * @param WP_Post $post         Post object.
    5152     */
    52     $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) );
     53    $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ), $post ) );
    5354    $preview_button = __( 'Preview' );
    5455}
Note: See TracChangeset for help on using the changeset viewer.