Пример #1
0
function inkthemes_option_setup()
{
    //Update EMPTY options
    $of_array = array();
    add_option('inkthemes_options', $of_array);
    $template = cc_get_option('of_template');
    $saved_options = cc_get_option('inkthemes_options');
    $std = '';
    foreach ($template as $option) {
        if ($option['type'] != 'heading') {
            $id = isset($option['id']) ? $option['id'] : null;
            if (isset($option['std'])) {
                $std = $option['std'];
            }
            $db_option = cc_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'];
                        cc_update_option($c_id, $c_std);
                        $of_array[$c_id] = $c_std;
                    }
                } else {
                    cc_update_option($id, $std);
                    $of_array[$id] = $std;
                }
            } else {
                //So just store the old values over again.
                $of_array[$id] = $db_option;
            }
        }
    }
    cc_update_option('inkthemes_options', $of_array);
}
Пример #2
0
function clean_contact($atts)
{
    if (is_archive()) {
        return;
    }
    if (!cc_get_option('clean_contact_nocss')) {
        $html = clean_contact_css();
    } else {
        $html = '';
    }
    $html .= clean_contact_strings();
    $html .= '<a name="clean_contact"></a><script src="' . get_template_directory_uri() . '/lib/clean-contact/fieldset.js" type="text/javascript"></script>';
    $thanks = !empty($atts['thanks']) ? $atts['thanks'] : cc_get_option('clean_contact_thanks');
    $thanks_url = !empty($atts['thanks_url']) ? $atts['thanks_url'] : cc_get_option('clean_contact_thanks_url');
    if (empty($thanks)) {
        $thanks = __('Thank you. Message sent!', 'largo');
    }
    if ($atts['sent']) {
        if ($thanks_url) {
            $html .= "<script>clean_contact_url('{$thanks_url}');</script>" . "\n";
        } else {
            $html .= '<div class="CleanContact_msg ok">' . esc_html($thanks) . '</div>';
        }
    } else {
        if ($atts['fail']) {
            $html .= '<p class="CleanContact_msg err">' . __('Sorry, unable to deliver this message', 'largo') . '</p>';
        } else {
            $html .= '<script type="text/javascript">clean_contact_form();</script>' . "\n";
        }
    }
    $html .= '<noscript><p class="CleanContact_msg err">' . __('Sorry, due to anti-spam measures, this contact form requires that javascript be enabled on your browser.', 'largo') . '</p></noscript>';
    return $html;
}
Пример #3
0
<!--Start Sidebar-->

<div class="sidebar">
    <?php 
if (cc_get_option('cc_lead') == 'on') {
    if (is_single()) {
        if (file_exists(CONTROLPATH . 'cc_leads.php')) {
            require_once CONTROLPATH . 'cc_leads.php';
        }
    }
}
if (is_single()) {
    echo "<div class=\"sidebar_widget\">";
    if (file_exists(LIBRARYPATH . 'map/single_map.php')) {
        include_once LIBRARYPATH . "map/single_map.php";
    }
    echo "</div>";
}
echo '<div class="clear"></div>';
// ad widget area
if (is_active_sidebar('add-widget-area')) {
    dynamic_sidebar('add-widget-area');
}
?>

</div>

<!--End Sidebar-->
Пример #4
0
submit_button();
?>

		<p><?php 
_e('Invoke the Clean Contact e-mail form on and page or post with the shortcode', 'largo');
?>
:</a> <code><strong>[clean-contact]</strong></code></p>

		<p><?php 
_e('You can override all or any of the settings above in the shortcode', 'largo');
?>
</p>

		<code style="font-size: 1.1em"><strong>[clean-contact</strong> <strong>email="</strong><?php 
echo cc_get_option('clean_contact_email');
?>
<strong>"</strong> <strong>prefix="</strong><?php 
echo cc_get_option('clean_contact_prefix');
?>
<strong>"</strong> <strong>bcc=""</strong> <strong>subject=</strong>"<?php 
echo __('Greetings');
?>
" <strong>thanks_url=</strong>"<?php 
echo cc_get_option('clean_contact_thanks_url');
?>
<strong>"]</strong></code>

	</form>

</div>
Пример #5
0
function cc_bodybg()
{
    if (cc_get_option('cc_bodybg') != '') {
        ?>
        <style type="text/css">
            body{
                background-image: url('<?php 
        echo cc_get_option('cc_bodybg');
        ?>
');
            }
        </style>
        <?php 
    }
}
Пример #6
0
<!--End Cotent Wrapper-->
<footer class="footer">
<div class="search-grp search-grp_footer">
        <div class="container">
            <a href="#0" class="logo logo_footer"><img src="<?php 
if (cc_get_option('cc_logo') != '') {
    echo cc_get_option('cc_logo');
} else {
    echo get_template_directory_uri();
    ?>
/images/logo.png<?php 
}
?>
" alt="<?php 
bloginfo('name');
?>
" class="img-responsive" /></a>
            <form action="#" class="form_srch-footer">
                <div class="input-wrp ">
                    <span class="search-ico-input search-ico-input_footer"></span>
                    <input type="text" class="input input_srch-footer" placeholder="13 467 смаколиків">
                </div>
                <div class="input-wrp input-wrp_btn">
                    <a href="#0" class="btn btn_yelow btn_srch btn_xs">Знайти солоденьке</a>
                </div>
            </form>
        </div>
    </div>
    <div class="container">
        <div class="submenu__grid_row">
        <?php 
Пример #7
0
function inkthemes_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 = cc_get_option($id);
    if ($mod != 'min') {
        $val = $std;
        if (cc_get_option($id) != "") {
            $val = cc_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;
}