Improve the docblocks for the `get_preview_post_link()` function and the `preview_post_link` filter.
See #24345 Built from https://develop.svn.wordpress.org/trunk@34176 git-svn-id: http://core.svn.wordpress.org/trunk@34144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9cd91030a6
commit
caf90ec1c6
|
@ -1159,16 +1159,16 @@ function get_post_type_archive_feed_link( $post_type, $feed = '' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Retrieve preview post link.
|
||||
* Retrieve URL used for the post preview.
|
||||
*
|
||||
* Get the preview post URL. Allow any number of query args to be appended.
|
||||
* Get the preview post URL. Allows additional query args to be appended.
|
||||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param int $post Optional. Post ID or WP_Post object. Defaults to global post.
|
||||
* @param array $query_args Optional. If preview query arg should be added. Or array of query args to be added.
|
||||
* @param string $preview_link Optional. If a link other than the permalink should be used. Used by _wp_link_page.
|
||||
* @return string
|
||||
* @param int|WP_Post $post Optional. Post ID or `WP_Post` object. Defaults to global post.
|
||||
* @param array $query_args Optional. Array of additional query args to be appended to the link.
|
||||
* @param string $preview_link Optional. Base preview link to be used if it should differ from the post permalink.
|
||||
* @return string URL used for the post preview.
|
||||
*/
|
||||
function get_preview_post_link( $post = null, $query_args = array(), $preview_link = '' ) {
|
||||
$post = get_post( $post );
|
||||
|
@ -1187,12 +1187,12 @@ function get_preview_post_link( $post = null, $query_args = array(), $preview_li
|
|||
}
|
||||
|
||||
/**
|
||||
* Filter the URI of a post preview in the post submit box.
|
||||
* Filter the URL used for a post preview.
|
||||
*
|
||||
* @since 2.0.5
|
||||
* @since 4.4.0 $post parameter was added.
|
||||
*
|
||||
* @param string $preview_link URI the user will be directed to for a post preview.
|
||||
* @param string $preview_link URL used for the post preview.
|
||||
* @param WP_Post $post Post object.
|
||||
*/
|
||||
return apply_filters( 'preview_post_link', $preview_link, $post );
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34175';
|
||||
$wp_version = '4.4-alpha-34176';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue