WordPress.org

Make WordPress Core

Changeset 20863


Ignore:
Timestamp:
05/24/2012 02:07:16 AM (7 years ago)
Author:
koopersmith
Message:

Theme Customizer: Add a base element to the preview's head element to allow relative links (root, hash, and query strings). see #20507, #19910.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-customize-manager.php

    r20861 r20863  
    255255
    256256        wp_enqueue_script( 'customize-preview' );
     257        add_action( 'wp_head', array( $this, 'customize_preview_base' ) );
    257258        add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 );
    258259
     
    264265    }
    265266
    266 
    267     /**
    268      * Print javascript settings.
     267    /**
     268     * Print base element for preview frame.
     269     *
     270     * @since 3.4.0
     271     */
     272    public function customize_preview_base() {
     273        ?><base href="<?php echo home_url( '/' ); ?>" /><?php
     274    }
     275
     276    /**
     277     * Print javascript settings for preview frame.
    269278     *
    270279     * @since 3.4.0
Note: See TracChangeset for help on using the changeset viewer.