@@ -610,7 +742,7 @@ class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
*/
public function tab_upload_new() {
if ( ! _device_can_upload() ) {
- echo '
' . sprintf( __('The web browser on your device cannot be used to upload files. You may be able to use the native app for your device instead.'), 'https://wordpress.org/mobile/' ) . '
' . sprintf( __('The web browser on your device cannot be used to upload files. You may be able to use the native app for your device instead.'), 'http://apps.wordpress.org/' ) . '
@@ -853,11 +985,11 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
Add new, your theme recommends a header size of %s × %s pixels.' ), $width, $height );
+ printf( __( 'While you can crop images to your liking after clicking Add new image, your theme recommends a header size of %s × %s pixels.' ), $width, $height );
} elseif ( $width ) {
- printf( __( 'While you can crop images to your liking after clicking Add new, your theme recommends a header width of %s pixels.' ), $width );
+ printf( __( 'While you can crop images to your liking after clicking Add new image, your theme recommends a header width of %s pixels.' ), $width );
} else {
- printf( __( 'While you can crop images to your liking after clicking Add new, your theme recommends a header height of %s pixels.' ), $height );
+ printf( __( 'While you can crop images to your liking after clicking Add new image, your theme recommends a header height of %s pixels.' ), $height );
}
?>
@@ -924,6 +1056,18 @@ class WP_Widget_Area_Customize_Control extends WP_Customize_Control {
manager->widgets->is_sidebar_rendered( $this->sidebar_id );
+ }
}
/**
@@ -964,5 +1108,17 @@ class WP_Widget_Form_Customize_Control extends WP_Customize_Control {
$args = wp_list_widget_controls_dynamic_sidebar( array( 0 => $args, 1 => $widget['params'][0] ) );
echo $this->manager->widgets->get_widget_control( $args );
}
+
+ /**
+ * Whether the current widget is rendered on the page.
+ *
+ * @since 4.0.0
+ * @access public
+ *
+ * @return bool Whether the widget is rendered.
+ */
+ function active_callback() {
+ return $this->manager->widgets->is_widget_rendered( $this->widget_id );
+ }
}