Ejemplo n.º 1
0
function vc_theme_vc_row($atts, $content = null)
{
    extract(shortcode_atts(array('el_class' => '', 'bg_image' => '', 'bg_color' => '', 'bg_image_repeat' => '', 'font_color' => '', 'padding' => '', 'margin_bottom' => '', 'container' => '', 'css' => ''), $atts));
    $atts['base'] = '';
    wp_enqueue_style('js_composer_front');
    wp_enqueue_script('wpb_composer_front_js');
    wp_enqueue_style('js_composer_custom_css');
    $vc_row = new WPBakeryShortCode_VC_Row($atts);
    $el_class = $vc_row->getExtraClass($el_class);
    $output = '';
    $css_class = $el_class;
    if ($css) {
        $css_class .= vc_shortcode_custom_css_class($css, ' ') . ' ';
    }
    $style = $vc_row->buildStyle($bg_image, $bg_color, $bg_image_repeat, $font_color, $padding, $margin_bottom);
    $boxed = sh_set(_WSH()->option(), 'boxed_layout');
    if ($container && !$boxed) {
        return '<section class="' . $css_class . '" ' . $style . ' >
		<div class="container">
			<div class="general-row">
				' . wpb_js_remove_wpautop($content) . '
			</div>
		</div>
	</section>
	<div class="clearfix"></div>' . "\n";
    }
    return '<section class="' . $css_class . ' general-row" ' . $style . ' >
		' . wpb_js_remove_wpautop($content) . '
	</section>
	<div class="clearfix"></div>' . "\n";
}
Ejemplo n.º 2
0
function sh_widget_init()
{
    global $wp_registered_sidebars;
    $theme_options = _WSH()->option();
    //if( class_exists( 'SH_About_Us' ) )register_widget( 'SH_About_Us' );
    if (class_exists('SH_Contact_Info')) {
        register_widget('SH_Contact_Info');
    }
    if (class_exists('SH_Contact_Form')) {
        register_widget('SH_Contact_Form');
    }
    register_sidebar(array('name' => esc_html__('Default Sidebar', SH_NAME), 'id' => 'default-sidebar', 'description' => esc_html__('Widgets in this area will be shown on the right-hand side.', SH_NAME), 'class' => '', 'before_widget' => '<div id="%1$s" class="widget clearfix %2$s">', 'after_widget' => '</div>', 'before_title' => '<div class="widget-title clearfix"><h3>', 'after_title' => '</h3></div>'));
    register_sidebar(array('name' => esc_html__('Footer Sidebar', SH_NAME), 'id' => 'footer-sidebar', 'description' => esc_html__('Widgets in this area will be shown on the footer.', SH_NAME), 'class' => '', 'before_widget' => '<div id="%1$s" class="clearfix %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>'));
    if (!is_object(_WSH())) {
        return;
    }
    $sidebars = sh_set(sh_set($theme_options, 'dynamic_sidebar'), 'dynamic_sidebar');
    foreach (array_filter((array) $sidebars) as $sidebar) {
        if (sh_set($sidebar, 'topcopy')) {
            continue;
        }
        $name = sh_set($sidebar, 'sidebar_name');
        if (!$name) {
            continue;
        }
        $slug = sh_slug($name);
        register_sidebar(array('name' => $name, 'id' => $slug, 'before_widget' => '<div class="widget">', 'after_widget' => "</div>", 'before_title' => '<div class="widget-title"><h3><span class="divider"></span>', 'after_title' => '</h3></div>'));
    }
    update_option('wp_registered_sidebars', $wp_registered_sidebars);
}
Ejemplo n.º 3
0
 function launch()
 {
     $theme_options = _WSH()->option();
     $theme_options_url = admin_url('themes.php?page=' . SH_NAME . '_option');
     $this->purchase_code = sh_set($theme_options, 'sh_purchase_code');
     $this->purchase_user = sh_set($theme_options, 'sh_purchase_user');
     if (function_exists('wp_get_theme')) {
         $this->theme_data = wp_get_theme(get_option('template'));
         $this->theme_version = $this->theme_data->Version;
     } else {
         $this->theme_data = get_theme_data(get_template_directory() . '/style.css');
         $this->theme_version = $this->theme_data['Version'];
     }
     $this->theme_base = get_option('template');
     if (!$this->purchase_code && !$this->purchase_user) {
         $this->errors[] = sprintf(__('<strong>%s Theme Notice:</strong> Please enter a valid <a href="%s">purchase code and themeforest username</a> to get automatic theme update', SH_NAME), $this->theme_data['Name'], $theme_options_url);
     }
     add_action('admin_notices', array($this, '_admin_notice'));
     if ($this->errors) {
         return;
     }
     /**************************************************/
     //Uncomment below to find the theme slug that will need to be setup on the api server
     //var_dump($theme_base);
     add_filter('pre_set_site_transient_update_themes', array($this, 'check_for_update'));
     // Take over the Theme info screen on WP multisite
     add_filter('themes_api', array($this, 'my_theme_api_call'), 10, 3);
     if (is_admin()) {
         $this->current = get_transient('update_themes');
     }
 }
Ejemplo n.º 4
0
    function wp_footer()
    {
        $analytics = sh_set(_WSH()->option(), 'footer_analytics');
        if ($analytics) {
            ?>
			<script type="text/javascript">
                <?php 
            echo $analytics;
            ?>
            </script>
        <?php 
        }
    }
Ejemplo n.º 5
0
 function __construct()
 {
     // Hook into the 'init' action
     add_action('init', array($this, 'taxonomies'), 0);
     $theme_option = _WSH()->option();
     $this->team_cat_slug = sh_set($theme_option, 'team_category_permalink', 'team_category');
     $this->projects_cat_slug = sh_set($theme_option, 'projects_category_permalink', 'projects_category');
     $this->causes_cat_slug = sh_set($theme_option, 'causes_category_permalink', 'causes_category');
     $this->events_cat_slug = sh_set($theme_option, 'events_category_permalink', 'events_category');
     $this->gallery_cat_slug = sh_set($theme_option, 'gallery_category_permalink', 'gallery_category');
     $this->testimonials_cat_slug = sh_set($theme_option, 'testimonials_category_permalink', 'testimonials_category');
     $this->donars_cat_slug = sh_set($theme_option, 'donars_category_permalink', 'donars_category');
 }
Ejemplo n.º 6
0
 function __construct()
 {
     // Hook into the 'init' action
     //add_action( 'init', array($this, 'taxonomies'), 0 );
     $theme_option = _WSH()->option();
     $this->team_cat_slug = sh_set($theme_option, 'team_category_permalink', 'team_category');
     $this->services_cat_slug = sh_set($theme_option, 'services_category_permalink', 'services_category');
     $this->projects_cat_slug = sh_set($theme_option, 'projects_category_permalink', 'projects_category');
     $this->gallery_cat_slug = sh_set($theme_option, 'gallery_category_permalink', 'gallery_category');
     $this->testimonials_cat_slug = sh_set($theme_option, 'testimonial_category_permalink', 'testimonials_category');
     $this->faq_cat_slug = sh_set($theme_option, 'faq_category_permalink', 'faq_category');
     $this->taxonomies();
 }
Ejemplo n.º 7
0
    function wp_footer()
    {
        $theme_options = _WSH()->option();
        if (sh_set($theme_options, 'footer_analytics')) {
            ?>
			<script type="text/javascript">
                <?php 
            echo sh_set($theme_options, 'footer_analytics');
            ?>
            </script>
        <?php 
        }
    }
Ejemplo n.º 8
0
 function shortcode_output($atts, $contents = null, $base, $current = array())
 {
     if (!$current) {
         return;
     }
     $current = sh_set($this->keys, $base);
     extract(shortcode_atts($this->create_atts($current), $atts));
     $file = 'includes/modules/shortcodes/' . str_replace('sh_', '', $base) . '.php';
     $output = (include _WSH()->includes($file));
     return $output;
     //if( file_exists( $this->_s_dir.$file ) ) include( $this->_s_dir.$file );
     //else include( $this->_dir.$file );
 }
Ejemplo n.º 9
0
 function __construct()
 {
     require_once get_template_directory() . '/includes/helpers/libpaypal.php';
     $this->_settings = get_option(SH_NAME);
     $theme_options = _WSH()->option();
     //Create the authentication
     $pp_type = sh_set($theme_options, 'paypal_type') == 'sandbox' ? true : false;
     $auth = new PaypalAuthenticaton(sh_set($theme_options, 'paypal_username'), sh_set($theme_options, 'paypal_api_username'), sh_set($theme_options, 'paypal_api_password'), sh_set($theme_options, 'paypal_api_signature'), $pp_type);
     //Create the paypal object
     $this->_paypal = new Paypal($auth);
     $this->_paypal_settings = new PaypalSettings();
     $this->_paypal_settings->allowMerchantNote = true;
     $this->_paypal_settings->logNotifications = true;
     //the base url
     $this->return_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
 }
Ejemplo n.º 10
0
 function sh_theme_color_scheme($color = '')
 {
     $dir = SH_TH_ROOT;
     include_once $dir . '/includes/thirdparty/lessc.inc.php';
     if (!$color) {
         $color = _WSH()->option('custom_color_scheme');
     }
     if (!$color) {
         return;
     }
     $less = new lessc();
     $less->setVariables(array("color" => $color));
     // create a new cache object, and compile
     $cache = $less->cachedCompile(_WSH()->includes("/css/color.less"));
     return $cache['compiled'];
     file_put_contents(_WSH()->includes('/css/colors.css'), $cache["compiled"]);
 }
Ejemplo n.º 11
0
 function tweets()
 {
     if (!class_exists('Codebird')) {
         include_once 'codebird.php';
     }
     $cb = new Codebird();
     $method = sh_set($_GET, 'method');
     $theme_options = _WSH()->option();
     //printr($theme_options);
     $api = sh_set($theme_options, 'twitter_api');
     $api_secret = sh_set($theme_options, 'twitter_api_secret');
     $token = sh_set($theme_options, 'twitter_token');
     $token_secret = sh_set($theme_options, 'twitter_token_secret');
     if (!$api && $api_secret) {
         _e('Please provide tiwtter api information to fetch feed', SH_NAME);
         exit;
     }
     $cb->setConsumerKey($api, $api_secret);
     $cb->setToken($token, $token_secret);
     $resp = array();
     $reply = (array) $cb->statuses_userTimeline(array('count' => sh_set($_GET, 'number'), 'screen_name' => sh_set($_GET, 'screen_name')));
     if (isset($reply['httpstatus'])) {
         unset($reply['httpstatus']);
     }
     foreach ($reply as $k => $v) {
         //if( $k == 'httpstatus' ) continue;
         $time = human_time_diff(strtotime(sh_set($v, 'created_at')), current_time('timestamp')) . __(' ago', SH_NAME);
         $text = preg_replace('@(https?://([-\\w\\.]+[-\\w])+(:\\d+)?(/([\\w/_\\.#-]*(\\?\\S+)?[^\\.\\s])?)?)@', '<a href="$1" target="_blank">$1</a>', sh_set($v, 'text'));
         if (sh_set($_POST, 'template') === 'lead') {
             echo '<i class="fa fa-twitter"></i>' . $text . ' <a href="#"> ' . $time . '</a>';
         } else {
             $res[$k]['date'] = $time;
             //array('date'=>$time, 'tweet'=>$text);
             $res[$k]['tweet'] = $text;
             //echo
             //'<li><span></span><p>'.$text.' <a href="#">'.__(' about ', SH_NAME).$time.'</a></p></li>';
         }
     }
     //printr($res);
     echo json_encode($res);
 }
Ejemplo n.º 12
0
    function post()
    {
        _load_class('validation', 'helpers', true);
        $t = _WSH();
        $settings = $t->option();
        $message = '';
        foreach ($this->fields as $f) {
            $field_name = sh_set($f, 'name');
            $validation = array();
            $placehold = sh_set($f, 'placeholder');
            foreach (sh_set($f, 'validation') as $valid) {
                $validation[] = $valid;
            }
            /** set validation rules for contact form */
            $t->validation->set_rules($field_name, '<strong>' . sh_set($f, 'placeholder') . '</strong>', implode('|', $validation));
            $message .= "{$placehold}\t" . $t->validation->post($field_name) . "\r\n";
        }
        if (sh_set($_POST, 'form_secret') !== $this->_old_hash) {
            $t->validation->_error_array['form_secret'] = __('There is form validation error or spamming issue', SH_NAME);
        }
        if ($t->validation->run() !== FALSE && empty($t->validation->_error_array)) {
            $contact_to = sh_set($this->meta, 'form_email') ? sh_set($this->meta, 'form_email') : get_option('admin_email');
            $headers = 'From: ' . get_option('name') . ' <' . get_option('admin_email') . '>' . "\r\n";
            wp_mail($contact_to, sprintf(__('%s - Form Submitted', SH_NAME), get_the_title($this->id)), $message, $headers);
            $response = sh_set($this->meta, 'form_success_msg') ? $this->meta['form_success_msg'] : sprintf(__('Form is successfully submitted, we\'ll response you shortly.', SH_NAME), $name);
            return "<div id='success_page' class=\"alert-success\">" . "<h1>" . __("Successful", SH_NAME) . "</h1>" . "<p>" . $response . "</p>" . "</div>";
        } else {
            $messages = '';
            if (is_array($t->validation->_error_array)) {
                foreach ($t->validation->_error_array as $msg) {
                    $messages .= '<div class="alert error_message alert-error">
										<p>' . __('Error! ', SH_NAME) . $msg . '</p>
									</div>';
                }
            }
            return $messages;
        }
        return '';
    }
Ejemplo n.º 13
0
function sh_get_font_settings($FontSettings = array(), $StyleBefore = '', $StyleAfter = '')
{
    $i = 1;
    $settings = _WSH()->option();
    $Style = '';
    foreach ($FontSettings as $k => $v) {
        if ($i == 1 || $i == 5) {
            $Style .= sh_set($settings, $k) ? $v . ':' . sh_set($settings, $k) . 'px;' : '';
        } else {
            $Style .= sh_set($settings, $k) ? $v . ':' . sh_set($settings, $k) . ';' : '';
        }
        $i++;
    }
    return !empty($Style) ? $StyleBefore . $Style . $StyleAfter : '';
}
Ejemplo n.º 14
0
<?php

$options = array();
$options[] = array('id' => '_sh_tax_seo_settings', 'types' => array('category', 'post_tag'), 'title' => __('SEO Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'toggle', 'name' => 'seo_status', 'label' => __('Enable SEO', SH_NAME)), array('type' => 'textbox', 'name' => 'title', 'label' => __('Meta Title', SH_NAME)), array('type' => 'textarea', 'name' => 'description', 'label' => __('Meta Description', SH_NAME), 'default' => ''), array('type' => 'textarea', 'name' => 'keywords', 'label' => __('Meta Keywords', SH_NAME), 'default' => '')));
$options[] = array('id' => _WSH()->set_term_key('category'), 'types' => array('category', 'post_tag'), 'title' => __('Post Category Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'textbox', 'name' => 'header_title', 'label' => __('Header Title', SH_NAME)), array('type' => 'upload', 'name' => 'header_img', 'label' => __('Header image', SH_NAME)), array('type' => 'radioimage', 'name' => 'view', 'label' => __('Page View', SH_NAME), 'items' => array(array('value' => 'grid', 'label' => __('Grid View', SH_NAME), 'img' => get_template_directory_uri() . '/includes/vafpress/public/img/grid-alt.png'), array('value' => 'list', 'label' => __('List View', SH_NAME), 'img' => get_template_directory_uri() . '/includes/vafpress/public/img/list3.png'))), array('type' => 'radioimage', 'name' => 'layout', 'label' => __('Page Layout', SH_NAME), 'items' => array(array('value' => 'left', 'label' => __('Left Sidebar', SH_NAME), 'img' => get_template_directory_uri() . '/includes/vafpress/public/img/2cl.png'), array('value' => 'right', 'label' => __('Right Sidebar', SH_NAME), 'img' => get_template_directory_uri() . '/includes/vafpress/public/img/2cr.png'), array('value' => 'full', 'label' => __('Full Width', SH_NAME), 'img' => get_template_directory_uri() . '/includes/vafpress/public/img/1col.png'))), array('type' => 'select', 'name' => 'sidebar', 'label' => __('Sidebar', SH_NAME), 'default' => '', 'items' => sh_get_sidebars(true))));
$options[] = array('id' => _WSH()->set_term_key('category'), 'types' => array('product_cat', 'product_tag'), 'title' => __('Post Category Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'textbox', 'name' => 'header_title', 'label' => __('Header Title', SH_NAME)), array('type' => 'upload', 'name' => 'header_img', 'label' => __('Header image', SH_NAME)), array('type' => 'radioimage', 'name' => 'layout', 'label' => __('Page Layout', SH_NAME), 'items' => array(array('value' => 'left', 'label' => __('Left Sidebar', SH_NAME), 'img' => get_template_directory_uri() . '/includes/vafpress/public/img/2cl.png'), array('value' => 'right', 'label' => __('Right Sidebar', SH_NAME), 'img' => get_template_directory_uri() . '/includes/vafpress/public/img/2cr.png'), array('value' => 'full', 'label' => __('Full Width', SH_NAME), 'img' => get_template_directory_uri() . '/includes/vafpress/public/img/1col.png'))), array('type' => 'select', 'name' => 'sidebar', 'label' => __('Sidebar', SH_NAME), 'default' => '', 'items' => sh_get_sidebars(true))));
return $options;
/**
 * EOF
 */
Ejemplo n.º 15
0
 function body_id()
 {
     $options = _WSH()->option();
     $boxed = sh_set($options, 'boxed_layout');
     $boxed_layout = $boxed && !$nobg ? ' id="boxed" ' : '';
     echo $boxed_layout;
 }
Ejemplo n.º 16
0
} else {
    if (is_search()) {
        $bg = sh_set($options, 'search_page_header_img');
        $title = sh_set($options, 'search_page_title') ? sh_set($options, 'search_page_title') : get_search_query();
        $text = sh_set($options, 'search_page_header_text');
    } else {
        if (is_author()) {
            $bg = sh_set($options, 'author_page_header_img');
            $title = sh_set($options, 'author_page_title') ? sh_set($options, 'author_page_title') : get_queried_object()->data->dispaly_name;
            $text = sh_set($options, 'author_page_header_text');
        } else {
            if (is_archive('product')) {
                if (class_exists('woocommerce') && is_shop()) {
                    $post_id = get_option('woocommerce_shop_page_id');
                }
                $meta = _WSH()->get_meta('_sh_header_settings', $post_id);
                $bg = sh_set($meta, 'bg_image');
                $title = sh_set($meta, 'header_title') ? sh_set($meta, 'header_title') : get_the_title();
                $text = sh_set($meta, 'header_text') ? sh_set($meta, 'header_text') : 'A minimal make-up theme';
            } else {
                if (is_archive()) {
                    $bg = sh_set($options, 'archive_page_header_img');
                    $title = sh_set($options, 'archive_page_title') ? sh_set($options, 'archive_page_title') : get_queried_object()->data->dispaly_name;
                    $text = sh_set($options, 'archive_page_header_text');
                }
            }
        }
    }
}
?>
Ejemplo n.º 17
0
function _sh_plugin_init()
{
    global $pagenow;
    include_once 'library/functions.php';
    _load_plugins_class('post_types', 'helpers', false);
    _load_plugins_class('taxonomies', 'helpers', false);
    _load_plugins_class('ajax', 'helpers', false);
    _load_plugins_class('forms', 'helpers', false);
    //_load_class( 'validation', 'helpers', true );
    //_load_plugins_class( 'seo', 'helpers', false );
    _load_plugins_class('update_theme', 'update', false);
    _load_plugins_class('shortcodes', 'helpers', true);
    //_load_plugins_class( 'mega_menu', 'helpers', false );
    /**
     * Include Custom Data Sources
     */
    require_once 'vafpress/admin/data_sources.php';
    /**
     * Load options, metaboxes, and shortcode generator array templates.
     */
    // metaboxes
    $tmpl_mb1 = (include SH_TH_ROOT . 'includes/vafpress/admin/metabox/meta_boxes.php');
    // * Create instances of Metaboxes
    foreach ($tmpl_mb1 as $tmb) {
        new VP_Metabox($tmb);
    }
    $tmpl_mb1 = (include SH_TH_ROOT . 'includes/vafpress/admin/taxonomy/taxonomy.php');
    include_once 'vp_new/taxonomy.php';
    foreach ($tmpl_mb1 as $tmb) {
        new SH_Metabox($tmb);
    }
    if (is_admin()) {
        include_once 'helpers/backup_class.php';
        $backup = new SH_Backup_class();
        if (sh_set($_GET, 'page') == SH_NAME . '_option') {
            if (sh_set($_GET, 'sh_dummydata_export')) {
                $backup->export();
            }
            /*if( sh_set( $_GET, 'sh_dummydata_import' ) ){ 
            			include_once( 'helpers/backup_class.php' );
            			$backup = new SH_Backup_class;
            			$backup->import();
            		}*/
        }
    }
    if (function_exists('vc_map')) {
        include_once 'vc_map.php';
    }
    // options
    $tmpl_opt = SH_TH_ROOT . 'includes/vafpress/admin/option/option.php';
    /**
     * Create instance of Options
     */
    $theme_options = new VP_Option(array('is_dev_mode' => false, 'option_key' => SH_NAME . '_theme_options', 'page_slug' => SH_NAME . '_option', 'template' => $tmpl_opt, 'menu_page' => 'themes.php', 'use_auto_group_naming' => true, 'use_util_menu' => true, 'minimum_role' => 'edit_theme_options', 'layout' => 'fluid', 'page_title' => __('Theme Options', SH_NAME), 'menu_label' => __('Theme Options', SH_NAME)));
    _WSH()->user_extra(array('designation' => __('Designation', SH_NAME), 'facebook' => __('Facebook', SH_NAME), 'twitter' => __('Twitter', SH_NAME), 'dribbble' => __('Dribble', SH_NAME), 'github' => __('Github', SH_NAME), 'flickr' => __('Flickr', SH_NAME), 'google-plus' => __('Google+', SH_NAME), 'youtube' => __('Youtube', SH_NAME)));
    $sh_exlude_hooks = (include_once 'resource/remove_action.php');
    foreach ($sh_exlude_hooks as $k => $v) {
        foreach ($v as $value) {
            remove_action($k, $value[0], $value[1]);
        }
    }
    // shortocode generators
    $tmpl_sg1 = SH_TH_ROOT . 'includes/vafpress/admin/shortcode_generator/shortcodes1.php';
    $tmpl_sg = array('name' => 'sg_1', 'template' => $tmpl_sg1, 'modal_title' => __('Bloxo Shortcodes', SH_NAME), 'button_title' => __('Bloxo', SH_NAME), 'types' => array('page'), 'main_image' => SH_TH_URL . '/includes/vafpress/public/img/vp_shortcode_icon.png', 'sprite_image' => SH_TH_URL . '/includes/vafpress/public/img/vp_shortcode_icon_sprite.png', 'included_pages' => array('appearance_page_vpt_option'));
    //$sg = new VP_ShortcodeGenerator($tmpl_sg);
}
Ejemplo n.º 18
0
 function google_font_url()
 {
     $options = _WSH()->option();
     $fonts_url = '';
     /* Translators: If there are characters in your language that are not
      * supported by Open Sans, translate this to 'off'. Do not translate
      * into your own language.
      */
     $fonts_array = array('h1_font_family', 'h2_font_family', 'h3_font_family', 'h4_font_family', 'h5_font_family', 'h6_font_family');
     $font_families = array();
     if (sh_set($options, 'use_custom_font')) {
         foreach ($fonts_array as $f_array) {
             $family = sh_set($options, $f_array);
             if ($family && $family !== 'Open Sans') {
                 $font_families[$family] = $family . ':400,700,400italic,800,600';
             }
         }
     }
     if (sh_set($options, 'body_custom_font') && sh_set($options, 'body_font_family')) {
         $family = sh_set($options, 'body_font_family');
         $font_families[$family] = $family . ':400,700,400italic,800,600';
     }
     //printr($font_families);
     $query_args = array('family' => urlencode(implode('|', $font_families)), 'subset' => urlencode('latin,latin-ext'));
     $fonts_url = add_query_arg($query_args, 'https://fonts.googleapis.com/css');
     return esc_url_raw($fonts_url);
 }
Ejemplo n.º 19
0
 function logo()
 {
     include _WSH()->includes('includes/modules/_sh_logo.php');
 }
Ejemplo n.º 20
0
);*/
/** SEO fields for custom posts and pages */
/* Page options */
$options[] = array('id' => _WSH()->set_meta_key('page'), 'types' => array('page'), 'title' => __('Page Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'toggle', 'name' => 'is_onepage', 'label' => __('Either one page or not', SH_NAME), 'default' => '', 'description' => __('Enable or disable one page option, you must choose one page templat as well', SH_NAME)), array('type' => 'sorter', 'name' => 'single_pages', 'max_selection' => 10, 'label' => __('Choose Pages', SH_NAME), 'description' => __('Choose pages to show on Single page', SH_NAME), 'items' => array('data' => array(array('source' => 'function', 'value' => 'vp_get_pages'))), 'dependency' => array('field' => 'is_onepage', 'function' => 'vp_dep_boolean'))));
$options[] = array('id' => '_sh_layout_settings', 'types' => array('post', 'page', 'product'), 'title' => __('Layout Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'radioimage', 'name' => 'layout', 'label' => __('Page Layout', SH_NAME), 'description' => __('Choose the layout for blog pages', SH_NAME), 'items' => array(array('value' => 'left', 'label' => __('Left Sidebar', SH_NAME), 'img' => SH_TH_URL . '/includes/vafpress/public/img/2cl.png'), array('value' => 'right', 'label' => __('Right Sidebar', SH_NAME), 'img' => SH_TH_URL . '/includes/vafpress/public/img/2cr.png'), array('value' => 'full', 'label' => __('Full Width', SH_NAME), 'img' => SH_TH_URL . '/includes/vafpress/public/img/1col.png'))), array('type' => 'select', 'name' => 'sidebar', 'label' => __('Sidebar', SH_NAME), 'default' => '', 'items' => sh_get_sidebars(true))));
$options[] = array('id' => '_sh_header_settings', 'types' => array('post', 'page', 'product', 'sh_portfolio', 'sh_team'), 'title' => __('Header Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'upload', 'name' => 'bg_image', 'label' => __('Header Background Image', SH_NAME), 'description' => __('Choose the header background image', SH_NAME))));
$options[] = array('id' => _WSH()->set_meta_key('post'), 'types' => array('post'), 'title' => __('Post Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'toggle', 'name' => 'top_posts', 'label' => __('Show/Hide top posts', SH_NAME), 'description' => __('Enable / disable seo Top post', SH_NAME)), array('type' => 'group', 'repeating' => true, 'length' => 1, 'name' => 'sh_gallery_imgs', 'title' => __('Gallery images', SH_NAME), 'fields' => array(array('type' => 'upload', 'name' => 'gallery_image', 'label' => __('Gallery Image', SH_NAME), 'description' => __('Choose the Gallery images', SH_NAME)))), array('type' => 'textarea', 'name' => 'video', 'label' => __('Video Embed Code', SH_NAME), 'default' => '', 'description' => __('If post format is video then this embed code will be used in content', SH_NAME)), array('type' => 'textarea', 'name' => 'audio', 'label' => __('Audio Embed Code', SH_NAME), 'default' => '', 'description' => __('If post format is AUDIO then this embed code will be used in content', SH_NAME)), array('type' => 'textarea', 'name' => 'quote', 'label' => __('Quote', SH_NAME), 'default' => '', 'description' => __('If post format is quote then the content in this textarea will be displayed', SH_NAME))));
/** Team Options*/
$options[] = array('id' => _WSH()->set_meta_key('sh_team'), 'types' => array('sh_team'), 'title' => __('Team Options', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'textbox', 'name' => 'designation', 'label' => __('Designation', SH_NAME), 'default' => ''), array('type' => 'textbox', 'name' => 'link', 'label' => __('Profile Link', SH_NAME), 'default' => ''), array('type' => 'group', 'repeating' => true, 'length' => 1, 'name' => 'sh_team_social', 'title' => __('Social Profile', SH_NAME), 'fields' => array(array('type' => 'fontawesome', 'name' => 'social_icon', 'label' => __('Social Icon', SH_NAME), 'default' => ''), array('type' => 'textbox', 'name' => 'social_link', 'label' => __('Link', SH_NAME), 'default' => '')))));
/** Testimonial Options*/
$options[] = array('id' => _WSH()->set_meta_key('sh_testimonials'), 'types' => array('sh_testimonials'), 'title' => __('Testimonials Options', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'textbox', 'name' => 'company', 'label' => __('Company', SH_NAME), 'default' => 'Envato'), array('type' => 'textbox', 'name' => 'link', 'label' => __('View More Link', SH_NAME), 'default' => ''), array('type' => 'textbox', 'name' => 'designation', 'label' => __('Designation', SH_NAME), 'default' => '')));
/** Projects Options*/
$options[] = array('id' => _WSH()->set_meta_key('sh_portfolio'), 'types' => array('sh_portfolio'), 'title' => __('Projects Options', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'textbox', 'name' => 'project_detail_title', 'label' => __('Project Detail Section Title', SH_NAME), 'default' => '', 'description' => __('Project Details', SH_NAME)), array('type' => 'textbox', 'name' => 'customer', 'label' => __('Customer', SH_NAME), 'default' => '', 'description' => __('Enter the name of the client', SH_NAME)), array('type' => 'textbox', 'name' => 'demo_link', 'label' => __('Demo URL', SH_NAME), 'default' => 'http://example.com', 'description' => __('Enter the demo url', SH_NAME)), array('type' => 'textbox', 'name' => 'skills', 'label' => __('Skills', SH_NAME), 'default' => '', 'description' => __('Enter comma separated skills', SH_NAME)), array('type' => 'date', 'name' => 'lanuch_date', 'label' => __('Release Date', SH_NAME), 'default' => '', 'description' => __('Enter project release date', SH_NAME)), array('type' => 'group', 'repeating' => true, 'sortable' => true, 'name' => 'extra_detail', 'title' => __('Extra Portfolio Details', SH_NAME), 'fields' => array(array('type' => 'textbox', 'name' => 'label', 'label' => __('Label', SH_NAME)), array('type' => 'textbox', 'name' => 'value', 'label' => __('Value', SH_NAME)))), array('type' => 'group', 'repeating' => true, 'sortable' => true, 'name' => 'portfolio_images', 'title' => __('Portfolio Images', SH_NAME), 'fields' => array(array('type' => 'upload', 'name' => 'image', 'label' => __('Image', SH_NAME)))), array('type' => 'textarea', 'name' => 'video', 'label' => __('Video Embed Code', SH_NAME), 'default' => '', 'description' => __('If Project Type is video then this embed code will be used in content', SH_NAME)), array('type' => 'textarea', 'name' => 'audio', 'label' => __('Audio Embed Code', SH_NAME), 'default' => '', 'description' => __('If Project Type is AUDIO then this embed code will be used in content', SH_NAME))));
$options[] = array('id' => _WSH()->set_meta_key('sh_gallery'), 'types' => array('sh_gallery'), 'title' => __('Image Gallery Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('name' => 'use_image', 'label' => 'Use Image Gallery', 'type' => 'toggle'), array('type' => 'group', 'repeating' => true, 'sortable' => true, 'name' => 'column', 'title' => __('Images', SH_NAME), 'fields' => array(array('type' => 'textbox', 'name' => 'image_title', 'label' => __('Title', SH_NAME)), array('type' => 'upload', 'label' => __('Image', SH_NAME), 'name' => 'image', 'use_external_plugins' => 1, 'validation' => 'required'), array('type' => 'textarea', 'label' => __('Content', SH_NAME), 'name' => 'content', 'use_external_plugins' => 1, 'disabled_externals_plugins' => 'vp_sc_button', 'disabled_internals_plugins' => '', 'validation' => 'required')))));
$options[] = array('id' => _WSH()->set_meta_key('sh_gallery'), 'types' => array('sh_gallery'), 'title' => __('Video Gallery Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('name' => 'use_video', 'label' => 'Use Videos', 'type' => 'toggle'), array('type' => 'group', 'repeating' => true, 'sortable' => true, 'name' => 'column', 'title' => __('Video', SH_NAME), 'fields' => array(array('type' => 'textbox', 'name' => 'video_title', 'label' => __('Title', SH_NAME)), array('type' => 'textbox', 'label' => __('Video Link', SH_NAME), 'name' => 'link', 'use_external_plugins' => 1, 'validation' => 'required'), array('type' => 'textarea', 'label' => __('Content', SH_NAME), 'name' => 'v_content', 'use_external_plugins' => 1, 'disabled_externals_plugins' => 'vp_sc_button', 'disabled_internals_plugins' => '', 'validation' => 'required')))));
$options[] = array('id' => _WSH()->set_meta_key('sh_services'), 'types' => array('sh_services'), 'title' => __('Services Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'fontawesome', 'name' => 'fontawesome', 'label' => __('Service Icon', SH_NAME), 'default' => ''), array('type' => 'textbox', 'name' => 'single_link', 'label' => __('Read More Link', SH_NAME), 'description' => __('Enter the URL to redirect user for further reading', SH_NAME))));
$options[] = array('id' => 'sh_form_settings', 'types' => array('sh_form'), 'title' => __('Form Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'radiobutton', 'name' => 'form_method', 'label' => __('Form Submit Method', SH_NAME), 'items' => array(array('value' => 'post', 'label' => __('POST', SH_NAME)), array('value' => 'get', 'label' => __('GET', SH_NAME))), 'default' => 'post'), array('type' => 'radiobutton', 'name' => 'form_submit_type', 'label' => __('Form Submit Type', SH_NAME), 'items' => array(array('value' => 'reload', 'label' => __('Page Reload', SH_NAME)), array('value' => 'ajax', 'label' => __('Ajax', SH_NAME)), array('value' => 'external', 'label' => __('External URL', SH_NAME))), 'default' => 'ajax'), array('type' => 'textbox', 'name' => 'form_action', 'label' => __('Form Action URL', SH_NAME), 'default' => home_url(), 'placeholder' => 'http://example.com'), array('type' => 'textbox', 'name' => 'form_email', 'label' => __('Reciever Email', SH_NAME), 'default' => '', 'description' => __('Enter the email address of receiver to send the form submission detail', SH_NAME)), array('type' => 'textarea', 'name' => 'form_success_msg', 'label' => __('Success Message', SH_NAME), 'default' => '', 'description' => __('Enter the message to show after successful submission of the form', SH_NAME)), array('type' => 'textarea', 'name' => 'form_container', 'label' => __('Form Markup', SH_NAME), 'default' => '
		<form id="contactform" action="{{form_action}}" method="{{form_method}}">
			<div class="row">
				{{form_fields}}
			</div>
		</form>', 'description' => __('Wrap the form within custom markup', SH_NAME)), array('type' => 'textarea', 'name' => 'submit_button', 'label' => __('Submit Button Markup', SH_NAME), 'default' => '
	<div class="col-md-12">
		<span></span>
		<button class="btn btn-default pull-right wow fadeIn" type="submit">Send Message</button>
	</div>', 'description' => __('Enter the markup for submit button', SH_NAME))));
$options[] = array('id' => 'sh_forms_option', 'types' => array('sh_form'), 'title' => __('Form Builder', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'group', 'repeating' => true, 'sortable' => true, 'name' => 'field', 'title' => __('Field', SH_NAME), 'fields' => array(array('type' => 'select', 'name' => 'type', 'label' => __('Field Type', SH_NAME), 'items' => array(array('value' => 'text', 'label' => __('Text Input', SH_NAME)), array('value' => 'password', 'label' => __('Password', SH_NAME)), array('value' => 'email', 'label' => __('Email', SH_NAME)), array('value' => 'range', 'label' => __('Range', SH_NAME)), array('value' => 'url', 'label' => __('URL', SH_NAME)), array('value' => 'select', 'label' => __('Dropdown', SH_NAME)), array('value' => 'checkbox', 'label' => __('Checkbox', SH_NAME)), array('value' => 'radio', 'label' => __('Radio Button', SH_NAME)), array('value' => 'textarea', 'label' => __('Textarea', SH_NAME))), 'default' => 'text'), array('type' => 'group', 'repeating' => true, 'sortable' => true, 'name' => 'select_value', 'title' => __('Dropdown Values', SH_NAME), 'dependency' => array('field' => 'type', 'function' => 'sh_dep_pb_dropdown'), 'fields' => array(array('type' => 'textbox', 'name' => 'dropdown_value', 'label' => __('Value', SH_NAME), 'default' => 'option1'), array('type' => 'textbox', 'name' => 'dropdown_label', 'label' => __('Label', SH_NAME), 'default' => 'Value1'))), array('type' => 'group', 'repeating' => true, 'sortable' => true, 'name' => 'chechbox_value', 'title' => __('Checkbox Values', SH_NAME), 'dependency' => array('field' => 'type', 'function' => 'sh_dep_pb_checkbox'), 'fields' => array(array('type' => 'textbox', 'name' => 'check_value', 'label' => __('Value', SH_NAME), 'default' => 'option1'), array('type' => 'textbox', 'name' => 'check_label', 'label' => __('Label', SH_NAME), 'default' => 'Value1'))), array('type' => 'group', 'repeating' => true, 'sortable' => true, 'name' => 'radio_btn_value', 'title' => __('Radio Values', SH_NAME), 'dependency' => array('field' => 'type', 'function' => 'sh_dep_pb_radio'), 'fields' => array(array('type' => 'textbox', 'name' => 'radio_value', 'label' => __('Value', SH_NAME), 'default' => 'option1'), array('type' => 'textbox', 'name' => 'radio_label', 'label' => __('Label', SH_NAME), 'default' => 'Value1'))), array('type' => 'textarea', 'name' => 'field_container', 'label' => __('Field Markup', SH_NAME), 'default' => '
<div class="col-md-4">
	
	<div class="form-group wow fadeInLeft" data-wow-duration="1.5s">
		{{form_field}}
Ejemplo n.º 21
0
<?php

get_header();
$theme_options = _WSH()->option();
?>
<article class="section">
	<div class="container">
	<h1 class="title_error"><?php 
echo sh_set($theme_options, 'page_title');
?>
</h1>
	<h5 class="text_error"><?php 
echo sh_set($theme_options, 'page_text');
?>
</h5>
	<h3 class="tagline_error"><?php 
echo sh_set($theme_options, 'page_tag_line');
?>
</h3>
	
	</div>
</article>

<?php 
get_footer();
Ejemplo n.º 22
0
<?php

get_header();
if ($wp_query->is_posts_page) {
    $meta = _WSH()->get_meta('_sh_layout_settings', get_queried_object()->ID);
    $title = get_the_title(get_queried_object());
    $meta1 = _WSH()->get_meta('_sh_header_settings');
    $bg = sh_set($meta1, 'bg_image');
    $bg = $bg ? $bg : get_template_directory_uri() . '/images/other/parallax.jpg';
} else {
    $settings = _WSH()->option();
    $layout = sh_set($_GET, 'layout') ? sh_set($_GET, 'layout') : sh_set($settings, 'archive_page_layout');
    $layout = $layout ? $layout : 'right';
    $sidebar = sh_set($settings, 'archive_page_sidebar', 'default-sidebar');
    $bg = sh_set($settings, 'archive_page_header_img');
    $bg = $bg ? $bg : get_template_directory_uri() . '/images/other/parallax.jpg';
    $title = sh_set($settings, 'archive_page_title', 'Blog');
}
?>

<?php 
_sh_show_menu_by_position('above');
?>

<div class="page-header parallax" style="background-image: url(<?php 
echo esc_url($bg);
?>
);"></div>

<?php 
_sh_show_menu_by_position('below');
Ejemplo n.º 23
0
<?php 
$options = _WSH()->option();
//printr($options);
get_header();
global $wp_query;
$qo = get_queried_object();
$sizes = array(1 => '1142x470', 2 => '1142x470', 3 => '360x200', 4 => '264x150');
if ($qo) {
    $template_file = get_post_meta($qo->ID, 'page_meta', true);
    $col_num = sh_set($template_file, 'column_number', 1);
    $image = sh_set($template_file, 'image', get_template_directory_uri() . '/images/resource/banner-1.jpg');
    $is_home = sh_set($template_file, 'is_home', true);
    $sidebar = sh_set($template_file, 'sidebar');
} else {
    $col_num = sh_set($options, 'archive_column_number', 1);
    $image = sh_set($options, 'archive_bg_image');
    $image = $image ? $image : get_template_directory_uri() . '/images/resource/banner-1.jpg';
    $is_home = true;
    $sidebar = sh_set($options, 'archive_page_sidebar', 'default-sidebar');
}
$size = sh_set($sizes, $col_num);
if ($image) {
    ?>
<article class="banner" style="background-image:url(<?php 
    echo $image;
    ?>
);">
	<div class="container">
		<h1><?php 
    echo wp_title('');
Ejemplo n.º 24
0
function _sh_show_menu_by_position($position = 'below')
{
    $options = _WSH()->option('menu_poosition');
    if ($position == 'above' && $options == 'above') {
        get_template_part('includes/modules/nav');
    }
    if ($position == 'below' && $options == 'below') {
        get_template_part('includes/modules/nav');
    }
}
Ejemplo n.º 25
0
function sh_theme_init()
{
    global $pagenow;
    return;
    /**
     * Include Custom Data Sources
     */
    require_once 'vafpress/admin/data_sources.php';
    /**
     * Load options, metaboxes, and shortcode generator array templates.
     */
    // metaboxes
    $tmpl_mb1 = (include SH_ROOT . 'includes/vafpress/admin/metabox/meta_boxes.php');
    // * Create instances of Metaboxes
    foreach ($tmpl_mb1 as $tmb) {
        new VP_Metabox($tmb);
    }
    $tmpl_mb1 = (include SH_ROOT . 'includes/vafpress/admin/taxonomy/taxonomy.php');
    include_once 'vp_new/taxonomy.php';
    foreach ($tmpl_mb1 as $tmb) {
        new SH_Metabox($tmb);
    }
    // shortocode generators
    $tmpl_sg1 = SH_ROOT . 'includes/vafpress/admin/shortcode_generator/shortcodes1.php';
    $tmpl_sg2 = SH_ROOT . 'includes/vafpress/admin/shortcode_generator/shortcodes2.php';
    if (is_admin()) {
        include_once 'helpers/backup_class.php';
        $backup = new SH_Backup_class();
        if (sh_set($_GET, 'page') == SH_NAME . '_option') {
            if (sh_set($_GET, 'sh_dummydata_export')) {
                $backup->export();
            }
        }
    }
    if (function_exists('vc_map')) {
        include_once 'vc_map.php';
    }
    // options
    $tmpl_opt = SH_ROOT . 'includes/vafpress/admin/option/option.php';
    /**
     * Create instance of Options
     */
    $theme_options = new VP_Option(array('is_dev_mode' => false, 'option_key' => SH_NAME . '_theme_options', 'page_slug' => SH_NAME . '_option', 'template' => $tmpl_opt, 'menu_page' => 'themes.php', 'use_auto_group_naming' => true, 'use_util_menu' => true, 'minimum_role' => 'edit_theme_options', 'layout' => 'fluid', 'page_title' => esc_html__('Theme Options', SH_NAME), 'menu_label' => esc_html__('Theme Options', SH_NAME)));
    _WSH()->user_extra(array('facebook' => __('Facebook', SH_NAME), 'twitter' => __('Twitter', SH_NAME), 'dribbble' => __('Dribble', SH_NAME), 'github' => __('Github', SH_NAME), 'flickr' => esc_html__('Flickr', SH_NAME), 'google-plus' => esc_html__('Google+', SH_NAME), 'youtube' => esc_html__('Youtube', SH_NAME)));
    $sh_exlude_hooks = (include_once 'resource/remove_action.php');
    foreach ($sh_exlude_hooks as $k => $v) {
        foreach ($v as $value) {
            remove_action($k, $value[0], $value[1]);
        }
    }
}
Ejemplo n.º 26
0
						'default' => '',
						'description' => __('Enter meta description', SH_NAME),
					),
					array(
						'type' => 'textarea',
						'name' => 'keywords',
						'label' => __('Meta Keywords', SH_NAME),
						'default' => '',
						'description' => __('Enter meta keywords', SH_NAME),
					),
				),

);*/
/** SEO fields for custom posts and pages */
$options[] = array('id' => '_sh_layout_settings', 'types' => array('post', 'page', 'sh_service', 'sh_team', 'sh_portfolio', 'sh_slide', 'sh_testimonial'), 'title' => __('Layout Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'radioimage', 'name' => 'layout', 'label' => __('Page Layout', SH_NAME), 'description' => __('Choose the layout for blog pages', SH_NAME), 'items' => array(array('value' => 'left', 'label' => __('Left Sidebar', SH_NAME), 'img' => get_template_directory_uri() . '/includes/vafpress/public/img/2cl.png'), array('value' => 'right', 'label' => __('Right Sidebar', SH_NAME), 'img' => get_template_directory_uri() . '/includes/vafpress/public/img/2cr.png'), array('value' => 'full', 'label' => __('Full Width', SH_NAME), 'img' => get_template_directory_uri() . '/includes/vafpress/public/img/1col.png'))), array('type' => 'select', 'name' => 'sidebar', 'label' => __('Sidebar', SH_NAME), 'default' => '', 'items' => sh_get_sidebars(true))));
$options[] = array('id' => _WSH()->set_meta_key('post'), 'types' => array('post'), 'title' => __('Post Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'toggle', 'name' => 'show_social', 'label' => __('Show Social Sharing', SH_NAME), 'default' => 1, 'description' => __('Show or hide social sharing icons, that are created from theme options', SH_NAME))));
/* Page options */
$options[] = array('id' => _WSH()->set_meta_key('page'), 'types' => array('page'), 'title' => __('Page Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'toggle', 'name' => 'is_home', 'label' => __('Don\'t Show Breadcrumb', SH_NAME), 'default' => '', 'description' => __('Dont\'t show breadcrumb banner area', SH_NAME)), array('type' => 'sorter', 'name' => 'single_pages', 'max_selection' => 10, 'label' => __('Choose Pages', SH_NAME), 'description' => __('Choose pages to show on Single page', SH_NAME), 'items' => array('data' => array(array('source' => 'function', 'value' => 'vp_get_pages'))))));
/** Slider Settings */
$options[] = array('id' => _WSH()->set_meta_key('sh_slide'), 'types' => array('sh_slide'), 'title' => __('Slide Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'textbox', 'name' => 'title1', 'label' => __('Heading', SH_NAME), 'default' => ''), array('type' => 'textbox', 'name' => 'title2', 'label' => __('Heading 2', SH_NAME), 'default' => ''), array('type' => 'group', 'repeating' => false, 'length' => 1, 'name' => 'slider_logo', 'title' => __('Create Logo', SH_NAME), 'fields' => array(array('type' => 'textbox', 'name' => 'text1', 'label' => __('Logo Heading 1', SH_NAME), 'default' => 'D'), array('type' => 'textbox', 'name' => 'text2', 'label' => __('Logo Heading 2', SH_NAME), 'default' => 'W'), array('type' => 'textbox', 'name' => 'text3', 'label' => __('Logo Bottom Text', SH_NAME), 'default' => 'Creative studio'), array('type' => 'toggle', 'name' => 'logo_check', 'label' => __('Show Logo?', SH_NAME), 'default' => '', 'description' => __('Wheter to show logo or not?', SH_NAME))))));
/** Team Options*/
$options[] = array('id' => _WSH()->set_meta_key('sh_team'), 'types' => array('sh_team'), 'title' => __('Team Options', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'group', 'repeating' => false, 'length' => 1, 'name' => 'sh_team_general_info', 'title' => __('General Information', SH_NAME), 'fields' => array(array('type' => 'textbox', 'name' => 'team_designation', 'label' => __('Designation', SH_NAME), 'default' => ''))), array('type' => 'group', 'repeating' => true, 'length' => 1, 'name' => 'sh_team_social', 'title' => __('Social Profile', SH_NAME), 'fields' => array(array('type' => 'fontawesome', 'name' => 'social_icon', 'label' => __('Social Icon', SH_NAME), 'default' => ''), array('type' => 'textbox', 'name' => 'social_link', 'label' => __('Link', SH_NAME), 'default' => '')))));
/** Testimonial Options*/
$options[] = array('id' => _WSH()->set_meta_key('sh_testimonial'), 'types' => array('sh_testimonial'), 'title' => __('Testimonials Options', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'textbox', 'name' => 'author', 'label' => __('Author', SH_NAME), 'default' => ''), array('type' => 'textbox', 'name' => 'company', 'label' => __('Company', SH_NAME), 'default' => '')));
/** Projects Options*/
$options[] = array('id' => _WSH()->set_meta_key('sh_portfolio'), 'types' => array('sh_portfolio'), 'title' => __('Portfolio Options', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'textbox', 'name' => 'customer', 'label' => __('Customer', SH_NAME), 'default' => ''), array('type' => 'textbox', 'name' => 'live_demo', 'label' => __('Website', SH_NAME), 'default' => 'http://example.com'), array('type' => 'date', 'name' => 'launch_date', 'label' => __('Date of Launch', SH_NAME), 'default' => ''), array('type' => 'textarea', 'name' => 'skills', 'label' => __('Skills (Comma seperated) ', SH_NAME), 'default' => '')));
$options[] = array('id' => _WSH()->set_meta_key('sh_service'), 'types' => array('sh_service'), 'title' => __('Service Settings', SH_NAME), 'priority' => 'high', 'template' => array(array('type' => 'fontawesome', 'name' => 'fontawesome', 'label' => __('Service Icon', SH_NAME), 'default' => '')));
/**
 * EOF
 */
return $options;
Ejemplo n.º 27
0
<?php

/** Template Name: Post VC*/
?>

<?php 
$meta = _WSH()->get_meta('_sh_layout_settings');
$meta1 = _WSH()->get_meta('_sh_header_settings');
$bg = sh_set($meta1, 'bg_image');
$bg = $bg ? $bg : get_template_directory_uri() . '/images/other/parallax.jpg';
$layout = sh_set($meta, 'layout', 'full');
$sidebar = sh_set($meta, 'sidebar', 'blog-sidebar');
$classes = !$layout || $layout == 'full' ? ' col-lg-12 col-md-12' : ' col-lg-9 col-md-9';
if (!sh_set($_GET, 'ajax')) {
    get_header();
    /** Update the post views counter */
    //_WSH()->post_views( true );
    ?>

<link rel="stylesheet" id="js_composer_front-css" href="http://localhost/denken/wp-content/plugins/js_composer/assets/css/js_composer.css?ver=4.7" type="text/css" media="all">



<?php 
    _sh_show_menu_by_position('above');
    ?>

<div class="page-header parallax" style="background-image: url(<?php 
    echo esc_url($bg);
    ?>
);"></div>
Ejemplo n.º 28
0
 function archive_meta()
 {
     $def = array('_enable_seo' => 0, '_seo_archive_meta_title' => '', '_seo_archive_meta_description' => '', '_seo_archive_meta_keywords' => '');
     $theme_options = _WSH()->option();
     $atts = shortcode_atts($def, $theme_options);
     extract((array) $atts, EXTR_OVERWRITE);
     if (!isset($_enable_seo) || !$_enable_seo) {
         return '';
     }
     if (isset($_seo_archive_meta_description)) {
         echo '<meta name="description" content="' . $_seo_archive_meta_description . '" />' . "\n";
     }
     if (isset($_seo_archive_meta_keywords)) {
         echo '<meta name="keywords" content="' . $_seo_archive_meta_keywords . '" />' . "\n";
     }
 }
Ejemplo n.º 29
0
				

				<div class="search-container">
					<form action="<?php 
echo home_url();
?>
" method="get">
						<input type="text" name="s" placeholder="Search">
						<a class="close" href="javascript:void(0)"><i class="fa fa-times"></i></a>
					</form>
				</div>  <!-- / .search-container -->

				<?php 
$count = 0;
$meta = _WSH()->get_meta();
?>

				<div class="collapse navbar-collapse">
					<ul class="nav navbar-nav navbar-right">

						<?php 
//if( (is_home() || is_front_page()) && !$wp_query->is_posts_page ){
if (true) {
    echo '<li><a href="#hero"><i class="fa fa-home"></i>' . esc_html__('', SH_NAME) . '</a></li>';
    foreach ((array) sh_set($meta, 'single_pages') as $pages) {
        $count = $count + 1;
        //if( $count == 1 ) continue;
        $title = get_the_title($pages);
        $li_class = $count == 1 ? ' class="no-icon-item"' : '';
        echo '<li><a href="#section' . esc_attr($pages) . '">' . balanceTags($title) . '</a></li>';
Ejemplo n.º 30
0
<?php

$meta = _WSH()->option();
$bg = sh_set($meta, '404_page_bg');
$bg = $bg ? $bg : get_template_directory_uri() . '/images/other/parallax.jpg';
if (!sh_set($_GET, 'ajax')) {
    get_header();
    /** Update the post views counter */
    //_WSH()->post_views( true );
    ?>


    <div class="page-header parallax" style="background-image: url(<?php 
    echo esc_url($bg);
    ?>
);"></div>

    <?php 
    get_template_part('includes/modules/nav');
}
?>

<!-- #  -->
<section id="" class="section padding">

	<div class="container">

		<div class="page-not-found">
			<i class="fa fa-warning"></i>
			<h2 class="color"><?php 
echo balanceTags(sh_set($meta, '404_page_title', esc_html__('404', SH_NAME)));