From c9ba992e0a41f86d5b7f0e4ec8009d0a596b69e4 Mon Sep 17 00:00:00 2001 From: Marco Pereirinha Date: Mon, 18 Jan 2021 15:49:28 +0000 Subject: [PATCH 1/2] Get the video settings instead --- php/media/class-video.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/media/class-video.php b/php/media/class-video.php index 8a973cc3f..9a5d40996 100644 --- a/php/media/class-video.php +++ b/php/media/class-video.php @@ -76,7 +76,7 @@ class Video { */ public function __construct( Media $media ) { $this->media = $media; - $this->config = $this->media->get_settings()->get_setting( $media::MEDIA_SETTINGS_SLUG )->get_value(); + $this->config = $this->media->get_settings()->get_setting( 'video_settings' )->get_value(); $this->setup_hooks(); } From b1fe43d18c89e87e5df7af42a17e0be00ccac8b6 Mon Sep 17 00:00:00 2001 From: Marco Pereirinha Date: Mon, 18 Jan 2021 15:49:50 +0000 Subject: [PATCH 2/2] Set the defaults to booleans --- ui-definitions/settings-image.php | 2 +- ui-definitions/settings-video.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-definitions/settings-image.php b/ui-definitions/settings-image.php index 5883a7ae2..e22766c3e 100644 --- a/ui-definitions/settings-image.php +++ b/ui-definitions/settings-image.php @@ -25,7 +25,7 @@ 'title' => __( 'Image optimization', 'cloudinary' ), 'tooltip_text' => __( 'Images will be delivered using Cloudinary’s automatic format and quality algorithms for the best tradeoff between visual quality and file size. Use Advanced Optimization options to manually tune format and quality.', 'cloudinary' ), 'description' => __( 'Optimize images on my site.', 'cloudinary' ), - 'default' => 'on', + 'default' => true, 'attributes' => array( 'data-context' => 'image', ), diff --git a/ui-definitions/settings-video.php b/ui-definitions/settings-video.php index f4b6fbb19..882322406 100644 --- a/ui-definitions/settings-video.php +++ b/ui-definitions/settings-video.php @@ -102,7 +102,7 @@ 'title' => __( 'Video optimization', 'cloudinary' ), 'tooltip_text' => __( 'Videos will be delivered using Cloudinary’s automatic format and quality algorithms for the best tradeoff between visual quality and file size. Use Advanced Optimization options to manually tune format and quality.', 'cloudinary' ), 'description' => __( 'Optimize videos on my site.', 'cloudinary' ), - 'default' => 'on', + 'default' => true, 'attributes' => array( 'data-context' => 'video', ),