Skip to content

Commit

Permalink
add font size for mobile/tablet
Browse files Browse the repository at this point in the history
  • Loading branch information
zaher committed Mar 1, 2015
1 parent cb86a1f commit 68d6aee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ function metallic_customize_register($wp_customize) {
metallic_add_option($wp_customize, 'metallic_options', 'show_logo', __('Show Logo', 'default'));
metallic_add_option($wp_customize, 'metallic_options', 'logo_url', __('Logo URL', 'metallic'), 'text', '');

metallic_add_option($wp_customize, 'metallic_options', 'user_font_size', __('Font Size', 'metallic'), 'number', '');
metallic_add_option($wp_customize, 'metallic_options', 'desktop_font_size', __('Desktop Font Size', 'metallic'), 'number', '');
metallic_add_option($wp_customize, 'metallic_options', 'tablet_font_size', __('Tablet Font Size', 'metallic'), 'number', '');
metallic_add_option($wp_customize, 'metallic_options', 'mobile_font_size', __('Mobile Font Size', 'metallic'), 'number', '');
// metallic_add_option($wp_customize, 'user_font_name', __('Font Name', 'metallic'), 'text', '');

// =============================
Expand Down Expand Up @@ -257,6 +259,7 @@ function metallic_activation($old_theme)

function mettalic_styles()
{
global $is_tablet;
$gradients = get_theme_mod('gradients', true);

$params = '?gradients=';
Expand All @@ -265,7 +268,12 @@ function mettalic_styles()
else
$params .= '0';

$font_size = get_theme_mod('user_font_size', '');
if (wp_is_mobile())
$font_size = get_theme_mod('mobile_font_size', '');
elseif ($is_tablet)
$font_size = get_theme_mod('tablet_font_size', '');
else
$font_size = get_theme_mod('desktop_font_size', '');

if (!empty($font_size)) {
$params .= '&font_size='.$font_size;
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Theme Name: Metallic
Theme URI: https://github.com/parmaja/wp_metallic
Download: https://github.com/parmaja/wp_metallic/releases
Version: 1.10.1
Version: 1.10.2
Author: Zaher Dirkey
Author URI: http://www.parmaja.com
License: GNU General Public License v2 or later
Expand Down

0 comments on commit 68d6aee

Please sign in to comment.