Changeset 28969
- Timestamp:
- 07/03/2014 02:41:06 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-posts-list-table.php
r28916 r28969 662 662 if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) { 663 663 if ( $can_edit_post ) { 664 664 $preview_link = set_url_scheme( get_permalink( $post->ID ) ); 665 665 /** This filter is documented in wp-admin/includes/meta-boxes.php */ 666 $actions['view'] = '<a href="' . esc_url( apply_filters( 'preview_post_link', set_url_scheme( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>'; 666 $preview_link = apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ), $post ); 667 $actions['view'] = '<a href="' . esc_url( $preview_link ) . '" title="' . esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>'; 667 668 } 668 669 } elseif ( 'trash' != $post->post_status ) { -
trunk/src/wp-admin/includes/meta-boxes.php
r28539 r28969 48 48 * @since 2.0.5 49 49 * 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. 51 52 */ 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 ) ); 53 54 $preview_button = __( 'Preview' ); 54 55 } -
trunk/src/wp-admin/includes/post.php
r28948 r28969 1221 1221 $preview_link = set_url_scheme( get_permalink( $post->ID ) ); 1222 1222 /** This filter is documented in wp-admin/includes/meta-boxes.php */ 1223 $preview_link = apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) );1223 $preview_link = apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ), $post ); 1224 1224 $return .= "<span id='view-post-btn'><a href='" . esc_url( $preview_link ) . "' class='button button-small' target='wp-preview-{$post->ID}'>$view_post</a></span>\n"; 1225 1225 } else { … … 1405 1405 1406 1406 /** This filter is documented in wp-admin/includes/meta-boxes.php */ 1407 $preview_link = apply_filters( 'preview_post_link', $preview_link );1407 $preview_link = apply_filters( 'preview_post_link', $preview_link, $post ); 1408 1408 1409 1409 /** … … 1607 1607 1608 1608 /** This filter is documented in wp-admin/includes/meta-boxes.php */ 1609 return apply_filters( 'preview_post_link', $url );1609 return apply_filters( 'preview_post_link', $url, $post ); 1610 1610 } 1611 1611 -
trunk/src/wp-includes/admin-bar.php
r28920 r28969 497 497 $preview_link = set_url_scheme( get_permalink( $post->ID ) ); 498 498 /** This filter is documented in wp-admin/includes/meta-boxes.php */ 499 $preview_link = apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) );499 $preview_link = apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ), $post ); 500 500 $wp_admin_bar->add_menu( array( 501 501 'id' => 'preview',
Note: See TracChangeset
for help on using the changeset viewer.