-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hello,
No issue but I thought I would let you know that I incorporated your plugin in the UU2014 theme as of the new version 1.3.6 that is under review now on WordPress.org.
https://github.com/dflippo/UU2014
https://wordpress.org/themes/uu-2014
Users who install this new version of the theme will be automatically prompted to install your plugin.
You might want to look at how I approached your plugin in my /inc/customizer.php file:
https://github.com/dflippo/UU2014/blob/master/inc/customizer.php
Start at the very end. Essentially, I created an array of all the regions across my theme that I wanted to allow users to customize. I then iterate over this list both for my own sections in the WP Customizer as well as for your plugin. My sections allow users to pick the font sizes for the regions as well as the font sizes for mobile devices. You could probably adapt this code to allow your plugin to control both font-faces and font-sizes for the regions that the theme developer defines. Here is a simplified version of the array I am using to drive both processes:
$theme_slug_font_settings = array(
'theme_slug_default_font_setting' => array(
'label' => __('Default', 'theme_slug'),
'selector' => 'body, button, input, select, textarea, p',
'font-size-default' => 'font-size: 15px; font-size: 1.5rem;',
'mobile-font-size-default' => 'font-size: 14px; font-size: 1.4rem;',
'font-family-default' => 'Open Sans',
),
);
My code isn't extremely polished but you are welcome to adapt for your own uses if you like. It's all licensed GPLv2.