Changeset 20476 for trunk/wp-includes/theme.php
- Timestamp:
- 04/16/2012 02:02:28 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r20419 r20476 1584 1584 1585 1585 /** 1586 * Includes the loading scripts for the theme customizer and 1587 * adds the action to print the customize container template. 1586 * Localizes the customize-loader script. 1588 1587 * 1589 1588 * @since 3.4.0 1590 1589 */ 1591 function wp_customize_loader() { 1592 wp_enqueue_script( 'customize-loader' ); 1593 add_action( 'admin_footer', '_wp_customize_loader_template' ); 1594 } 1595 1596 /** 1597 * Print the customize container template. 1590 function _wp_customize_loader_localize() { 1591 wp_localize_script( 'customize-loader', 'wpCustomizeLoaderL10n', array( 1592 'back' => sprintf( __( '← Return to %s' ), get_admin_page_title() ), 1593 ) ); 1594 } 1595 add_action( 'admin_enqueue_scripts', '_wp_customize_loader_localize' ); 1596 1597 /** 1598 * Returns a URL to load the theme customizer. 1598 1599 * 1599 1600 * @since 3.4.0 1600 1601 */ 1601 function _wp_customize_loader_template() { 1602 ?> 1603 <div id="customize-container" class="wp-full-overlay"> 1604 <input type="hidden" class="admin-url" value="<?php echo esc_url( admin_url( 'admin.php' ) ); ?>" /> 1605 <a href="#" class="close-full-overlay"><?php printf( __( '← Return to %s' ), get_admin_page_title() ); ?></a> 1606 <a href="#" class="collapse-sidebar button-secondary" title="<?php esc_attr_e('Collapse Sidebar'); ?>"> 1607 <span class="collapse-sidebar-label"><?php _e('Collapse'); ?></span> 1608 <span class="collapse-sidebar-arrow"></span> 1609 </a> 1610 </div> 1611 <?php 1612 } 1602 function wp_customize_url( $template, $stylesheet = null ) { 1603 $stylesheet = isset( $stylesheet ) ? $stylesheet : $template; 1604 return admin_url( 'admin.php' ) . '?customize=on&template=' . $template . '&stylesheet=' . $stylesheet; 1605 } 1606 1607 /** 1608 * Prints an href attribute to load the theme customizer. 1609 * 1610 * @since 3.4.0 1611 */ 1612 function wp_customize_href( $template, $stylesheet = null ) { 1613 $link = wp_customize_url( $template, $stylesheet ); 1614 return 'href="' . esc_url( $link ) . '"'; 1615 }
Note: See TracChangeset
for help on using the changeset viewer.