Changeset 20477
- Timestamp:
- 04/16/2012 02:36:47 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-themes-list-table.php
r20476 r20477 137 137 $actions[] = '<a href="' . $preview_link . '" class="hide-if-customize" title="' 138 138 . esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '">' . __( 'Preview' ) . '</a>' 139 . '<a ' . wp_customize_href( $template, $stylesheet ) . 'class="load-customize hide-if-no-customize">'139 . '<a href="' . wp_customize_url( $stylesheet, $template ) . '" class="load-customize hide-if-no-customize">' 140 140 . __( 'Customize' ) . '</a>'; 141 141 if ( ! is_multisite() && current_user_can( 'delete_themes' ) ) … … 155 155 <?php endif; ?> 156 156 </a> 157 <a <?php echo wp_customize_href( $template, $stylesheet ); ?>class="screenshot load-customize hide-if-no-customize">157 <a href="<?php echo wp_customize_url( $stylesheet, $template ); ?>" class="screenshot load-customize hide-if-no-customize"> 158 158 <?php if ( $screenshot = $theme->get_screenshot() ) : ?> 159 159 <img src="<?php echo esc_url( $screenshot ); ?>" alt="" /> -
trunk/wp-admin/includes/class-wp-upgrader.php
r20476 r20477 1517 1517 $install_actions = array(); 1518 1518 $install_actions['preview'] = '<a href="' . esc_url( $preview_link ) . '" class="hide-if-customize" title="' . esc_attr(sprintf(__('Preview “%s”'), $name ) ) . '">' . __('Preview') . '</a>'; 1519 $install_actions['preview'] .= '<a ' . wp_customize_href( $template, $stylesheet ) . 'class="hide-if-no-customize load-customize>' . __('Customize') . '</a>';1519 $install_actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet, $template ) . '" class="hide-if-no-customize load-customize>' . __('Customize') . '</a>'; 1520 1520 $install_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink" title="' . esc_attr( sprintf( __('Activate “%s”'), $name ) ) . '">' . __('Activate') . '</a>'; 1521 1521 … … 1580 1580 1581 1581 $update_actions['preview'] = '<a href="' . esc_url( $preview_link ) . '" class="hide-if-customize" title="' . esc_attr(sprintf(__('Preview “%s”'), $name ) ) . '">' . __('Preview') . '</a>'; 1582 $update_actions['preview'] .= '<a ' . wp_customize_href( $template, $stylesheet ) . 'class="hide-if-no-customize load-customize">' . __('Customize') . '</a>';1582 $update_actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet, $template ) . '" class="hide-if-no-customize load-customize">' . __('Customize') . '</a>'; 1583 1583 $update_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink" title="' . esc_attr( sprintf( __('Activate “%s”'), $name ) ) . '">' . __('Activate') . '</a>'; 1584 1584 -
trunk/wp-admin/themes.php
r20476 r20477 123 123 124 124 <div class="theme-options"> 125 <a <?php echo wp_customize_href( $ct->get_template(), $ct->get_stylesheet() ); ?> class="load-customize hide-if-no-customize" title="<?php echo esc_attr( sprintf( __( 'Customize “%s”' ), $ct->get('Name') ) ); ?>"><?php _e( 'Customize' )?></a>125 <a href="<?php echo wp_customize_url( $ct->get_stylesheet(), $ct->get_template() ); ?>" class="load-customize hide-if-no-customize" title="<?php echo esc_attr( sprintf( __( 'Customize “%s”' ), $ct->display('Name') ) ); ?>"><?php _e( 'Customize' )?></a> 126 126 <span><?php _e( 'Options:' )?></span> 127 127 <?php -
trunk/wp-includes/theme.php
r20476 r20477 1600 1600 * @since 3.4.0 1601 1601 */ 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 } 1602 function wp_customize_url( $stylesheet, $template ) { 1603 return esc_url( admin_url( 'admin.php' ) . '?customize=on&template=' . $template . '&stylesheet=' . $stylesheet ); 1604 }
Note: See TracChangeset
for help on using the changeset viewer.