Make WordPress Core


Ignore:
Timestamp:
03/10/2016 04:41:34 AM (8 years ago)
Author:
jeremyfelt
Message:

Posts: Call set_url_scheme() consistently on URLs passed through preview_post_link

After [34170], some preview URLs that passed through set_url_scheme() no longer do so. We can restore that behavior by applying set_url_scheme() whenever get_preview_post_link() provides the URL.

Props danielbachhuber.
Fixes #35407.

File:
1 edited

Legend:

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

    r36808 r36926  
    12261226            if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) {
    12271227                if ( $can_edit_post ) {
    1228                     $unpublished_link = set_url_scheme( get_permalink( $post ) );
    1229                     $preview_link = get_preview_post_link( $post, array(), $unpublished_link );
     1228                    $preview_link = get_preview_post_link( $post );
    12301229                    $actions['view'] = sprintf(
    12311230                        '<a href="%s" rel="permalink" aria-label="%s">%s</a>',
Note: See TracChangeset for help on using the changeset viewer.