Exemple #1
0
 function bizway_options()
 {
     // VARIABLES
     $themename = get_theme_data(get_template_directory() . '/style.css');
     $themename = $themename['Name'];
     $shortname = "of";
     // Populate OptionsFramework option in array for use in theme
     global $of_options;
     $of_options = bizway_get_option('of_options');
     // Background Defaults
     $background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat', 'position' => 'top center', 'attachment' => 'scroll');
     //Front page on/off
     $file_rename = array("on" => "On", "off" => "Off");
     //Stylesheet Reader
     $alt_stylesheets = array("default" => "default", "blue" => "blue", "coffee" => "coffee", "green" => "green", "brown" => "brown", "pink" => "pink", "orange" => "orange", "purple" => "purple", "red" => "red", "forrest-green" => "forrest-green", "yellow" => "yellow");
     // 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() . '/images/';
     $options = array(array("name" => "General Settings", "type" => "heading"), array("name" => "Custom Logo", "desc" => "Choose your own logo. Optimal Size: 300px Wide by 90px Height.", "id" => "bizway_logo", "type" => "upload"), array("name" => "Custom Favicon", "desc" => "Specify a 16px x 16px image that will represent your website's favicon.", "id" => "bizway_favicon", "type" => "upload"), array("name" => "Tracking Code", "desc" => "Paste your Google Analytics (or other) tracking code here.", "id" => "bizway_analytics", "std" => "", "type" => "textarea"), array("name" => "Homepage Settings", "type" => "heading"), array("name" => "First Heading", "desc" => "Enter your text for first heading.", "id" => "bizway_first_head", "std" => "", "type" => "textarea"), array("name" => "Second Heading", "desc" => "Enter your text for second heading.", "id" => "bizway_second_head", "std" => "", "type" => "textarea"), array("name" => "Slider Settings", "type" => "heading"), array("name" => "Slider Image1", "desc" => "Choose your image for first slider. Optimal size is 950px wide and 350px height.", "id" => "bizway_slideimage1", "std" => "", "type" => "upload"), array("name" => "Slide 1 Link", "desc" => "Enter your link url for slide1", "id" => "bizway_slidelink1", "std" => "", "type" => "text"), array("name" => "Slider Image2", "desc" => "Choose your image for second slider. Optimal size is 950px wide and 350px height.", "id" => "bizway_slideimage2", "std" => "", "type" => "upload"), array("name" => "Slide 2 Link", "desc" => "Enter your link url for slide2", "id" => "bizway_slidelink2", "std" => "", "type" => "text"), array("name" => "Homepage Feature Area", "type" => "heading"), array("name" => "Homepage Feature Area First Image", "desc" => "Choose your image for homepage feature area first image.", "id" => "bizway_featureimg1", "std" => "", "type" => "upload"), array("name" => "First Feature Heading", "desc" => "Enter your text for first col heading.", "id" => "bizway_firsthead", "std" => "", "type" => "textarea"), array("name" => "First Feature Description", "desc" => "Enter your text for first col description.", "id" => "bizway_firstdesc", "std" => "", "type" => "textarea"), array("name" => "First Feature Link URL", "desc" => "Enter your link url for fourth feature section.", "id" => "bizway_link1", "std" => "", "type" => "text"), array("name" => "Second Feature Starts From Here.", "type" => "saperate", "class" => "saperator"), array("name" => "Homepage Feature Area Second Image", "desc" => "Choose your image for homepage Feature area second image.", "id" => "bizway_featureimg2", "std" => "", "type" => "upload"), array("name" => "Second Feature Heading", "desc" => "Enter your text for second col heading.", "id" => "bizway_secondhead", "std" => "", "type" => "textarea"), array("name" => "Second Col Description", "desc" => "Enter your text for second col description.", "id" => "bizway_seconddesc", "std" => "", "type" => "textarea"), array("name" => "Second Feature Link URL", "desc" => "Enter your link url for fourth feature section.", "id" => "bizway_link2", "std" => "", "type" => "text"), array("name" => "Third Feature Starts From Here.", "type" => "saperate", "class" => "saperator"), array("name" => "Homepage Third Feature  Image", "desc" => "Choose your image for homepage Feature area third image.", "id" => "bizway_featureimg3", "std" => "", "type" => "upload"), array("name" => "Third Feature Heading", "desc" => "Enter your text for second col heading.", "id" => "bizway_thirdhead", "std" => "", "type" => "textarea"), array("name" => "Third Feature Description", "desc" => "Enter your text for Third Feature description.", "id" => "bizway_thirddesc", "std" => "", "type" => "textarea"), array("name" => "Third Feature Link URL", "desc" => "Enter your link url for fourth feature section.", "id" => "bizway_link3", "std" => "", "type" => "text"), array("name" => "Styling Options", "type" => "heading"), array("name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block.", "id" => "bizway_customcss", "std" => "", "type" => "textarea"));
     bizway_update_option('of_template', $options);
     bizway_update_option('of_themename', $themename);
     bizway_update_option('of_shortname', $shortname);
 }
Exemple #2
0
function bizway_option_setup()
{
    //Update EMPTY options
    $of_array = array();
    add_option('of_options', $of_array);
    $template = bizway_get_option('of_template');
    $saved_options = bizway_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 = bizway_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'];
                        bizway_update_option($c_id, $c_std);
                        $of_array[$c_id] = $c_std;
                    }
                } else {
                    bizway_update_option($id, $std);
                    $of_array[$id] = $std;
                }
            } else {
                //So just store the old values over again.
                $of_array[$id] = $db_option;
            }
        }
    }
    bizway_update_option('of_options', $of_array);
}
Exemple #3
0
body_class();
?>
 id="regal_body">
		<div class="header-container">
			<div class="container_24">
				<div class="grid_24">
					<div class="header">
						<!--Start Logo-->
						<div class="logo">
						
						<a href="<?php 
echo home_url();
?>
"><img src="<?php 
if (bizway_get_option('bizway_logo') != '') {
    echo bizway_get_option('bizway_logo');
} else {
    echo get_template_directory_uri();
    ?>
/images/logo.png<?php 
}
?>
" alt="<?php 
bloginfo('name');
?>
" /></a>
						
						</div>	
										
						<!--End Logo-->
						<div class="tagline">
Exemple #4
0
function bizway_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 = bizway_get_option($id);
    if ($mod != 'min') {
        $val = $std;
        if (bizway_get_option($id) != "") {
            $val = bizway_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;
}
Exemple #5
0
    <div class="wrapper">
        <div class="container_24">
            <div class="grid_24">
                <div class="footer_bottom_content">
                    <p class="theme_desc"><?php 
echo get_bloginfo('title');
?>
-<?php 
echo get_bloginfo('description');
?>
</p>
                    <?php 
if (bizway_get_option('bizway_footertext') != '') {
    ?>
                        <p class="copyright"><?php 
    echo esc_attr(bizway_get_option('bizway_footertext'));
    ?>
</p> 
                    <?php 
} else {
    ?>
                        <p class="copyright"> <a href="<?php 
    esc_url("http://www.inkthemes.com");
    ?>
"><?php 
    _e('BizWay Theme', 'bizway');
    ?>
</a><?php 
    _e(' powered by ', 'bizway');
    ?>
<a href="http://www.wordpress.org"><?php 
"/></a>
                        <?php 
} else {
    ?>
		

                            <a href="#"><img class="effect" src="<?php 
    echo get_template_directory_uri();
    ?>
/images/img3.png" /></a>
                        <?php 
}
if (bizway_get_option('bizway_thirddesc') != '') {
    ?>
                            <p><?php 
    echo stripslashes(bizway_get_option('bizway_thirddesc'));
    ?>
</p>
                        <?php 
} else {
    ?>
                            <p><?php 
    _e("Slider in the Header. It comes different Color Schemes red, green, blue, brown, pink, black, orange. Hello this design comes.", "bizway");
    ?>
</p>
                        <?php 
}
?>
 
                    </div>
                </div>
Exemple #7
0
/* ----------------------------------------------------------------------------------- */
function bizway_wp_enqueue_scripts()
{
    if (!is_admin()) {
        wp_enqueue_script('jquery');
        wp_enqueue_script('bizway-ddsmoothmenu', get_template_directory_uri() . '/js/ddsmoothmenu.js', array('jquery'));
        wp_enqueue_script('bizway-slider', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array('jquery'));
        wp_enqueue_script('bizway-jquery.prettyPhoto', get_template_directory_uri() . '/js/jquery.prettyPhoto.js', array('jquery'));
        wp_enqueue_script('bizway-mobilemenu', get_template_directory_uri() . '/js/mobilemenu.js', array('jquery'));
        wp_enqueue_script('bizway-custom', get_template_directory_uri() . '/js/custom.js', array('jquery'));
    } elseif (is_admin()) {
    }
}
add_action('wp_enqueue_scripts', 'bizway_wp_enqueue_scripts');
//Front Page Rename
$get_status = bizway_get_option('re_nm');
$get_file_ac = TEMPLATEPATH . '/front-page.php';
$get_file_dl = TEMPLATEPATH . '/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 bizway_get_option($name)
{
    $options = get_option('bizway_options');
    if (isset($options[$name])) {
Exemple #8
0
function bizway_of_head_css()
{
    $output = '';
    $custom_css = bizway_get_option('bizway_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;
    }
}
Exemple #9
0
    echo bizway_get_option('bizway_slideimage2');
    ?>
</li>
                        <?php 
} else {
    ?>
 
                            <li>
                                <?php 
    if (bizway_get_option('bizway_slideimage2') != '') {
        ?>
                                    <a href="<?php 
        echo bizway_get_option('bizway_slidelink2');
        ?>
"><img  src="<?php 
        echo bizway_get_option('bizway_slideimage2');
        ?>
" alt=""/></a>
                                <?php 
    } else {
        ?>
                                    <a href="#"><img  src="<?php 
        echo get_template_directory_uri();
        ?>
/images/slide2.jpg" alt=""/></a>
                                <?php 
    }
    ?>
</li>
                        <?php 
}
Exemple #10
0
<div class="footer_bottom">
    <!--Start Wrapper-->
    <div class="wrapper">
        <div class="container_24">
            <div class="grid_24">
                <div class="footer_bottom_content">
				<p class="theme_desc"><?php 
echo get_bloginfo('title');
?>
 - &copy; Apple Construction Group Ltd. 2012.</p>
				<!--
                    <?php 
if (bizway_get_option('bizway_footertext') != '') {
    ?>
                        <p class="copyright"><?php 
    echo bizway_get_option('bizway_footertext');
    ?>
</p> 
                    <?php 
} else {
    ?>
                        <p class="copyright">Bizway Responsive Theme <?php 
    _e('Designed by', 'bizway');
    ?>
<a href="http://www.inkthemes.com"> InkThemes.com</a></p>
                    <?php 
}
?>
                -->
                </div>
            </div>