WordPress.org

Make WordPress Core

Changeset 34176


Ignore:
Timestamp:
09/15/2015 08:24:54 AM (6 years ago)
Author:
johnbillion
Message:

Improve the docblocks for the get_preview_post_link() function and the preview_post_link filter.

See #24345

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r34175 r34176  
    11601160
    11611161/**
    1162  * Retrieve preview post link.
    1163  *
    1164  * Get the preview post URL. Allow any number of query args to be appended.
     1162 * Retrieve URL used for the post preview.
     1163 *
     1164 * Get the preview post URL. Allows additional query args to be appended.
    11651165 *
    11661166 * @since 4.4.0
    11671167 *
    1168  * @param int    $post         Optional. Post ID or WP_Post object. Defaults to global post.
    1169  * @param array  $query_args   Optional. If preview query arg should be added. Or array of query args to be added.
    1170  * @param string $preview_link Optional. If a link other than the permalink should be used. Used by _wp_link_page.
    1171  * @return string
     1168 * @param int|WP_Post $post         Optional. Post ID or `WP_Post` object. Defaults to global post.
     1169 * @param array       $query_args   Optional. Array of additional query args to be appended to the link.
     1170 * @param string      $preview_link Optional. Base preview link to be used if it should differ from the post permalink.
     1171 * @return string URL used for the post preview.
    11721172 */
    11731173function get_preview_post_link( $post = null, $query_args = array(), $preview_link = '' ) {
     
    11881188
    11891189    /**
    1190      * Filter the URI of a post preview in the post submit box.
     1190     * Filter the URL used for a post preview.
    11911191     *
    11921192     * @since 2.0.5
    11931193     * @since 4.4.0 $post parameter was added.
    11941194     *
    1195      * @param string  $preview_link URI the user will be directed to for a post preview.
     1195     * @param string  $preview_link URL used for the post preview.
    11961196     * @param WP_Post $post         Post object.
    11971197     */
Note: See TracChangeset for help on using the changeset viewer.