3 * Customize API: WP_Customize_Cropped_Image_Control class
6 * @subpackage Customize
11 * Customize Cropped Image Control class.
15 * @see WP_Customize_Image_Control
17 class WP_Customize_Cropped_Image_Control extends WP_Customize_Image_Control {
26 public $type = 'cropped_image';
29 * Suggested width for cropped image.
38 * Suggested height for cropped image.
47 * Whether the width is flexible.
53 public $flex_width = false;
56 * Whether the height is flexible.
62 public $flex_height = false;
65 * Enqueue control related scripts/styles.
70 public function enqueue() {
71 wp_enqueue_script( 'customize-views' );
77 * Refresh the parameters passed to the JavaScript via JSON.
82 * @see WP_Customize_Control::to_json()
84 public function to_json() {
87 $this->json['width'] = absint( $this->width );
88 $this->json['height'] = absint( $this->height );
89 $this->json['flex_width'] = absint( $this->flex_width );
90 $this->json['flex_height'] = absint( $this->flex_height );