WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/10/2016 04:41:34 AM (4 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-includes/link-template.php

    r36874 r36926  
    12231223    if ( is_post_type_viewable( $post_type_object ) ) {
    12241224        if ( ! $preview_link ) {
    1225             $preview_link = get_permalink( $post );
     1225            $preview_link = set_url_scheme( get_permalink( $post ) );
    12261226        }
    12271227
Note: See TracChangeset for help on using the changeset viewer.