Theme Customizer: Stick to wp_customize_url() instead of wp_customize_href(). Switch argument order so it is stylesheet-template. (Template is hypothetically optional, but the function will not support that.) see #19910.

Move to ->display('Name'), as ->get('Name') is a raw, untranslated version of the header.



git-svn-id: https://develop.svn.wordpress.org/trunk@20477 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-04-16 14:36:47 +00:00
parent a43958baeb
commit 266a785f77
4 changed files with 7 additions and 18 deletions

View File

@@ -1599,17 +1599,6 @@ add_action( 'admin_enqueue_scripts', '_wp_customize_loader_localize' );
*
* @since 3.4.0
*/
function wp_customize_url( $template, $stylesheet = null ) {
$stylesheet = isset( $stylesheet ) ? $stylesheet : $template;
return admin_url( 'admin.php' ) . '?customize=on&template=' . $template . '&stylesheet=' . $stylesheet;
}
/**
* Prints an href attribute to load the theme customizer.
*
* @since 3.4.0
*/
function wp_customize_href( $template, $stylesheet = null ) {
$link = wp_customize_url( $template, $stylesheet );
return 'href="' . esc_url( $link ) . '"';
function wp_customize_url( $stylesheet, $template ) {
return esc_url( admin_url( 'admin.php' ) . '?customize=on&template=' . $template . '&stylesheet=' . $stylesheet );
}