Make WordPress Core

Ticket #20755: 20755.2.patch

File 20755.2.patch, 1.3 KB (added by SergeyBiryukov, 13 years ago)
  • wp-includes/class-wp-customize-manager.php

     
    263263
    264264                wp_enqueue_script( 'customize-preview' );
    265265                add_action( 'wp_head', array( $this, 'customize_preview_base' ) );
     266                add_action( 'wp_head', array( $this, 'customize_preview_html5' ) );
    266267                add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 );
    267268                add_action( 'shutdown', array( $this, 'customize_preview_signature' ), 1000 );
    268269                add_filter( 'wp_die_handler', array( $this, 'remove_preview_signature' ) );
     
    284285        }
    285286
    286287        /**
     288         * Print a workaround to handle HTML5 tags in IE < 9
     289         *
     290         * @since 3.4.0
     291         */
     292        public function customize_preview_html5() { ?>
     293                <!--[if lt IE 9]>
     294                <script type="text/javascript">
     295                        var e = [ 'abbr', 'article', 'aside', 'audio', 'canvas', 'datalist', 'details',
     296                                'figure', 'footer', 'header', 'hgroup', 'mark', 'menu', 'meter', 'nav',
     297                                'output', 'progress', 'section', 'time', 'video' ];
     298                        for ( var i = 0; i < e.length; i++ ) {
     299                                document.createElement( e[i] );
     300                        }
     301                </script>
     302                <![endif]--><?php
     303        }
     304
     305        /**
    287306         * Print javascript settings for preview frame.
    288307         *
    289308         * @since 3.4.0