function infoway_options()
 {
     // VARIABLES
     $themename = "InfoWay";
     $shortname = "of";
     // Populate OptionsFramework option in array for use in theme
     global $infoway_options;
     $infoway_options = infoway_get_option('infoway_options');
     // Background Defaults
     $background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat', 'position' => 'top center', 'attachment' => 'scroll');
     //Stylesheet Reader
     $captcha_option = array("on" => __("On", 'infoway'), "off" => __("Off", 'infoway'));
     // 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:', 'infoway');
     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", 'infoway'), "type" => "heading"), array("name" => __("Custom Logo", 'infoway'), "desc" => __("Choose your own logo. Optimal Size: 300px Wide by 90px Height.", 'infoway'), "id" => "infoway_logo", "type" => "upload"), array("name" => __("Custom Favicon", 'infoway'), "desc" => __("Specify a 16px x 16px image that will represent your website's favicon.", 'infoway'), "id" => "infoway_favicon", "type" => "upload"), array("name" => __("Body Background Image", 'infoway'), "desc" => __("Select image to change your website background", 'infoway'), "id" => "infoway_bodybg", "std" => "", "type" => "upload"), array("name" => __("Top Right Contact Details", 'infoway'), "desc" => __("Enter your contact detail/number to display it at the top right corner.", 'infoway'), "id" => "infoway_topright", "std" => "", "type" => "textarea"), array("name" => __("Contact No.", 'infoway'), "desc" => __("Enter your contact number on which you want to receive call's \n\t\t\t(Feature active only when site is viewed on moblie devices).\n\t\t\texample: +91-1800-548-783", 'infoway'), "id" => "infoway_contact_number", "std" => "", "type" => "text"), array("name" => __("Top Infobar Settings", 'infoway'), "type" => "heading"), array("name" => __("Top Infobar Text", 'infoway'), "desc" => __("Enter your Text", 'infoway'), "id" => "infoway_topinfobar_text", "std" => "", "type" => "textarea"), array("name" => __("Top Infobar button text", 'infoway'), "desc" => __("Enter your sitename", 'infoway'), "id" => "infoway_topinfobar_sitename", "std" => "", "type" => "text"), array("name" => __("Top Infobar Button Click Url", 'infoway'), "desc" => __("Enter your siteurl", 'infoway'), "id" => "infoway_topinfobar_url", "std" => "", "type" => "text"), array("name" => __("Home page Image Section Starts From Here.", 'infoway'), "type" => "saperate", "class" => "saperator"), array("name" => __("Upload Home Page Image", 'infoway'), "desc" => __("Choose Image for Top feature Area. Optimal size is 950px wide and 363px height.", 'infoway'), "id" => "infoway_slideimage1", "std" => "", "type" => "upload"), array("name" => __("Home Page Image Link", 'infoway'), "desc" => __("Enter yout link url for Home page image", 'infoway'), "id" => "infoway_slidelink1", "std" => "", "type" => "text"), array("name" => __("Feature Settings", 'infoway'), "type" => "heading"), array("name" => __("Feature Page Heading", 'infoway'), "desc" => __("Enter your text for Feature page heading. (just below the slider section)", 'infoway'), "id" => "infoway_main_heading", "std" => "", "type" => "textarea"), array("name" => __("Front Page Feature Section Starts From Here.", 'infoway'), "type" => "saperate", "class" => "saperator"), array("name" => __("First Feature Heading", 'infoway'), "desc" => __("Enter your text for first col heading.", 'infoway'), "id" => "infoway_firsthead", "std" => "", "type" => "text"), array("name" => __("First Feature Description", 'infoway'), "desc" => __("Enter your text description.", 'infoway'), "id" => "infoway_firstdesc", "std" => "", "type" => "textarea"), array("name" => __("First Feature Link URL", 'infoway'), "desc" => __("Enter your link url for first feature section.", 'infoway'), "id" => "infoway_link1", "std" => "", "type" => "text"), array("name" => __("Second Feature Heading", 'infoway'), "desc" => __("Enter your text for second Feature heading.", 'infoway'), "id" => "infoway_secondhead", "std" => "", "type" => "text"), array("name" => __("Second Feature Description", 'infoway'), "desc" => __("Enter your text for second Feature description.", 'infoway'), "id" => "infoway_seconddesc", "std" => "", "type" => "textarea"), array("name" => __("Second Feature Link URL", 'infoway'), "desc" => __("Enter your link url for Second feature section.", 'infoway'), "id" => "infoway_link2", "std" => "", "type" => "text"), array("name" => __("Third Feature Heading", 'infoway'), "desc" => __("Enter your text for Third Feature heading.", 'infoway'), "id" => "infoway_thirdhead", "std" => "", "type" => "text"), array("name" => __("Third Feature Description", 'infoway'), "desc" => __("Enter your text for Third Feature description.", 'infoway'), "id" => "infoway_thirddesc", "std" => "", "type" => "textarea"), array("name" => __("Third Feature Link URL", 'infoway'), "desc" => __("Enter your link url for fourth Feature section.", 'infoway'), "id" => "infoway_link3", "std" => "", "type" => "text"), array("name" => __("Bottom Feature Start From Here.", 'infoway'), "type" => "saperate", "class" => "saperator"), array("name" => __("Testimonial Heading", 'infoway'), "desc" => __("Enter your text Testimonial Heading.", 'infoway'), "id" => "infoway_testimonial_head", "std" => "", "type" => "textarea"), array("name" => __("Testimonial Description", 'infoway'), "desc" => __("Enter your text Testimonial Description.", 'infoway'), "id" => "infoway_testimonial_desc", "std" => "", "type" => "textarea"), array("name" => __("Styling Options", 'infoway'), "type" => "heading"), array("name" => __("Custom CSS", 'infoway'), "desc" => __("Quickly add some CSS to your theme by adding it to this block.", 'infoway'), "id" => "infoway_customcss", "std" => "", "type" => "textarea"));
     infoway_update_option('of_template', $options);
     infoway_update_option('of_themename', $themename);
     infoway_update_option('of_shortname', $shortname);
 }
function infoway_option_setup()
{
    //Update EMPTY options
    $of_array = array();
    add_option('infoway_options', $of_array);
    $template = infoway_get_option('of_template');
    $saved_options = infoway_get_option('infoway_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 = infoway_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'];
                        infoway_update_option($c_id, $c_std);
                        $of_array[$c_id] = $c_std;
                    }
                } else {
                    infoway_update_option($id, $std);
                    $of_array[$id] = $std;
                }
            } else {
                //So just store the old values over again.
                $of_array[$id] = $db_option;
            }
        }
    }
    infoway_update_option('infoway_options', $of_array);
}
function infoway_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 = infoway_get_option($id);
    if ($mod != 'min') {
        $val = $std;
        if (infoway_get_option($id) != "") {
            $val = infoway_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', 'infoway') . '</span>';
    if (!empty($upload)) {
        $hide = '';
    } else {
        $hide = 'hide';
    }
    $uploader .= '<span class="button image_reset_button ' . $hide . '" id="reset_' . $id . '" title="' . $id . '">' . __('Remove', 'infoway') . '</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;
}
function infoway_of_head_css()
{
    $output = '';
    $custom_css = infoway_get_option('infoway_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;
    }
}
Esempio n. 5
0
" /></a></div>
                            </div>
                            <div class="grid_12 omega">&nbsp;&nbsp;&nbsp;
                                <div class="contactinfo"><img src="<?php 
echo get_template_directory_uri();
?>
/images/mobile-icon.png" />&nbsp;&nbsp;&nbsp;&nbsp;
                                    <?php 
if ('' != infoway_get_option('infoway_topright')) {
    ?>
                                        <span class="calldetails"> <?php 
    echo stripslashes(infoway_get_option('infoway_topright'));
    ?>
 </span> <br/>
                                        <a class="btn" href="tel:<?php 
    echo stripslashes(infoway_get_option('infoway_contact_number'));
    ?>
"><span><?php 
    _e('Tap To Call', 'infoway');
    ?>
</span></a>
                                    <?php 
} else {
    ?>
                                        <span class="calldetails"><?php 
    _e('Call 24 Hours: 1.888.222.5847', 'infoway');
    ?>
</span>
                                    <?php 
}
?>
Esempio n. 6
0
                                        <?php 
echo get_bloginfo('title');
?>
                                        -
                                        <?php 
echo get_bloginfo('description');
?>
                                    </span>
                                </p>
                            </div>
                            <div class="grid_12 omega">
                                <?php 
if (infoway_get_option('infoway_footertext') != '') {
    ?>
                                    <p class="copyright"><?php 
    echo infoway_get_option('infoway_footertext');
    ?>
 </p>
                                    <?php 
} else {
    $inktheme_url = 'http://www.inkthemes.com';
    ?>
                                    <p class="copyright"><a href="<?php 
    echo $inktheme_url;
    ?>
"> <?php 
    _e('Infoway Theme', 'infoway');
    ?>
</a><?php 
    _e(' powered by <a href="http://www.wordpress.org">WordPress</a>', 'infoway');
    ?>
        <?php 
} else {
    ?>
            <h2><?php 
    _e('What Our Clients Say', 'infoway');
    ?>
</h2>
        <?php 
}
?>
  	
        <?php 
if (infoway_get_option('infoway_testimonial_desc') != '') {
    ?>
            <p><?php 
    echo stripslashes(infoway_get_option('infoway_testimonial_desc'));
    ?>
</p>
        <?php 
} else {
    ?>
            <p><?php 
    _e('Infoway was one of the most easiest theme to work with. My Clients loved their websites built using Infoway Theme. I highly recommend it to anyone want to build a business site.', 'infoway');
    ?>
</p> 
        <?php 
}
?>
          
    </div>
</div>