| @@ -10,10 +10,8 @@ | ||
| 10 | 10 | function inline_css() { |
| 11 | 11 | $class_id = '#' . $this->class_id; |
| 12 | 12 | |
| 13 | 13 | $isPreview = $this->isPreview; |
| 14 | - | |
| 15 | - $options = get_option( Meow_MGL_Core::get_plugin_option_name(), null ); | |
| 16 | 14 | |
| 17 | 15 | $gutter = []; |
| 18 | 16 | if ( isset( $this->atts['gutter'] ) ) { |
| 19 | 17 | $gutter['desktop'] = $this->atts['gutter']; |
| @@ -20,14 +18,24 @@ | ||
| 20 | 18 | $gutter['tablet'] = $this->atts['gutter']; |
| 21 | 19 | $gutter['mobile'] = $this->atts['gutter']; |
| 22 | 20 | } |
| 23 | 21 | else { |
| 24 | - $gutter['desktop'] = $options['tiles_gutter'] ?? 10; | |
| 25 | - $gutter['tablet'] = $options['tiles_gutter_tablet'] ?? 10; | |
| 26 | - $gutter['mobile'] = $options['tiles_gutter_mobile'] ?? 10; | |
| 22 | + $gutter['desktop'] = get_option( 'mgl_tiles_gutter', 10 ); | |
| 23 | + $gutter['tablet'] = get_option( 'mgl_tiles_gutter_tablet', 10 ); | |
| 24 | + $gutter['mobile'] = get_option( 'mgl_tiles_gutter_mobile', 10 ); | |
| 27 | 25 | } |
| 28 | 26 | |
| 29 | - $density = Meow_MGL_Core::get_tiles_density( $this->atts ); | |
| 27 | + $density = []; | |
| 28 | + if ( isset( $this->atts['density'] ) ) { | |
| 29 | + $density['desktop'] = $this->atts['density']; | |
| 30 | + $density['tablet'] = $this->atts['density']; | |
| 31 | + $density['mobile'] = $this->atts['density']; | |
| 32 | + } | |
| 33 | + else { | |
| 34 | + $density['desktop'] = get_option( 'mgl_tiles_density', 'high' ); | |
| 35 | + $density['tablet'] = get_option( 'mgl_tiles_density_tablet', 'medium' ); | |
| 36 | + $density['mobile'] = get_option( 'mgl_tiles_density_mobile', 'low' ); | |
| 37 | + } | |
| 30 | 38 | |
| 31 | 39 | ob_start(); |
| 32 | 40 | include dirname( __FILE__ ) . '/tiles.css.php'; |
| 33 | 41 | $html = ob_get_clean(); |