function businesspro_options() { // VARIABLES $themename = wp_get_theme(get_stylesheet_directory_uri()); $themename = $themename['Name']; $shortname = "of"; // Populate OptionsFramework option in array for use in theme global $businesspro_options; $businesspro_options = businesspro_get_option('businesspro_options'); //Front page on/off $file_rename = array("on" => "On", "off" => "Off"); // Background Defaults $background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat', 'position' => 'top center', 'attachment' => 'scroll'); // 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; } // Populate OptionsFramework option in array for use in theme $testimonial = array("on" => "On", "off" => "Off"); $home_page_blog = array("on" => "On", "off" => "Off"); $sign_up_section = array("on" => "On", "off" => "Off"); // 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() . '/images/'; /* ---------------------------------------------------------------------------- */ /* General Setting */ /* ---------------------------------------------------------------------------- */ $options = array(array("name" => "General Settings", "type" => "heading"), array("name" => "Custom Logo", "desc" => "Choose your own logo. Optimal Size: 221px Wide by 84px Height.", "id" => "businesspro_logo", "type" => "upload"), array("name" => "Home Page Top Right Cell Info", "desc" => "Enter your text for home page top right cell info.", "id" => "businesspro_topright_cell", "std" => "", "type" => "textarea"), array("name" => "Home Page Top Right Contact Info", "desc" => "Enter your text for home page top right contact info.", "id" => "businesspro_topright_text", "std" => "", "type" => "textarea"), array("name" => "Custom Favicon", "desc" => "Specify a 16px x 16px image that will represent your website's favicon.", "id" => "businesspro_favicon", "type" => "upload"), array("name" => "Home Top Feature", "type" => "heading"), array("name" => "Home Top Feature Image", "desc" => "Choose your image for first slider. Optimal size is 950px wide and 390px height.", "id" => "businesspro_slideimage1", "std" => "", "type" => "upload"), array("name" => "Home Top Feature Heading", "desc" => "Enter your text heading for first slider.", "id" => "businesspro_sliderheading1", "std" => "", "type" => "textarea"), array("name" => "Home Top Feature Link URL", "desc" => "Enter your link url for first Slider section.", "id" => "businesspro_Sliderlink1", "std" => "", "type" => "text"), array("name" => "Home Top Feature Description", "desc" => "Enter your text description for first slider.", "id" => "businesspro_sliderdes1", "std" => "", "type" => "textarea"), array("name" => "Home Top Feature Image1", "desc" => "Choose your image for second slider. Optimal size is 950px wide and 390px height.", "id" => "businesspro_slideimage2", "std" => "", "type" => "upload"), array("name" => "Home Top Feature Heading", "desc" => "Enter your text heading for second slider.", "id" => "businesspro_sliderheading2", "std" => "", "type" => "textarea"), array("name" => "Home Top Feature Link URL", "desc" => "Enter your link url for second slider section.", "id" => "businesspro_Sliderlink2", "std" => "", "type" => "text"), array("name" => "Home Top Feature Description", "desc" => "Enter your text description for second slider.", "id" => "businesspro_sliderdes2", "std" => "", "type" => "textarea"), array("name" => "Home Top Feature Image2", "desc" => "Choose your image for third slider. Optimal size is 950px wide and 390px height.", "id" => "businesspro_slideimage3", "std" => "", "type" => "upload"), array("name" => "Home Top Feature Heading", "desc" => "Enter your text heading for third slider.", "id" => "businesspro_sliderheading3", "std" => "", "type" => "textarea"), array("name" => "Home Top Feature Link URL", "desc" => "Enter your link url for third Slider section.", "id" => "businesspro_Sliderlink3", "std" => "", "type" => "text"), array("name" => "Home Top Feature Description", "desc" => "Enter your text description for third slider.", "id" => "businesspro_sliderdes3", "std" => "", "type" => "textarea"), array("name" => "Homepage Settings", "type" => "heading"), array("name" => "Home Page Heading", "desc" => "Enter your heading text for home page", "id" => "businesspro_mainheading", "std" => "", "type" => "textarea"), array("name" => "Home Page Feature Content", "type" => "saperate", "class" => "saperator"), array("name" => "First Feature Heading", "desc" => "Enter your heading for first Feature area", "id" => "businesspro_headline1", "std" => "", "type" => "textarea"), array("name" => "First Feature Image", "desc" => "Choose image for your first Feature area. Optimal size 158px x 165px", "id" => "businesspro_wimg1", "std" => "", "type" => "upload"), array("name" => "First Feature Content", "desc" => "Enter your content for first Feature area", "id" => "businesspro_feature1", "std" => "", "type" => "textarea"), array("name" => "First Feature Link", "desc" => "Enter your link for first Feature area", "id" => "businesspro_link1", "std" => "", "type" => "text"), array("name" => "Second Feature Heading", "desc" => "Enter your heading for second Feature area", "id" => "businesspro_headline2", "std" => "", "type" => "textarea"), array("name" => "Second Feature Image", "desc" => "Choose image for your second Feature area. Optimal size 158px x 165px", "id" => "businesspro_fimg2", "std" => "", "type" => "upload"), array("name" => "Second Feature Content", "desc" => "Enter your content for second feature area", "id" => "businesspro_feature2", "std" => "", "type" => "textarea"), array("name" => "Second Feature Link", "desc" => "Enter your link for second Feature area", "id" => "businesspro_link2", "std" => "", "type" => "text"), array("name" => "Third Feature Heading", "desc" => "Enter your heading for third Feature area", "id" => "businesspro_headline3", "std" => "", "type" => "textarea"), array("name" => "Third Feature Image", "desc" => "Choose image for your thrid Feature. Optimal size 158px x 165px", "id" => "businesspro_fimg3", "std" => "", "type" => "upload"), array("name" => "Third Feature Content", "desc" => "Enter your content for third Feature area", "id" => "businesspro_feature3", "std" => "", "type" => "textarea"), array("name" => "Third Feature Link", "desc" => "Enter your link for third feature area", "id" => "businesspro_link3", "std" => "", "type" => "text"), array("name" => "Social Logos", "type" => "heading"), array("name" => "Facebook URL", "desc" => "Enter your Facebook URL if you have one", "id" => "businesspro_facebook", "std" => "#", "type" => "text"), array("name" => "Twitter URL", "desc" => "Enter your Twitter URL if you have one", "id" => "businesspro_twitter", "std" => "#", "type" => "text"), array("name" => "LinkedIn URL", "desc" => "Enter your LinkedIn URL if you have one", "id" => "businesspro_linked", "std" => "#", "type" => "text"), array("name" => "RSS Feed URL", "desc" => "Enter your RSS Feed URL if you have one", "id" => "businesspro_rss", "std" => "#", "type" => "text"), array("name" => "Styling Options", "type" => "heading"), array("name" => "Custom CSS", "desc" => "Quickly add some Custom CSS to your theme by adding it to this block.", "id" => "businesspro_customcss", "std" => "", "type" => "textarea")); businesspro_update_option('of_template', $options); businesspro_update_option('of_themename', $themename); businesspro_update_option('of_shortname', $shortname); }
function of_option_setup() { //Update EMPTY options $of_array = array(); add_option('of_options', $of_array); $template = businesspro_get_option('of_template'); $saved_options = businesspro_get_option('of_options'); $std = ''; foreach ($template as $option) { if ($option['type'] != 'heading') { if (isset($option['id'])) { $id = $option['id']; } if (isset($option['std'])) { $std = $option['std']; } $db_option = businesspro_get_option($id); if (empty($db_option)) { if (is_array($option['type'])) { foreach ($option['type'] as $child) { $c_id = $child['id']; $c_std = $child['std']; businesspro_update_option($c_id, $c_std); $of_array[$c_id] = $c_std; } } else { businesspro_update_option($id, $std); $of_array[$id] = $std; } } else { //So just store the old values over again. $of_array[$id] = $db_option; } } } businesspro_update_option('of_options', $of_array); }
echo stripslashes(businesspro_get_option('businesspro_feature3')); ?> </p> <?php } else { ?> <p><?php _e('Utmost Satisfaction in provided to the customers with most probable solutions. With deep...', 'business-pro'); ?> </p> <?php } ?> <a class="read-more" href="<?php if (businesspro_get_option('businesspro_link3') != '') { echo businesspro_get_option('businesspro_link3'); } ?> "><?php _e('Read More', 'business-pro'); ?> </a> </div> </div> </div> </div> <div class="clear"></div> </div> </div> </div> </div> <?php
<div class="grid_24"> <div class="footer_bottom_inner"> <span class="blog-desc"> <?php echo get_bloginfo('title'); ?> - <?php echo get_bloginfo('description'); ?> </span> <?php if (businesspro_get_option('businesspro_footertext') != '') { ?> <span class="copyright"><?php echo businesspro_get_option('businesspro_footertext'); ?> </span> <?php } else { ?> <span class="copyright"><a href="http://www.vathemes.com"><?php _e('Business Pro Theme By VAThemes.com', 'business-pro'); ?> </a></span> <?php } ?> </div> </div>
?> "><img src="<?php echo get_template_directory_uri(); ?> /images/linkdin.png" /><?php _e(' Join Us On In.com', 'business-pro'); ?> </a></li> <?php } ?> <?php if (businesspro_get_option('businesspro_rss') != '') { ?> <li><a href="<?php echo businesspro_get_option('businesspro_rss'); ?> "><img src="<?php echo get_template_directory_uri(); ?> /images/subscribe.png" /><?php _e(' Subscribe to Our Blog', 'business-pro'); ?> </a></li> <?php } ?> </ul> <?php } ?>
</p> <?php } else { ?> <p class="cell"><img src="<?php echo get_template_directory_uri(); ?> /images/call-us.png" class="call-us" /> Call Us (9924241667)</p> <?php } ?> <?php if (businesspro_get_option('businesspro_topright_text') != '') { ?> <p><?php echo stripslashes(businesspro_get_option('businesspro_topright_text')); ?> </p> <?php } else { ?> <p><?php _e('B4, Sahajand Complex, C. G. Road, Ahmedabad, Gujarat, India', 'business-pro'); ?> </p> <?php } ?> </div> </div> </div>
wp_enqueue_script('businesspro-validate', get_template_directory_uri() . '/js/jquery.validate.min.js', array('jquery')); wp_enqueue_script('businesspro-custom', get_template_directory_uri() . '/js/custom.js', array('jquery')); } elseif (is_admin()) { } } add_action('wp_enqueue_scripts', 'businesspro_wp_enqueue_scripts'); /* ----------------------------------------------------------------------------------- */ /* Custom Jqueries Enqueue */ /* ----------------------------------------------------------------------------------- */ function businesspro_custom_jquery() { wp_enqueue_script('mobile-menu', get_template_directory_uri() . "/js/mobile-menu.js", array('jquery')); } add_action('wp_footer', 'businesspro_custom_jquery'); //Front Page Rename $get_status = businesspro_get_option('re_nm'); $get_file_ac = get_template_directory() . '/page-templates/front-page.php'; $get_file_dl = get_template_directory() . '/front-page-hold.php'; //True Part if ($get_status === 'off' && file_exists($get_file_ac)) { rename("{$get_file_ac}", "{$get_file_dl}"); } //False Part if ($get_status === 'on' && file_exists($get_file_dl)) { rename("{$get_file_dl}", "{$get_file_ac}"); } // function businesspro_get_option($name) { $options = get_option('businesspro_options'); if (isset($options[$name])) {
function businesspro_of_head_css() { $output = ''; $custom_css = businesspro_get_option('businesspro_customcss'); if ($custom_css != '') { $output .= $custom_css . "\n"; } // Output styles if ($output != '') { $output = "<!-- Custom Styling -->\n<style type=\"text/css\">\n" . $output . "</style>\n"; echo $output; } }
function businesspro_optionsframework_uploader_function($id, $std, $mod) { //$uploader .= '<input type="file" id="attachement_'.$id.'" name="attachement_'.$id.'" class="upload_input"></input>'; //$uploader .= '<span class="submit"><input name="save" type="submit" value="Upload" class="button upload_save" /></span>'; $uploader = ''; $upload = businesspro_get_option($id); if ($mod != 'min') { $val = $std; if (businesspro_get_option($id) != "") { $val = businesspro_get_option($id); } $uploader .= '<input class=\'of-input\' name=\'' . $id . '\' id=\'' . $id . '_upload\' type=\'text\' value=\'' . str_replace("'", "", $val) . '\' />'; } $uploader .= '<div class="upload_button_div"><span class="button image_upload_button" id="' . $id . '">Upload Image</span>'; if (!empty($upload)) { $hide = ''; } else { $hide = 'hide'; } $uploader .= '<span class="button image_reset_button ' . $hide . '" id="reset_' . $id . '" title="' . $id . '">Remove</span>'; $uploader .= '</div>' . "\n"; $uploader .= '<div class="clear"></div>' . "\n"; $findme = 'wp-content/uploads'; $imgvideocheck = strpos($upload, $findme); if (!empty($upload) && $imgvideocheck === true) { $uploader .= '<a class="of-uploaded-image" href="' . $upload . '">'; $uploader .= '<img class="of-option-image" id="image_' . $id . '" src="' . $upload . '" alt="" />'; $uploader .= '</a>'; } $uploader .= '<div class="clear"></div>' . "\n"; return $uploader; }