Options Framework Theme

Use of_get_option($id,$default) to return option values.

About

This is the adapted theme version of the Options Framework plugin, which makes it easy to include an options panel for any theme.

How to Include in Your Own Project

Just drag the admin folder of this theme, options.php and functions.php into the theme of your choice.


Basic Options

type: text (mini)
of_get_option('example_text_mini'):
type: text
of_get_option('example_text'):
type: textarea
of_get_option('example_textarea'):
type: select (mini)
of_get_option('example_select'):
type: select2 (wide)
of_get_option('example_select_wide'):
type: select
of_get_option('example_select_categories'): category id =
type: select
of_get_option('example_select_tags'): term id =
type: select
of_get_option('example_select_pages'): page id =
type: radio
of_get_option('example_radio'):
type: checkbox
of_get_option('example_checkbox'):

Advanced Options

type: uploader
of_get_option('example_uploader'):
type: image
of_get_option('images'):
type: multicheck
of_get_option('multicheck'):

The array sent in the options panel was defined as:
"French Toast", "two" => "Pancake", "three" => "Omelette", "four" => "Crepe", "five" => "Waffle"); print_r($test_array_jr); ?>

You can get the value of all items in the checkbox array:

You can also get an individual checkbox value if you know what you are looking for. In this example, I'll check for the key "one", which is an item I sent in the array for checkboxes:

The value of the multicheck box "one" of example_multicheck is:

type: background
of_get_option('background'): '; echo '
    '; foreach ($background as $i => $param) { echo '
  • ' . $i . ' = ' . $param . '
  • '; } echo '
'; } else { echo ''; echo '
    '; echo '
  • ' . $background['color'] . '
  • '; echo '
'; } } else { echo "no entry"; }; ?>
type: colorpicker
of_get_option('colorpicker'):
type: typography
of_get_option('typography'): '; foreach ($typography as $i => $param) { echo '
  • ' . $i . ' = ' . $param . '
  • '; } echo ''; echo 'Some sample text in your style'; } else { echo "no entry"; } ?>

    Editor

    type: editor
    of_get_option('example_editor'):