diff --git a/wp-includes/class-wp-customize-control.php b/wp-includes/class-wp-customize-control.php index 32d76658df..a5bd9daa5a 100644 --- a/wp-includes/class-wp-customize-control.php +++ b/wp-includes/class-wp-customize-control.php @@ -168,11 +168,15 @@ class WP_Customize_Control { settings[ $setting_key ] ) ) - return; + return ''; - echo 'data-customize-setting-link="' . esc_attr( $this->settings[ $setting_key ]->id ) . '"'; + return 'data-customize-setting-link="' . esc_attr( $this->settings[ $setting_key ]->id ) . '"'; + } + + public function link( $setting_key = 'default' ) { + echo $this->get_link( $setting_key ); } /** @@ -309,19 +313,23 @@ class WP_Customize_Control { '_customize-dropdown-pages-' . $this->id, + 'echo' => 0, + 'show_option_none' => __( '— Select —' ), + 'option_none_value' => '0', + 'selected' => $this->value(), + ) + ); + + // Hackily add in the data link parameter. + $dropdown = str_replace( 'get_link(), $dropdown ); + printf( '', $this->label, - wp_dropdown_pages( - array( - // @todo: this is going to need fixing. - // 'name' => $this->get_name(), - 'echo' => 0, - 'show_option_none' => __( '— Select —' ), - 'option_none_value' => '0', - 'selected' => $this->value(), - ) - ) + $dropdown ); break; }