File: /hosting/kak.bg/web/wp-content/themes/Primero/options.php
<?php
/**
* A unique identifier is defined to store the options in the database and reference them from the theme.
* By default it uses the theme name, in lowercase and without spaces, but this can be changed if needed.
* If the identifier changes, it'll appear as if the options have been reset.
*
*/
function optionsframework_option_name() {
// This gets the theme name from the stylesheet (lowercase and without spaces)
$themename = get_theme_data(STYLESHEETPATH . '/style.css');
$themename = $themename['Name'];
$themename = preg_replace("/\W/", "", strtolower($themename) );
$optionsframework_settings = get_option('optionsframework');
$optionsframework_settings['id'] = $themename;
update_option('optionsframework', $optionsframework_settings);
// echo $themename;
}
/**
* 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.
*
*/
function optionsframework_options() {
// 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 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_stylesheet_directory_uri('stylesheet_directory') . '/images/';
$options = array();
$options[] = array("name" => "Basic",
"type" => "heading");
$options[] = array( "name" => "Footer Text",
"desc" => "Add your copyright phrase or any text to be displayed below the footer (e.g. Copyright 2012. Designed by ProgressionStudios)",
"id" => "footer_text",
"std" => "Copyright © 2012 Primero Theme. Designed by <a href='http://themeforest.net/user/ProgressionStudios/portfolio?ref=ProgressionStudios' target='_blank'>Progression Studios</a>.",
"type" => "textarea");
$options[] = array( "name" => "Show Search Box in the header?",
"desc" => "Display a search box or advertisement on the header. Or show neither. ",
"id" => "display_searchbox",
"std" => "yes",
"type" => "select",
"class" => "long",
"options" => array('no' => 'No search or ad', 'yes' => 'Display Search', 'ad' => 'Display Advertisement'));
$options[] = array( "name" => "Advertisement code for header",
"desc" => "If you want to show an advertisement in the header, post the code here.",
"id" => "header_ad_code",
"std" => "",
"type" => "textarea");
$options[] = array( "name" => "Sidebar Position",
"desc" => "Choose which side you would like the sidebar to appear on all pages.",
"id" => "sidebar",
"std" => "right",
"type" => "select",
"class" => "mini",
"options" => array('left' => 'Left', 'right' => 'Right'));
$options[] = array( "name" => "Show Sidebar on Blog?",
"desc" => "Choose if you want a full width blog.",
"id" => "blog_sidebar",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Number of Footer Columns",
"desc" => "Choose how many columns you want to display in the footer.",
"id" => "footer_cols",
"std" => "4",
"type" => "select",
"class" => "mini",
"options" => array(1 => 1, 2 => 2, 3 => 3, 4 => 4));
$options[] = array( "name" => "Bread-Crumb Text",
"desc" => "This is the text will will appear before the bread-crumb. The Live Preview uses <strong>You are here:</strong>' ",
"id" => "bread_crumb",
"std" => "",
"class" => "mini",
"type" => "text");
$options[] = array( "name" => "Blog Insert More Button Text",
"desc" => "This is the text that will appear on the Blog Insert More button. Default text is <strong>Read more ›</strong> ",
"id" => "blog_button",
"std" => "Read more ›",
"class" => "mini",
"type" => "text");
$options[] = array( "name" => "Homepage Slider Insert More Button Text",
"desc" => "This is the text that will appear on the Homepage Slider Insert More button. Default text is <strong>Read more ›</strong> ",
"id" => "homepage_slider_button",
"std" => "Watch Now ›",
"class" => "mini",
"type" => "text");
$options[] = array("name" => "Homepage",
"type" => "heading");
$options[] = array( "name" => "Display Homepage Content on a Tab?",
"desc" => "By default the first tab will be your homepage content and title. Choose if you want to disable this.",
"id" => "homepage_content",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Choose a Parent Page for the HomePage Tabs",
"desc" => "Choose a Parent Page for the HomePage Tabs. Each Child Page will represent one tab on the Homepage. ",
"id" => "features_parent_page",
"std" => "",
"type" => "select",
"class" => "mini",
"options" => $options_pages);
$options[] = array( "name" => "Homepage Tabbed Area Columns",
"desc" => "Choose how many columns you want to use in the homepage tabbed area.",
"id" => "tabbed_cols",
"std" => "3",
"type" => "select",
"class" => "mini",
"options" => array( 1 => 1, 2 => 2, 3 => 3, 4 => 4));
$options[] = array( "name" => "Number of posts to show in each Homepage Tabbed Area",
"desc" => "Default is 24 posts",
"id" => "tabbed_number_posts",
"std" => "24",
"type" => "text");
$options[] = array( "name" => "Show Latest Videos Tab?",
"desc" => "Displays latest portfolio posts from all categories. The featured slider posts will be automatically excluded from this list.",
"id" => "latest_video_tab",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Latest Videos Tab Text",
"desc" => "This is the text that will appear on Latest Videos Tab. Default text is <strong>Latest Videos</strong> ",
"id" => "latest_videos_tab_text",
"std" => "Latest Videos",
"class" => "mini",
"type" => "text");
$options[] = array( "name" => "Show Recommended Videos Tab?",
"desc" => "Displays portfolio posts from the <strong>'recommended'</strong> Type",
"id" => "recommended_vids",
"std" => "no",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Recommended Videos Tab Text",
"desc" => "This is the text that will appear on Recommended Videos Tab. Default text is Recommendations ",
"id" => "recommended_tab_text",
"std" => "Recommendations",
"class" => "mini",
"type" => "text");
$options[] = array( "name" => "Show Popular Videos Tab?",
"desc" => "Displays portfolio posts from the <strong>'popular'</strong> Type",
"id" => "popular_vids",
"std" => "no",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Popular Videos Tab Text",
"desc" => "This is the text that will appear on the Popular Videos Tab. Default text is Popular Videos ",
"id" => "popular_tab_text",
"std" => "Popular Videos",
"class" => "mini",
"type" => "text");
$options[] = array( "name" => "Show More Videos Tab?",
"desc" => "Displays portfolio posts from the <strong>'more'</strong> Type",
"id" => "more_vids",
"std" => "no",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "More Videos Tab Text",
"desc" => "This is the text that will appear on More Videos Tab . Default text is More Videos ",
"id" => "more_vids_tab_text",
"std" => "More Videos",
"class" => "mini",
"type" => "text");
$options[] = array("name" => "Portfolio",
"type" => "heading");
$options[] = array( "name" => "Number of posts to show per portfolio page",
"desc" => "Default of 24 posts will display on portfolio before using next page.",
"id" => "portfolio_page_posts",
"std" => "24",
"type" => "text");
$options[] = array( "name" => "Portfolio Single Style",
"desc" => "Choose what template you want to use for the portfolio posts page.",
"id" => "portfolio_single_style",
"std" => "full",
"type" => "select",
"class" => "mini",
"options" => array ( 'full' => 'Large Template', 'compact' => 'Small Template' ) );
$options[] = array( "name" => "Display Portfolio Title on Portfolio Index's",
"desc" => "By default the Portfolio Title will display on the Portfolio Index Pages. Choose no to disable this.",
"id" => "display_portfolio_title_index",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Display Byline and Date on Portfolio Index's?",
"desc" => "By default the Byline will display on the Portfolio Index Pages (by Author on Date). Choose no to disable this.",
"id" => "display_portfolio_byline_index",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Display portfolio comments?",
"desc" => "Choose if you want to display the comments on the portfolio posts page.",
"id" => "portfolio_comments",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Display Next/Previous links on Portfolio Single?",
"desc" => "Choose if you want to display the Next and Previous links on the portfolio posts page (Top right of page).",
"id" => "portfolio_pagination_nav",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Display portfolio icons on hover?",
"desc" => "By default there will be icons displaying when you hover on images. Choose if you want to disable this.",
"id" => "display_portfolio_icons",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "If Icons are turned off, Do you want to link to the full size portfolio image?",
"desc" => "By default the portfolio will link to to a Portfolio Item Page with additional information. Mark yes if you want the portfolio to link to the full-size image or video instead. <strong>Note</strong>: This setting only works if the icons are disabled.",
"id" => "portfolio_single_on",
"std" => "no",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array("name" => "Social Icons",
"type" => "heading");
$options[] = array( "name" => "Display a Google+ Sharing button in your blog and portfolio single pages. ",
"desc" => "Choose to enable or disable the google+ button for social sharing. Displays on Blog and Portfolio Post page",
"id" => "googeplus_icon",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Display a Twitter Sharing button in your blog and portfolio single pages. ",
"desc" => "Choose to enable or disable the twitter button for social sharing.",
"id" => "twitter_icon_button",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Display a Facebook Sharing button in your blog and portfolio single pages. ",
"desc" => "Choose to enable or disable the Facebook button for social sharing.",
"id" => "facebook_icon_button",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Display a Facebook Like button in your blog and portfolio single pages. ",
"desc" => "Choose to enable or disable the Facebook button for liking posts.",
"id" => "facebook_like_button",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Show Social Icons in Header?",
"desc" => "Choose to enable or disable the three optional Social icons in the Header. <strong>Note</strong>: They will only appear if you have set a link below.",
"id" => "header_icons",
"std" => "yes",
"type" => "select",
"class" => "mini",
"options" => array('no' => 'No', 'yes' => 'Yes'));
$options[] = array( "name" => "Email Address",
"desc" => "Enter the email address that you would like to use for the social-networking icons.",
"id" => "email_address",
"std" => "",
"type" => "text");
$options[] = array( "name" => "Facebook Link",
"desc" => "Enter the Facebook Link that you would like to use for the social-networking icons. Note: Use http://",
"id" => "facebook_link",
"std" => "",
"type" => "text");
$options[] = array( "name" => "Twitter Link",
"desc" => "Enter the Twitter link that you would like to use for the social-networking icons. Note: Use http://",
"id" => "twitter_id",
"std" => "",
"type" => "text");
$options[] = array( "name" => "Youtube Channel Link",
"desc" => "Enter the Youtube Channel Link that you would like to use for the social-networking icons. Use http://",
"id" => "youtube_channel",
"std" => "",
"type" => "text");
$options[] = array( "name" => "Dribbble Link",
"desc" => "Enter the Dribbble Link that you would like to use for the social-networking icons. Use http://",
"id" => "dribbble_link",
"std" => "",
"type" => "text");
$options[] = array( "name" => "Skype ID",
"desc" => "Enter the Skype ID that you would like to use for the social-networking icons. Use http://",
"id" => "skype_id",
"std" => "",
"type" => "text");
$options[] = array( "name" => "Vimeo Channel Link",
"desc" => "Enter the Vimeo Channel Link that you would like to use for the social-networking icons. Use http://",
"id" => "vimeo_channel",
"std" => "",
"type" => "text");
$options[] = array( "name" => "Tumblr Link",
"desc" => "Enter the Tumblr Link that you would like to use for the social-networking icons. Use http://",
"id" => "tumblr_link",
"std" => "",
"type" => "text");
$options[] = array("name" => "Appearance",
"type" => "heading");
$options[] = array( "name" => "Logo",
"desc" => "Use the upload button to upload your site's logo and then click '<strong>Use this image</strong>'. Your logo size can vary but you will have to resize your own logo before uploading. The default logo is 328x108.",
"id" => "logo",
"std" => get_template_directory_uri() . "/images/logo.png",
"type" => "upload");
$options[] = array( "name" => "Favicon",
"desc" => "Use the upload button to upload your favicon (bookmark icon) and then click '<strong>Use this image</strong>'.",
"id" => "favicon",
"std" => "",
"type" => "upload");
$options[] = array( "name" => "Main Navigation Menu Style",
"desc" => "Choose whether to use regular or wide navigation in either light or dark color",
"id" => "navigation_style",
"std" => "narrow",
"type" => "select",
"class" => "mini",
"options" => array ( 'narrow' => 'Narrow Light', 'narrow-dark' => 'Narrow Dark', 'wide' => 'Wide Light', 'wide-dark' => 'Wide Dark' ) );
$options[] = array( "name" => "Light Navigation Background Color",
"desc" => "Use this to change the light navigation background color, default #ffffff.",
"id" => "narrow_navigation",
"std" => "#ffffff",
"type" => "color");
$options[] = array( "name" => "Dark Navigation Background Color",
"desc" => "Use this to change the dark navigation background color, default #7a7a7a.",
"id" => "dark_navigation",
"std" => "#7a7a7a",
"type" => "color");
$options[] = array( "name" => "Top Header Background Color",
"desc" => "Use this to change the Header background color, default #454a52.",
"id" => "menu_bg_color",
"std" => "#454a52",
"type" => "color");
$options[] = array( "name" => "Footer Background Color",
"desc" => "Use this to change the footer background color, default #454a52.",
"id" => "footer_bg_color",
"std" => "#454a52",
"type" => "color");
$options[] = array( "name" => "Link Color",
"desc" => "Use this to change the link color, default #7f7f7f.",
"id" => "link_color",
"std" => "#7f7f7f",
"type" => "color");
$options[] = array( "name" => "Link Hover Color",
"desc" => "Use this to change the link color on hover, default #7f7f7f.",
"id" => "link_color_hover",
"std" => "#7f7f7f",
"type" => "color");
$options[] = array( "name" => "Headings Color (H1-H6)",
"desc" => "Use this to change the Headings color, default #7f7f7f.",
"id" => "heading_color",
"std" => "#7f7f7f",
"type" => "color");
$options[] = array( "name" => "Footer Heading Color",
"desc" => "Use this to change the Footer Headings color, default #ffffff.",
"id" => "footer_heading_color",
"std" => "#ffffff",
"type" => "color");
$options[] = array( "name" => "Heading H1 Size",
"desc" => "Adjust the Heading Size, default 28. (in pixels) ",
"id" => "h1_size",
"std" => "28",
"type" => "text");
$options[] = array( "name" => "Heading H2 Size",
"desc" => "Adjust the Heading Size, default 24. (in pixels) ",
"id" => "h2_size",
"std" => "24",
"type" => "text");
$options[] = array( "name" => "Heading H3 Size",
"desc" => "Adjust the Heading Size, default 16. (in pixels) ",
"id" => "h3_size",
"std" => "16",
"type" => "text");
$options[] = array( "name" => "Heading H4 Size",
"desc" => "Adjust the Heading Size, default 15. (in pixels) ",
"id" => "h4_size",
"std" => "15",
"type" => "text");
$options[] = array( "name" => "Heading H5 Size",
"desc" => "Adjust the Heading Size, default 13. (in pixels) ",
"id" => "h5_size",
"std" => "13",
"type" => "text");
$options[] = array( "name" => "Heading H6 Size",
"desc" => "Adjust the Heading Size, default 11. (in pixels) ",
"id" => "h6_size",
"std" => "11",
"type" => "text");
$options[] = array( "name" => "Body Font",
"desc" => "Choose a Default Body Font. Default - 'Helvetica Neue'",
"id" => "body_font",
"std" => "'Helvetica Neue'",
"type" => "text");
$options[] = array( "name" => "Navigation & Headings Font @Font-Face",
"desc" => "Choose a Default Heading Font. (Navigation, Main Headings, Buttons and Pagination) Default - 'Lato'",
"id" => "heading_font",
"std" => "'Lato'",
"type" => "text");
$options[] = array("name" => "Sliders",
"type" => "heading");
$options[] = array( "name" => "A. HomePage Slider Type",
"desc" => "Choose which homepage slider you want to use.",
"id" => "slider_type",
"std" => "full_width",
"type" => "select",
"class" => "long",
"options" => array('full_width' => 'Wide Image Slider', 'text' => 'Slider Image with Text', 'vertical' => 'Vertical Slider with thumbnails'));
$options[] = array( "name" => "A. Homepage Slider Animation",
"desc" => "Choose a transition effect between slides.",
"id" => "animation",
"std" => "fade",
"type" => "select",
"class" => "mini",
"options" => array('fade' => 'Fade', 'hslide' => 'Horizontal Slide', 'vslide' => 'Vertical Slide'));
$options[] = array( "name" => "A. HomePage Adnimation Speed",
"desc" => "Duration of animation between images (the time the images change in).",
"id" => "speed",
"std" => "800",
"class" => "mini",
"type" => "text");
$options[] = array( "name" => "A. Homepage Autoplay?",
"desc" => "Choose whether or not to have the slider autoplay.",
"id" => "timer",
"std" => "true",
"type" => "select",
"class" => "mini",
"options" => array('true' => 'On', 'false' => 'Off'));
$options[] = array( "name" => "A. Homepage Slider Transition Speed",
"desc" => "How long each slide will show.",
"id" => "transition",
"std" => "4500",
"class" => "mini",
"type" => "text");
$options[] = array( "name" => "A. HomePage Next/Previous Arrows",
"desc" => "Show the next/previous navigation.",
"id" => "arrows",
"std" => "true",
"type" => "select",
"class" => "mini",
"options" => array('true' => 'On', 'false' => 'Off'));
$options[] = array( "name" => "A. HomePage Bullets",
"desc" => "Show the bullet navigation.",
"id" => "bullets",
"std" => "true",
"type" => "select",
"class" => "mini",
"options" => array('true' => 'On', 'false' => 'Off'));
$options[] = array( "name" => "B. Portfolio Slider Animation Speed",
"desc" => "Duration of animation between images (the time the images changes in).",
"id" => "portfolio_transition",
"std" => "400",
"class" => "mini",
"type" => "text");
$options[] = array( "name" => "B. Portfolio Slider Transition Speed",
"desc" => "How long each slide will show.",
"id" => "portfolio_speed",
"std" => "3500",
"class" => "mini",
"type" => "text");
$options[] = array( "name" => "B. Portfolio Slider Autoplay?",
"desc" => "Choose whether or not to have the slider autoplay.",
"id" => "portfolio_timer",
"std" => "true",
"type" => "select",
"class" => "mini",
"options" => array('true' => 'On', 'false' => 'Off'));
$options[] = array( "name" => "B. Portfolio Slider Next/Previous Arrows",
"desc" => "Show the next/previous navigation.",
"id" => "portfolio_arrows",
"std" => "false",
"type" => "select",
"class" => "mini",
"options" => array('true' => 'On', 'false' => 'Off'));
$options[] = array("name" => "Tools",
"type" => "heading");
$options[] = array( "name" => "Homepage Title",
"desc" => "Enter a title for the homepage, leave blank if you want to use an auto generated one.",
"id" => "home_title",
"std" => "",
"type" => "text");
$options[] = array( "name" => "Homepage Meta Description",
"desc" => "Enter a description for the homepage, about 140 characters.",
"id" => "home_meta",
"std" => "",
"type" => "text");
$options[] = array( "name" => "Tracking Code",
"desc" => "Paste your tracking code here e.g. Google Analytics etc... without script tags",
"id" => "tracking_code",
"std" => "",
"type" => "textarea");
$options[] = array( "name" => "404 Error Message Text",
"desc" => "Enter your custom 404 error message.",
"id" => "404_error",
"std" => "404 Page Not Found",
"type" => "textarea");
$options[] = array( "name" => "Custom CSS",
"desc" => "Paste your custom css here... without script tags",
"id" => "custom_css",
"std" => "",
"type" => "textarea");
$options[] = array( "name" => "Custom Javascript",
"desc" => "Paste your custom JavaScript code here... without script tags",
"id" => "custom_js",
"std" => "",
"type" => "textarea");
return $options;
}