SimpleRain / SimpleOptions

A simple wordpress options framework for developers.
16 stars 2 forks source link

Calling typography options #30

Closed matyushen closed 11 years ago

matyushen commented 11 years ago

Can somebody please explain how should I call typography options?

"body-font"=>array(
                        'type' => 'typography',
                        'title' => __('Body Font', 'simple-options'),
                        'subtitle' => __('Specify the body font properties.', 'simple-options'),
                        'std' => array(
                            'color'=>'#dd9933',
                            'font-size'=>30,
                            'font-family'=>'Arial, Helvetica, sans-serif',
                            'font-weight'=>'Normal',
                            ),
                        ),      

Thanks!

dovy commented 11 years ago

@matyushen You have that exactly correct. What exactly are you asking for?

matyushen commented 11 years ago

I'm asking how to apply that options, in SMOF you can do it like this:

<?php global $name; $name = get_option(OPTIONS); ?> 
Font-family: <?php echo $name['unique_id']['face']?>
Font-size: <?php echo $name['unique_id']['size']?>
Color: <?php echo $name['unique_id']['color']?> 
Font-weight: <?php echo $name['unique_id']['style']?>
dovy commented 11 years ago

Like so: <?php global $Simple_Options; $options = $Simple_Options->options; print_r($options);

matyushen commented 11 years ago

Thanks, @dovy. Is there any way to adopt your awesome typography options for SMOF? Your framework looks great, but I almost finished my theme's options with SMOF, and I need this feature there so bad..

dovy commented 11 years ago

@matyushen To be honest, going back to SMOF is going to take more work than just converting...

I'll be providing documentation on what you need to do to migrate from SMOF. It's actually quite simple. A few type renames, and creating of a bigger array. That's it.