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/admin-bar.php

    r36874 r36926  
    559559        {
    560560            if ( 'draft' == $post->post_status ) {
    561                 $draft_link = set_url_scheme( get_permalink( $post->ID ) );
    562                 $preview_link = get_preview_post_link( $post, array(), $draft_link );
     561                $preview_link = get_preview_post_link( $post );
    563562                $wp_admin_bar->add_menu( array(
    564563                    'id' => 'preview',
Note: See TracChangeset for help on using the changeset viewer.