Make WordPress Core


Ignore:
Timestamp:
08/30/2012 01:33:00 PM (12 years ago)
Author:
ryan
Message:

Use set_url_scheme(). Props johnbillion, MarcusPope. see #19037 #20759

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r21311 r21664  
    4242    $preview_button = __( 'Preview Changes' );
    4343} else {
    44     $preview_link = get_permalink( $post->ID );
    45     if ( is_ssl() )
    46         $preview_link = str_replace( 'http://', 'https://', $preview_link );
     44    $preview_link = set_url_scheme( get_permalink( $post->ID ) );
    4745    $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) );
    4846    $preview_button = __( 'Preview' );
Note: See TracChangeset for help on using the changeset viewer.