Skip to content

Commit

Permalink
Merge pull request #282 from pixelgrade/release/1.12.4
Browse files Browse the repository at this point in the history
Release 1.12.4
  • Loading branch information
razwan authored Jul 19, 2021
2 parents ce8ea9e + 96934a2 commit 1657d54
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
37 changes: 37 additions & 0 deletions inc/upgrade/migrations/1.12.4-content-body-font-size.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

if ( ! class_exists( 'Pixelgrade\StyleManager\Plugin' ) ) {
return;
}

use Pixelgrade\StyleManager\Provider\PluginSettings as PluginSettings;

$plugin_settings = new PluginSettings();
$values_store_mode = $plugin_settings->get( 'values_store_mod' );
$options_name = Pixelgrade\StyleManager\get_options_key();

if ( $values_store_mode === 'option' ) {
$rosa2_options = get_option( $options_name );
} else {
$rosa2_options = get_theme_mod( $options_name );
}

$body_font_size = 16;
$content_font_size = 18;

if ( isset( $rosa2_options['body_font']['font_size']['value'] ) ) {
$body_font_size = $rosa2_options['body_font']['font_size']['value'];
}

if ( isset( $rosa2_options['content_font']['font_size']['value'] ) ) {
$content_font_size = $rosa2_options['content_font']['font_size']['value'];
}

$site_container_width = intval( pixelgrade_option( 'sm_site_container_width', 75 ) );
$new_site_container_width = $site_container_width * $body_font_size / $content_font_size;

update_option( 'sm_site_container_width', $new_site_container_width );
2 changes: 1 addition & 1 deletion src/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://demos.pixelgrade.com/rosa2
Author: Pixelgrade
Author URI: https://pixelgrade.com
Description: ROSA 2 is an enchanting and easy-to-use parallax Restaurant WordPress theme that allows you to tell your story in a dynamic, narrative and enjoyable way, making it perfect for restaurants, bakeries, bars or coffee shops.
Version: 1.12.3
Version: 1.12.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: __theme_txtd
Expand Down
2 changes: 1 addition & 1 deletion style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://demos.pixelgrade.com/rosa2
Author: Pixelgrade
Author URI: https://pixelgrade.com
Description: ROSA 2 is an enchanting and easy-to-use parallax Restaurant WordPress theme that allows you to tell your story in a dynamic, narrative and enjoyable way, making it perfect for restaurants, bakeries, bars or coffee shops.
Version: 1.12.3
Version: 1.12.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: __theme_txtd
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://demos.pixelgrade.com/rosa2
Author: Pixelgrade
Author URI: https://pixelgrade.com
Description: ROSA 2 is an enchanting and easy-to-use parallax Restaurant WordPress theme that allows you to tell your story in a dynamic, narrative and enjoyable way, making it perfect for restaurants, bakeries, bars or coffee shops.
Version: 1.12.3
Version: 1.12.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: __theme_txtd
Expand Down

0 comments on commit 1657d54

Please sign in to comment.