mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
Create a function, get_preview_post_link(), to DRY the logic for applying the 'preview_post_link' filter to a URL.
Props TomHarrigan, wonderboymusic. Fixes #24345. git-svn-id: https://develop.svn.wordpress.org/trunk@34170 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -81,8 +81,7 @@ if ( ! $permalink ) {
|
||||
}
|
||||
|
||||
$messages = array();
|
||||
/** This filter is documented in wp-admin/includes/meta-boxes.php */
|
||||
$post_preview_url = apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $permalink ), $post );
|
||||
$post_preview_url = get_preview_post_link( $post );
|
||||
|
||||
$preview_link_html = $scheduled_link_html = $view_post_html = '';
|
||||
|
||||
@@ -125,8 +124,7 @@ $messages['post'] = array(
|
||||
10 => __( 'Post draft updated.' ) . $preview_link_html,
|
||||
);
|
||||
|
||||
/** This filter is documented in wp-admin/includes/meta-boxes.php */
|
||||
$page_preview_url = apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $permalink ), $post );
|
||||
$page_preview_url = get_preview_post_link( $post );
|
||||
|
||||
$messages['page'] = array(
|
||||
0 => '', // Unused. Messages start at index 1.
|
||||
|
||||
Reference in New Issue
Block a user