File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,8 +123,9 @@ protected function shadow( $struct ) {
123123 $ struct = $ this ->get_part ( 'input ' );
124124 $ struct ['attributes ' ]['type ' ] = 'checkbox ' ;
125125 $ struct ['attributes ' ]['disabled ' ] = 'disabled ' ;
126- $ struct ['attributes ' ]['checked ' ] = 'checked ' ;
127- $ struct ['attributes ' ]['type ' ] = 'checkbox ' ;
126+ if ( 'on ' === $ this ->setting ->get_value () ) {
127+ $ struct ['attributes ' ]['checked ' ] = 'checked ' ;
128+ }
128129 }
129130
130131 return $ struct ;
Original file line number Diff line number Diff line change 5555 'data-context ' => 'image ' ,
5656 ),
5757 'readonly ' => static function () {
58- return ! get_plugin_instance ()->get_component ( 'storage ' )->is_local_full ();
58+ $ plugin = get_plugin_instance ();
59+ return 'on ' === $ plugin ->settings ->get_value ( 'image_delivery ' ) && ! $ plugin ->get_component ( 'storage ' )->is_local_full ();
5960 },
6061 'readonly_message ' => sprintf (
6162 // translators: %s is a link to the storage settings page.
Original file line number Diff line number Diff line change 5555 'data-context ' => 'video ' ,
5656 ),
5757 'readonly ' => static function () {
58- return ! get_plugin_instance ()->get_component ( 'storage ' )->is_local_full ();
58+ $ plugin = get_plugin_instance ();
59+ return 'on ' === $ plugin ->settings ->get_value ( 'video_delivery ' ) && ! $ plugin ->get_component ( 'storage ' )->is_local_full ();
5960 },
6061 'readonly_message ' => sprintf (
6162 // translators: %s is a link to the storage settings page.
You can’t perform that action at this time.
0 commit comments