Options Check

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

Basic Options

type: text (mini)
of_get_option('example_text_mini'): Default Text Mini
type: text
of_get_option('example_text'): Default Value for Input 2
type: textarea
of_get_option('example_textarea'): Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sed erat sed tellus egestas pellentesque. Curabitur accumsan leo eu mauris suscipit non malesuada purus fringilla. Mauris eget justo metus, vel bibendum nibh. Donec quis urna ut tellus vulputate aliquet laoreet eget quam. Maecenas non pharetra diam. Vivamus eu tellus enim. Nunc a enim neque. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus eget est mauris, a varius lectus. Vivamus adipiscing vestibulum molestie.
type: select (mini)
of_get_option('example_select'): four
type: select2 (wide)
of_get_option('example_select_wide'): three
type: select
of_get_option('example_select_categories'): category id = 1
type: select
of_get_option('example_select_pages'): page id =
type: radio
of_get_option('example_radio'): three
type: checkbox
of_get_option('example_checkbox'): 1

Advanced Options

type: uploader
of_get_option('example_uploader'): http://test.mapleunderground.com/optionsframework/files/2011/11/amirclap.gif
type: image
of_get_option('images'): 2c-l-fixed
type: multicheck
of_get_option('multicheck'): Array ( [one] => 1 [two] => 1 [three] => 0 [four] => 0 [five] => 1 )

The array sent in the options panel was defined as:
Array ( [one] => French Toast [two] => Pancake [three] => Omelette [four] => Crepe [five] => Waffle )

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

  • one (French Toast) = 1
  • two (Pancake) = 1
  • three (Omelette) = 0
  • four (Crepe) = 0
  • five (Waffle) = 1

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: 1

type: background
of_get_option('background'):
  • #d10c0c
type: colorpicker
of_get_option('colorpicker'): #243fc7
type: typography
of_get_option('typography'): Some sample text in your style
  • size = 12px
  • face = georgia
  • style = bold italic
  • color = #1fa10b