Make WordPress Core

Changeset 23560


Ignore:
Timestamp:
03/01/2013 04:46:25 PM (9 years ago)
Author:
SergeyBiryukov
Message:

Consistently apply 'preview_post_link' filter. fixes #19378.

Location:
trunk/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-posts-list-table.php

    r23487 r23560  
    578578                    if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) {
    579579                        if ( $can_edit_post )
    580                             $actions['view'] = '<a href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>';
     580                            $actions['view'] = '<a href="' . esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>';
    581581                    } elseif ( 'trash' != $post->post_status ) {
    582582                        $actions['view'] = '<a href="' . get_permalink( $post->ID ) . '" title="' . esc_attr( sprintf( __( 'View &#8220;%s&#8221;' ), $title ) ) . '" rel="permalink">' . __( 'View' ) . '</a>';
  • trunk/wp-admin/includes/post.php

    r23554 r23560  
    13141314    }
    13151315
    1316     return $url;
    1317 }
     1316    return apply_filters( 'preview_post_link', $url );
     1317}
Note: See TracChangeset for help on using the changeset viewer.