: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Customize API: WP_Customize_Cropped_Image_Control class
* Customize Cropped Image Control class.
* @see WP_Customize_Image_Control
class WP_Customize_Cropped_Image_Control extends WP_Customize_Image_Control {
public $type = 'cropped_image';
* Suggested width for cropped image.
* Suggested height for cropped image.
* Whether the width is flexible.
public $flex_width = false;
* Whether the height is flexible.
public $flex_height = false;
* Enqueue control related scripts/styles.
public function enqueue() {
wp_enqueue_script( 'customize-views' );
* Refresh the parameters passed to the JavaScript via JSON.
* @see WP_Customize_Control::to_json()
public function to_json() {
$this->json['width'] = absint( $this->width );
$this->json['height'] = absint( $this->height );
$this->json['flex_width'] = absint( $this->flex_width );
$this->json['flex_height'] = absint( $this->flex_height );