File: /home/nakedfoamlojoweb/public_html/wp-content/themes/lojo-theme/options.php
<?php
/**
* A unique identifier is defined to store the options in the database and reference them from the theme.
*/
function optionsframework_option_name() {
// Change this to use your theme slug
return 'options-framework-theme';
}
/**
* Defines an array of options that will be used to generate the settings page and be saved in the database.
* When creating the 'id' fields, make sure to use all lowercase and no spaces.
*
* If you are making your theme translatable, you should replace 'theme-textdomain'
* with the actual text domain for your theme. Read more:
* http://codex.wordpress.org/Function_Reference/load_theme_textdomain
*/
function optionsframework_options() {
// Test data
$test_array = array(
'one' => __( 'One', 'theme-textdomain' ),
'two' => __( 'Two', 'theme-textdomain' ),
'three' => __( 'Three', 'theme-textdomain' ),
'four' => __( 'Four', 'theme-textdomain' ),
'five' => __( 'Five', 'theme-textdomain' )
);
// Multicheck Array
$multicheck_array = array(
'one' => __( 'French Toast', 'theme-textdomain' ),
'two' => __( 'Pancake', 'theme-textdomain' ),
'three' => __( 'Omelette', 'theme-textdomain' ),
'four' => __( 'Crepe', 'theme-textdomain' ),
'five' => __( 'Waffle', 'theme-textdomain' )
);
// Multicheck Defaults
$multicheck_defaults = array(
'one' => '1',
'five' => '1'
);
// Background Defaults
$background_defaults = array(
'color' => '',
'image' => '',
'repeat' => 'repeat',
'position' => 'top center',
'attachment'=>'scroll' );
// Typography Defaults
$typography_defaults = array(
'size' => '15px',
'face' => 'georgia',
'style' => 'bold',
'color' => '#bada55' );
// Typography Options
$typography_options = array(
'sizes' => array( '6','12','14','16','20' ),
'faces' => array( 'Helvetica Neue' => 'Helvetica Neue','Arial' => 'Arial' ),
'styles' => array( 'normal' => 'Normal','bold' => 'Bold' ),
'color' => false
);
// Pull all the categories into an array
$options_categories = array();
$options_categories_obj = get_categories();
foreach ($options_categories_obj as $category) {
$options_categories[$category->cat_ID] = $category->cat_name;
}
// Pull all tags into an array
$options_tags = array();
$options_tags_obj = get_tags();
foreach ( $options_tags_obj as $tag ) {
$options_tags[$tag->term_id] = $tag->name;
}
// Pull all the pages into an array
$options_pages = array();
$options_pages_obj = get_pages( 'sort_column=post_parent,menu_order' );
$options_pages[''] = 'Select a page:';
foreach ($options_pages_obj as $page) {
$options_pages[$page->ID] = $page->post_title;
}
// If using image radio buttons, define a directory path
$imagepath = get_template_directory_uri() . '/images/';
$options = array();
$options[] = array(
'name' => __( 'General Settings', 'theme-textdomain' ),
'type' => 'heading'
);
$options[] = array(
'name' => __( 'Header Script', 'theme-textdomain' ),
'desc' => __( 'Header Script', 'theme-textdomain' ),
'id' => 'header_script',
'type' => 'editor'
);
$options[] = array(
'name' => __( 'Body Script', 'theme-textdomain' ),
'desc' => __( 'Body Script', 'theme-textdomain' ),
'id' => 'body_script',
'type' => 'editor'
);
$options[] = array(
'name' => __( 'Footer Script', 'theme-textdomain' ),
'desc' => __( 'Footer Script', 'theme-textdomain' ),
'id' => 'footer_script',
'type' => 'editor'
);
$options[] = array(
'name' => __( 'Header Settings', 'theme-textdomain' ),
'type' => 'heading'
);
$options[] = array(
'name' => __( 'Title Text', 'theme-textdomain' ),
'desc' => __( 'Title Text', 'theme-textdomain' ),
'id' => 'title_text',
'type' => 'text'
);
$options[] = array(
'name' => __( 'Header Logo', 'theme-textdomain' ),
'desc' => __( 'Header Logo', 'theme-textdomain' ),
'id' => 'logo_upload',
'type' => 'upload'
);
$options[] = array(
'name' => __( 'Cart Link', 'theme-textdomain' ),
'desc' => __( 'Cart Link', 'theme-textdomain' ),
'id' => 'cart_text',
'type' => 'text'
);
$options[] = array(
'name' => __( 'Cart Image', 'theme-textdomain' ),
'desc' => __( 'Cart Image', 'theme-textdomain' ),
'id' => 'cart_image',
'type' => 'upload'
);
$options[] = array(
'name' => __( 'Mail Link', 'theme-textdomain' ),
'desc' => __( 'Mail Link', 'theme-textdomain' ),
'id' => 'mail_text',
'type' => 'text'
);
$options[] = array(
'name' => __( 'Mail Image', 'theme-textdomain' ),
'desc' => __( 'Mail Image', 'theme-textdomain' ),
'id' => 'mail_image',
'type' => 'upload'
);
$options[] = array(
'name' => __( 'Contact Form Heading', 'theme-textdomain' ),
'desc' => __( 'Contact Form Heading', 'theme-textdomain' ),
'id' => 'contact_heading',
'type' => 'text'
);
$options[] = array(
'name' => __( 'Contact Form Shortcode', 'theme-textdomain' ),
'desc' => __( 'Contact Form Shortcode', 'theme-textdomain' ),
'id' => 'contact_shortcode',
'type' => 'text'
);
$options[] = array(
'name' => __( 'Favicon Uploader', 'theme-textdomain' ),
'desc' => __( 'Favicon Uploader', 'theme-textdomain' ),
'id' => 'favicon_uploader',
'type' => 'upload'
);
$options[] = array(
'name' => __( 'Footer Settings', 'theme-textdomain' ),
'type' => 'heading'
);
$options[] = array(
'name' => __( 'Footer Text', 'theme-textdomain' ),
'desc' => __( 'Footer Text', 'theme-textdomain' ),
'id' => 'footer_text',
'type' => 'text'
);
$options[] = array(
'name' => __( 'Social Icon Text', 'theme-textdomain' ),
'desc' => __( 'Social Icon Text', 'theme-textdomain' ),
'id' => 'social_text',
'type' => 'text'
);
$options[] = array(
'name' => __( 'Facebook Link', 'theme-textdomain' ),
'desc' => __( 'Facebook Link', 'theme-textdomain' ),
'id' => 'facebook_link',
'type' => 'text'
);
$options[] = array(
'name' => __( 'Twitter Link', 'theme-textdomain' ),
'desc' => __( 'Twitter Link', 'theme-textdomain' ),
'id' => 'twitter_link',
'type' => 'text'
);
$options[] = array(
'name' => __( 'Youtube Link', 'theme-textdomain' ),
'desc' => __( 'Youtube Link', 'theme-textdomain' ),
'id' => 'youtube_link',
'type' => 'text'
);
// SEO Options
$options[] = array( "name" => "SEO Tools",
"type" => "heading",
"icon" => "dashicons dashicons-search"
);
$options[] = array( "name" => "SEO Options",
"desc" => "Enable or Disable SEO Options Metabox in your theme",
"id" => "tl_seo",
"std" => 0,
"type" => "radio",
"options" => array(
'on' => 'Enable',
'off' => 'Disable'
)
);
$options[] = array( "name" => "Title Separator",
"desc" => "Choose the symbol to use as your title separator. This will display, for instance, between your post title and site name. Symbols are shown in the size they'll appear in in search results.",
"id" => "seo_title_seperator",
"std" => "",
"type" => "radio",
"options" => array(
'-' => '-',
'–' => '–',
'—' => '—',
'·' => '·',
'•' => '•',
'*' => '*',
'⋆' => '⋆',
'|' => '|',
'~' => '~',
'«' => '«',
'»' => '»',
'<' => '<',
'>' => '>'
)
);
$options[] = array( "name" => "Front Page Settings:",
"desc" => "",
"id" => "",
"std" => "#",
"type" => ""
);
$options[] = array( "name" => "Image",
"desc" => "Upload Image.",
"id" => "seo_facebook_front_image",
"std" => "",
"type" => "upload"
);
$options[] = array( "name" => "Title",
"desc" => "Title.",
"id" => "seo_facebook_title",
"std" => "",
"type" => "text"
);
$options[] = array( "name" => "Description",
"desc" => "Description.",
"id" => "seo_facebook_description",
"std" => "",
"type" => "textarea"
);
$options[] = array( "name" => "Default Settings:",
"desc" => "",
"id" => "",
"std" => "#",
"type" => ""
);
$options[] = array( "name" => "Image",
"desc" => "Upload Image.",
"id" => "seo_facebook_default_image",
"std" => "",
"type" => "upload"
);
$options[] = array( "name" => "Facebook Page URL",
"desc" => "Facebook Page URL.",
"id" => "seo_facebook_page_url",
"std" => "#",
"type" => "text"
);
$options[] = array( "name" => "Twitter Username",
"desc" => "Twitter Username.",
"id" => "seo_twitter_username",
"std" => "",
"type" => "text"
);
$options[] = array( "name" => "The default card type to use",
"desc" => "Select the default card type.",
"id" => "seo_twitter_default_card_type",
"std" => "1",
"type" => "select",
"options" => $tlf_options_seo
);
$options[] = array( "name" => "Google Publisher Page",
"desc" => "Google Publisher Page.",
"id" => "seo_google_publisher_page",
"std" => "",
"type" => "text"
);
return $options;
}