/** * Return a shortlink for a post, page, attachment, or blog. * * @since 1.0.0 */ public function getShortlink($shortlink, $id, $context, $allow_slugs) { if (ot_get_option('bitly_service_active') == 'no') { return false; } if (is_singular() && is_preview()) { return false; } global $wp_query; $post_id = ''; if ('query' == $context && is_singular()) { $post_id = $wp_query->get_queried_object_id(); } else { if ('post' == $context) { $post = get_post($id); $post_id = $post->ID; } } if ($shortlink = get_metadata('post', $post_id, '_bitly_shortlink', true)) { return $shortlink; } if (is_front_page() && !is_paged()) { return apply_filters('bitly_front_page', false); } $url = get_permalink($post_id); $domain = ot_get_option('bitly_domain'); $this->login(ot_get_option('bitly_login')); $this->apiKey(ot_get_option('bitly_api_key')); $shortlink = $this->shorten($url, $domain); if (!empty($shortlink)) { update_metadata('post', $post_id, '_bitly_shortlink', $shortlink); return $shortlink; } return false; }
function rb_meta_boxes() { $sidebars = ot_get_option('rb_sidebars'); $sidebars_array = array(); $sidebars_k = 0; if (!empty($sidebars)) { foreach ($sidebars as $sidebar) { $sidebars_array[$sidebars_k++] = array('label' => $sidebar['title'], 'value' => $sidebar['id']); } } $rb_meta_box_tagline = array('id' => 'rb_meta_box_tagline', 'title' => 'Tagline', 'desc' => '', 'pages' => array('page', 'portfolio'), 'context' => 'side', 'priority' => 'high', 'fields' => array(array('id' => 'rb_meta_box_tagline_set', 'label' => 'Tagline', 'desc' => 'Choose a tagline for the current page. You can use a <span> object to make highlights.', 'std' => '', 'type' => 'text', 'class' => ''))); $rb_meta_box_sidebar = array('id' => 'rb_meta_box_sidebar', 'title' => 'Layout', 'desc' => 'If you chose the sidebar layout, please choose a sidebar from the list below. Sidebars can be created in the Theme Options and configured in the Theme Widgets.', 'pages' => array('page'), 'context' => 'side', 'priority' => 'high', 'fields' => array(array('id' => 'rb_meta_box_sidebar_layout', 'label' => 'Layout', 'desc' => '', 'std' => 'full-width', 'type' => 'radio_image', 'class' => ''), array('id' => 'rb_meta_box_sidebar_set', 'label' => 'Sidebar', 'desc' => '', 'std' => '', 'type' => 'select', 'class' => '', 'choices' => $sidebars_array))); $rb_meta_box_slider_home = array('id' => 'rb_meta_box_slider_home', 'title' => 'Slider', 'desc' => '', 'pages' => array('page'), 'context' => 'side', 'priority' => 'high', 'fields' => array(array('id' => 'rb_meta_box_slider_home_set', 'label' => 'Slider ID', 'desc' => 'Write the slider id (alias) which will be used for this page. Please configure sliders inside the Revolution Slider admin panel!', 'std' => '', 'type' => 'text', 'class' => ''))); $rb_meta_box_video = array('id' => 'rb_meta_box_video', 'title' => 'Video', 'desc' => '', 'pages' => array('videofolio'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'rb_meta_box_video_code', 'label' => 'Video embedding code', 'desc' => 'Insert the embedding code if you\'re using videos from Vimeo or YouTube', 'std' => '', 'type' => 'textarea-simple', 'class' => ''))); $rb_meta_box_home = array('id' => 'rb_meta_box_home', 'title' => 'Homepage Options', 'desc' => '', 'pages' => array('page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'rb_home_slider_show', 'label' => 'Display Slider', 'desc' => 'Choose wheter you want to display a slider on the homepage or not.', 'std' => 'no', 'type' => 'radio', 'class' => '', 'choices' => array(array('label' => 'Yes', 'value' => 'yes'), array('label' => 'No', 'value' => 'no'))), array('id' => 'rb_home_slider_setup', 'label' => 'Slider Setup', 'desc' => 'This is a slider which supports both images & videos. Please make sure that all of your images/videos share the same size!', 'std' => '', 'type' => 'list-item', 'class' => 'rb_slider', 'choices' => array(), 'settings' => array(array('id' => 'rb_slide_type', 'label' => 'Slide Type', 'desc' => 'Choose the slide\'s type', 'std' => '', 'type' => 'select', 'class' => 'rb_slide_type', 'choices' => array(array('label' => 'Image', 'value' => 'image'), array('label' => 'Embedded Video', 'value' => 'emb_video'), array('label' => 'Self Hosted Video', 'value' => 'self_video'))), array('id' => 'rb_slide_image', 'label' => 'Image', 'desc' => 'Upload an image.', 'std' => '', 'type' => 'upload', 'class' => 'rb_slide_image', 'choices' => array()), array('id' => 'rb_slide_caption', 'label' => 'Caption', 'desc' => 'Write a short caption for the current image.', 'std' => '', 'type' => 'text', 'class' => 'rb_slide_image', 'choices' => array()), array('id' => 'rb_slide_video_code', 'label' => 'Video Code', 'desc' => 'Paste the video embedding code inside this field.', 'std' => '', 'type' => 'textarea', 'class' => 'rb_slide_emb', 'choices' => array()), array('id' => 'rb_slide_video_1', 'label' => 'MP4 File', 'desc' => 'Upload an .mp4 video file or paste a link to one.', 'std' => '', 'type' => 'upload', 'class' => 'rb_slide_hosted', 'choices' => array()), array('id' => 'rb_slide_video_2', 'label' => 'OGV File', 'desc' => 'Upload an .ogv video file or paste a link to one.', 'std' => '', 'type' => 'upload', 'class' => 'rb_slide_hosted', 'choices' => array()), array('id' => 'rb_slide_video_3', 'label' => 'Poster File', 'desc' => 'Upload a poster image for the player or paste a link to one.', 'std' => '', 'type' => 'upload', 'class' => 'rb_slide_hosted', 'choices' => array()))))); $rb_meta_box_folio = array('id' => 'rb_meta_box_folio', 'title' => 'Project Meta', 'desc' => '', 'pages' => array('portfolio'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'rb_post_date', 'label' => 'Date', 'desc' => 'Write the date when you released this project.', 'std' => '', 'type' => 'text', 'class' => '', 'choices' => array()), array('id' => 'rb_post_skill', 'label' => 'Skills', 'desc' => 'Write the skills involved in this project.', 'std' => '', 'type' => 'text', 'class' => '', 'choices' => array()), array('id' => 'rb_post_client', 'label' => 'Client', 'desc' => 'Write the client of this project.', 'std' => '', 'type' => 'text', 'class' => '', 'choices' => array()), array('id' => 'rb_post_link', 'label' => 'Link', 'desc' => 'Write a link to the project.', 'std' => '', 'type' => 'text', 'class' => '', 'choices' => array()))); $post_id = isset($_GET['post']) ? $_GET['post'] : (isset($_POST['post_ID']) ? $_POST['post_ID'] : 'no'); $template_file = $post_id != 'no' ? get_post_meta($post_id, '_wp_page_template', TRUE) : 'no'; if ($template_file == 'template-slider-full.php' || $template_file == 'template-slider-fit.php') { ot_register_meta_box($rb_meta_box_slider_home); } else { ot_register_meta_box($rb_meta_box_tagline); ot_register_meta_box($rb_meta_box_sidebar); } ot_register_meta_box($rb_meta_box_folio); ot_register_meta_box($rb_meta_box_video); }
function widget($args, $instance) { extract($args); ?> <?php echo $before_widget; ?> <?php if ($instance['title']) { echo $before_title . $instance['title'] . $after_title; } ?> <div class="donate"><?php $alipay_qr = ot_get_option('alipay_qr'); if (!empty($alipay_qr)) { ?> <img src="<?php echo $alipay_qr; ?> " title="赞助站长" alt="赞助站长" /><?php } echo tin_alipay_post_gather('', 1, 0); ?> </div> <?php echo $after_widget; ?> <?php }
function ktz_loop_columns() { $ktz_col_option = ot_get_option('ktz_woo_sb_col'); $ktz_cols = $ktz_col_option != '' ? $ktz_col_option : '3'; return $ktz_cols; // 3 products per row }
function __construct($username) { $this->username = $username; $this->settings = array('oauth_access_token' => ot_get_option('twitter_oauth_access_token'), 'oauth_access_token_secret' => ot_get_option('twitter_oauth_access_token_secret'), 'consumer_key' => ot_get_option('twitter_consumer_key'), 'consumer_secret' => ot_get_option('twitter_consumer_secret')); # TODO: retrieve basic user information // https://api.twitter.com/1.1/users/show.json?screen_name={$this->username} }
function is_enabled($key) { if (ot_get_option($key, 'on') == 'on') { return true; } return false; }
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $notweets = $instance['notweets']; // Output echo $before_widget; echo $before_title . $title . $after_title; $username = ot_get_option('twitter_bar_username'); ?> <ul> <?php echo get_theme_tweets($username, ot_get_option('twitter_bar_consumerkey'), ot_get_option('twitter_bar_consumersecret'), ot_get_option('twitter_bar_accesstoken'), ot_get_option('twitter_bar_accesstokensecret'), $notweets); ?> </ul> <a href="http://twitter.com/<?php echo ot_get_option('twitter_bar_username'); ?> " class="btn small twitter" target="_blank"><i class="icon-budicon-841"></i> <?php _e('Follow <strong>@' . $username . '</strong>', THB_THEME_NAME); ?> <i class="fa fa-twitter"></i></a> <?php echo $after_widget; }
function etheme_get_option($key, $setting = null, $doshortcode = true) { if (function_exists('ot_get_option')) { if ($doshortcode) { return do_shortcode(ot_get_option($key, $setting)); } else { return ot_get_option($key, $setting); } } $setting = $setting ? $setting : ETHEME_OPTIONS; $pre = apply_filters('etheme_pre_get_option_' . $key, false, $setting); if (false !== $pre) { return $pre; } $options = get_option($setting); if (!is_array($options) || !array_key_exists($key, (array) $options)) { return ''; } if (is_array($options[$key])) { return $options[$key]; } if ($doshortcode) { $value = do_shortcode($options[$key]); } else { $value = $options[$key]; } if (is_ssl()) { $value = str_replace('http://', 'https://', $value); } return stripslashes(wp_kses_decode_entities($value)); }
/** * This function filters all the CSS insertion values. */ function filter_css_value($value, $option_id) { // Custom Category Background if ($option_id == 'category_background') { $orn_cat_custom_bg = ot_get_option('orn_category_background'); if ($orn_cat_custom_bg) { $category_bckg_settings = ''; foreach ($orn_cat_custom_bg as $orn_cat_bg) { $cat_bg_sel = get_category($orn_cat_bg['orn_cat_bg_select']); $cat_bg_name = isset($cat_bg_sel->name) ? $cat_bg_sel->name : false; $cat_bg_slug = isset($cat_bg_sel->slug) ? $cat_bg_sel->slug : false; $backgrounds = $orn_cat_bg['orn_cat_bg_image']; $cat_bg_img = ''; $cat_bg_color = ''; $cat_bg_prop = ''; foreach ($backgrounds as $cat_background_key => $cat_background_value) { switch ($cat_background_key) { case 'background-image': if (isset($cat_background_value)) { $cat_bg_img = 'url("' . $cat_background_value . '")'; } break; case 'background-color': if (isset($cat_background_value)) { $cat_bg_color = $cat_background_value; } break; default: if ($cat_background_value) { $cat_bg_prop .= ' ' . $cat_background_value; } break; } } $category_bckg_settings .= '/* Custom Background for ' . $cat_bg_name . ' Category */' . "\n" . 'html > body.category-' . $cat_bg_slug . ' { ' . "\n" . ' background: ' . $cat_bg_color . ' ' . $cat_bg_img . $cat_bg_prop . ';' . "\n" . '}' . "\n" . ''; } return $category_bckg_settings; } } elseif ($option_id == 'orn_font_title') { // Google Fonts for title $orn_title_font = ot_get_option('orn_font_title'); $select_font = $orn_title_font == 'default' ? 'PT+Sans:400,700' : $orn_title_font; $title_font_name = '"' . str_replace("+", " ", strtok($select_font, ":")) . '";'; return $title_font_name; } elseif ($option_id == 'orn_font_body') { // Google Fonts for Body $orn_body_font = ot_get_option('orn_font_body'); $select_font = $orn_body_font == 'default' ? 'Open+Sans:400,700' : $orn_body_font; $body_font_name = '"' . str_replace("+", " ", strtok($select_font, ":")) . '";'; return $body_font_name; } elseif ($option_id == 'orn_font_navigation') { // Google Fonts for menu $orn_nav_font = ot_get_option('orn_font_navigation'); $select_font = $orn_nav_font == 'default' ? 'Oswald:400,700' : $orn_nav_font; $nav_font_name = '"' . str_replace("+", " ", strtok($select_font, ":")) . '";'; return $nav_font_name; } // Always return $value return $value; }
function sp_frontend_scripts_styles() { //Register CSS style wp_enqueue_style('gfont-opensans', 'http://fonts.googleapis.com/css?family=Open+Sans:400,600,300,700', false, SP_THEME_VERSION); wp_enqueue_style('theme-info', SP_BASE_URL . '/style.css', false, SP_THEME_VERSION); wp_enqueue_style('fontello', SP_ASSETS . '/css/fontello.css', false, SP_THEME_VERSION); wp_enqueue_style('normalize', SP_ASSETS . '/css/normalize.css', false, SP_THEME_VERSION); wp_enqueue_style('base', SP_ASSETS . '/css/base.css', false, SP_THEME_VERSION); wp_enqueue_style('animate', SP_ASSETS . '/css/animate.css', false, SP_THEME_VERSION); wp_enqueue_style('flexslider', SP_ASSETS . '/css/flexslider.css', false, SP_THEME_VERSION); wp_enqueue_style('flexslider-custom', SP_ASSETS . '/css/flexslider-custom.css', false, SP_THEME_VERSION); wp_enqueue_style('magnific-popup', SP_ASSETS . '/css/magnific-popup.css', false, SP_THEME_VERSION); wp_enqueue_style('magnific-custom', SP_ASSETS . '/css/magnific-custom.css', false, SP_THEME_VERSION); wp_enqueue_style('main', SP_ASSETS . '/css/main.css', false, SP_THEME_VERSION); //Register scripts wp_enqueue_script('modernizr', SP_ASSETS . '/js/vendor/custom-modernizr.min.js', array('jquery'), SP_THEME_VERSION, false); wp_enqueue_script('waypoint', SP_ASSETS . '/js/vendor/jquery.waypoints.min.js', array('jquery'), SP_THEME_VERSION, true); wp_enqueue_script('easing', SP_ASSETS . '/js/vendor/jquery.easing.1.3.js', array('jquery'), SP_THEME_VERSION, true); wp_enqueue_script('wow', SP_ASSETS . '/js/vendor/wow.min.js', array('jquery'), SP_THEME_VERSION, true); wp_enqueue_script('flexslider', SP_ASSETS . '/js/vendor/jquery.flexslider.js', array('jquery'), SP_THEME_VERSION, true); wp_enqueue_script('fitvideos', SP_ASSETS . '/js/vendor/jquery.fitvids.js', array('jquery'), SP_THEME_VERSION, true); wp_enqueue_script('magnific-popup', SP_ASSETS . '/js/vendor/jquery.magnific-popup.min.js', array('jquery'), SP_THEME_VERSION, false); wp_enqueue_script('main', SP_ASSETS . '/js/main.js', array('jquery'), SP_THEME_VERSION, true); if (is_singular() && comments_open()) { wp_enqueue_script('comment-reply'); } if (ot_get_option('responsive') != 'off') { wp_enqueue_style('responsive', SP_ASSETS . '/css/responsive.css', false, SP_THEME_VERSION); } wp_localize_script('main', 'theme_objects', array('base' => get_template_directory_uri(), 'commentProcess' => __('Processing your comment...', SP_TEXT_DOMAIN), 'commentError' => __('You might have left one of the fields blank, or be posting too quickly.', SP_TEXT_DOMAIN), 'commentSuccess' => __('Thanks for your response. Your comment will be published shortly after it\'ll be moderated.', SP_TEXT_DOMAIN))); }
public function get($option_id, $default = '') { static $cached_options = array(); if (in_array($option_id, $this->keys()) && isset($_GET[$option_id])) { return $_GET[$option_id]; } if (isset($cached_options[$option_id]) && !is_customize_preview()) { return $cached_options[$option_id]; } $ot_keys = apply_filters('youxi_option_ot_keys', array()); $ot_on_off = apply_filters('youxi_option_ot_on_off', array()); if (in_array($option_id, $ot_keys)) { if (in_array($option_id, $ot_on_off)) { $return = 'on' === ot_get_option($option_id, $default); } else { $return = ot_get_option($option_id, $default); } } else { $defaults = $this->defaults(); $options = $this->get_all(); if (isset($options[$option_id])) { $return = $options[$option_id]; } elseif (isset($defaults[$option_id])) { $return = $defaults[$option_id]; } else { $return = $default; } } return $cached_options[$option_id] = $return; }
public function handleShortcode($atts, $content = null) { extract(shortcode_atts(array('title' => '', 'active' => 'no', 'active_color' => ot_get_option('coll_accent_color'), 'bg_color' => '', 'class' => ''), $atts)); $active = $active == 'yes' ? ' active' : ''; $active_border = 'style="border-left-color:' . $active_color . '"'; //rnd $rnd = rand(1, 9999); // bg if (!empty($bg_color)) { $bg_color = 'style="background-color:' . $bg_color . '" '; } // build $output = ''; $output .= '<div class="coll-accordion ' . $class . '" ' . $bg_color . '>'; $output .= '<dl class="accordion" data-accordion>'; $output .= '<dd class="' . $active . '" ' . $bg_color . ' >'; $output .= '<a href="#toggle-' . sanitize_title($title) . '-' . $rnd . '" class="no-border" ' . $active_border . ' >' . $title . '</a>'; $output .= '<div id="toggle-' . sanitize_title($title) . '-' . $rnd . '" class="content ' . $active . '">'; $output .= do_shortcode($content); $output .= '</div>'; $output .= '</dd>'; $output .= '</dl>'; $output .= '</div>'; return $output; }
function woo_buttons_class() { global $product; $button_type = ot_get_option('button_type'); $output = sprintf('<a href="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" data-quantity="%s" class="%s product_type_%s %s">%s</a>', esc_url($product->add_to_cart_url()), esc_attr($product->id), esc_attr($product->get_sku()), esc_attr(isset($quantity) ? $quantity : 1), $product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button btn btn-primary btn-lg ' : '', esc_attr($product->product_type), esc_attr($button_type), esc_html($product->add_to_cart_text())); return $output; }
public function __construct() { // return if option tree is not defined if (!function_exists('ot_get_option')) { return; } $is_google_connect_enabled = ot_get_option('google_api_enabled', false); if (!$is_google_connect_enabled) { return; } $this->clientId = ot_get_option('google_api_client_id', ''); $this->clientSecret = ot_get_option('google_api_client_secret', ''); $this->redirectUri = admin_url('admin-ajax.php?action=clientConnectionInit'); if (empty($this->clientId)) { return; } if (empty($this->clientSecret)) { return; } $this->buttonLabel = ot_get_option('google_api_button_label', $this->buttonLabel); add_action('klein_login_form', array($this, 'connectClient'), 1); add_action('wp_ajax_clientConnectionInit', array($this, 'clientConnectionInit')); add_action('wp_ajax_nopriv_clientConnectionInit', array($this, 'clientConnectionInit')); add_action('login_head', array($this, 'errorLoggingIn')); return; }
function thb_twitter($atts, $content = null) { extract(shortcode_atts(array('username' => 'anteksiler', 'count' => '3', 'style' => 'dark'), $atts)); ob_start(); ?> <aside class="twitter_container <?php echo $style; ?> "> <i class="fa fa-twitter"></i> <div class="carousel owl <?php echo $style; ?> " data-columns="1" data-navigation="false" data-pagination="true"> <?php echo get_theme_tweets($username, ot_get_option('twitter_bar_consumerkey'), ot_get_option('twitter_bar_consumersecret'), ot_get_option('twitter_bar_accesstoken'), ot_get_option('twitter_bar_accesstokensecret'), $count); ?> </div> <a href="http://twitter.com/<?php echo $username; ?> ">@<?php echo $username; ?> </a> </aside> <?php $out = ob_get_contents(); if (ob_get_contents()) { ob_end_clean(); } return $out; }
function landx_dynamic_style_load_to_footer() { if (function_exists('ot_get_option')) { echo ot_get_option('footer_scripts'); } //wp_enqueue_script( 'landx-retina', THEMEURI . 'js/retina-1.1.0.min.js', array( 'jquery' ), '3.1.5', true ); }
function widget($args, $instance) { extract($args); ?> <?php echo $before_widget; ?> <?php if ($instance['title']) { echo $before_title . $instance['title'] . $after_title; } ?> <div class="aboutsite"><?php echo ot_get_option('tin_aboutsite'); ?> <a target="_blank" href="<?php echo ot_get_option('tin_qqgroup', 'http://shang.qq.com/wpa/qunwpa?idkey=9dcf8d2c615e22fe02da09ab4ea5e0fac7c0dd5c75dce415e7781e89874e3546'); ?> "><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="QQ交流群" title="QQ交流群" style="vertical-align: bottom;"></a></div> <?php echo $after_widget; ?> <?php }
function member() { $member_slug = function_exists('ot_get_option') ? ot_get_option('member_slug', 'member') : 'member'; $labels = array('name' => __('Member', 'cactusthemes'), 'singular_name' => __('Member', 'cactusthemes'), 'add_new' => __('Add New Member', 'cactusthemes'), 'add_new_item' => __('Add New Member', 'cactusthemes'), 'edit_item' => __('Edit Member', 'cactusthemes'), 'new_item' => __('New Member', 'cactusthemes'), 'view_item' => __('View Member', 'cactusthemes'), 'search_items' => __('Search Member', 'cactusthemes'), 'not_found' => __('No Member found', 'cactusthemes'), 'not_found_in_trash' => __('No Member found in Trash', 'cactusthemes'), 'parent_item_colon' => ''); $args = array('labels' => $labels, 'menu_position' => 8, 'supports' => array('title', 'editor', 'thumbnail'), 'public' => false, 'show_ui' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'rewrite' => array('slug' => $member_slug)); register_post_type('member', $args); }
function wpl_custom_css() { $wpl_css = ot_get_option('wpl_css'); echo "<style>"; echo $wpl_css; echo "</style>"; }
function tm_display_ads($section) { $ad_top_1 = ot_get_option($section); $adsense_publisher_id = ot_get_option('adsense_id'); $adsense_slot_top_1 = ot_get_option('adsense_slot_' . $section); if ($adsense_publisher_id != '' && $adsense_slot_top_1 != '') { ?> <div class='ad <?php echo $section; ?> '><?php tm_echo_responsive_ad($adsense_publisher_id, $adsense_slot_top_1); ?> </div> <?php } elseif ($ad_top_1 != '') { ?> <div class='ad <?php echo $section; ?> '><?php echo $ad_top_1; ?> </div> <?php } }
function get_option($option_name, $default = false) { if (class_exists('OT_Loader') and function_exists('ot_get_option')) { return ot_get_option($option_name, $default); } return $default; }
function widget($args, $modulos) { extract($args); /* Tags dos elementos do Widget */ $title = apply_filters('widget_title', $modulos['title']); $SuasVariaveis = $modulos['SuasVariaveis']; /* Front End do Widget. */ echo $front_widget; /* Função para exibição do título */ if ($title) { echo $before_title . $title . $after_title; } /* Exibição dos elementos no Front */ $logoOption = ot_get_option('logotipo'); $blogName = get_bloginfo('name'); $extra_classee = ''; if ($title) { $extra_classe = 'nome da nova classe'; } ?> <!-- Aqui sua brincadeira de Front End começa --> <div class="classe-widget"> </div> <?php /* Back End do Widget. */ echo $back_widget; }
/** * Build the custom settings & update OptionTree. */ function ts_custom_theme_options() { /** * Get a copy of the saved settings array. */ $saved_settings = get_option('option_tree_settings', array()); $user_sidebars = ot_get_option('user_sidebars'); $sidebar_choices = array(); $sidebar_choices[] = array('label' => __('Main', 'framework'), 'value' => 'main', 'src' => ''); if (is_array($user_sidebars)) { foreach ($user_sidebars as $sidebar) { $sidebar_choices[] = array('label' => $sidebar['title'], 'value' => sanitize_title($sidebar['title']), 'src' => ''); } } /** * Custom settings array that will eventually be * passes to the OptionTree Settings API Class. */ $custom_settings = array('sections' => array(array('id' => 'general_settings', 'title' => __('General Settings', 'framework')), array('id' => 'fonts', 'title' => __('Fonts', 'framework')), array('id' => 'elements_color', 'title' => __('Elements Color', 'framework')), array('id' => 'pages', 'title' => __('Pages', 'framework')), array('id' => 'sidebars', 'title' => __('Sidebars', 'framework')), array('id' => 'integration', 'title' => __('Integration', 'framework')), array('id' => 'social', 'title' => __('Contacts & Social', 'framework')), array('id' => 'contact_form', 'title' => __('Contact Form', 'framework')), array('id' => 'translations', 'title' => __('Translations', 'framework'))), 'settings' => array(array('id' => 'body_class', 'label' => __('Body class', 'framework'), 'desc' => '', 'std' => '', 'type' => 'Select', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'w1170', 'label' => __('Wide 1170px', 'framework'), 'src' => ''), array('value' => 'w960', 'label' => __('Wide 960px', 'framework'), 'src' => ''), array('value' => 'b1170', 'label' => __('Boxed 1170px', 'framework'), 'src' => ''), array('value' => 'b960', 'label' => __('Boxed 960px', 'framework'), 'src' => ''))), array('id' => 'logo_url', 'label' => __('Custom logo', 'framework'), 'desc' => __('Enter full URL of your logo image or choose upload button', 'framework'), 'std' => '', 'type' => 'upload', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'alternative_logo_url', 'label' => __('Alternative custom logo for main menu style 4', 'framework'), 'desc' => __('Enter full URL of your logo image or choose upload button', 'framework'), 'std' => '', 'type' => 'upload', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'sticky_logo_url', 'label' => __('Sticky custom logo', 'framework'), 'desc' => __('Enter full URL of your logo image or choose upload button', 'framework'), 'std' => '', 'type' => 'upload', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'show_sticky_menu', 'label' => __('Show sticky menu', 'framework'), 'desc' => __('Show or hide sticky menu', 'framework'), 'std' => '', 'type' => 'Radio', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => 'switcher-on', 'choices' => array(array('value' => 'yes', 'label' => __('Yes', 'framework'), 'src' => ''), array('value' => 'no', 'label' => __('No', 'framework'), 'src' => ''))), array('id' => 'logo_top_margin', 'label' => __('Logo top margin', 'framework'), 'desc' => __('Enter number to set the top space of the logo', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'logo_left_margin', 'label' => __('Logo left margin', 'framework'), 'desc' => __('Enter number to set the left space of the logo', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'logo_bottom_margin', 'label' => __('Logo bottom margin', 'framework'), 'desc' => __('Enter number to set the bottom space of the logo', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'favicon', 'label' => __('Favicon', 'framework'), 'desc' => __('Enter Full URL of your favicon image or choose upload button', 'framework'), 'std' => '', 'type' => 'upload', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'background_color', 'label' => __('Background color', 'framework'), 'desc' => __('Enabled only when boxed layout is selected', 'framework'), 'std' => '', 'type' => 'colorpicker', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'background_pattern', 'label' => __('Background pattern', 'framework'), 'desc' => __('Enabled only when boxed layout is selected', 'framework'), 'std' => '', 'type' => 'Select', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ts_get_background_patterns()), array('id' => 'background_image', 'label' => __('Background image', 'framework'), 'desc' => __('Choose "Image" option on "Background pattern" list and boxed layout to enable background', 'framework'), 'std' => '', 'type' => 'Upload', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'background_repeat', 'label' => __('Background repeat', 'framework'), 'desc' => '', 'std' => '', 'type' => 'Select', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'repeat', 'label' => __('Repeat horizontally & vertically', 'framework'), 'src' => ''), array('value' => 'repeat-x', 'label' => __('Repeat horizontally', 'framework'), 'src' => ''), array('value' => 'repeat-y', 'label' => __('Repeat vertically', 'framework'), 'src' => ''), array('value' => 'no-repeat', 'label' => __('No repeat', 'framework'), 'src' => ''))), array('id' => 'background_position', 'label' => __('Background position', 'framework'), 'desc' => '', 'std' => '', 'type' => 'Select', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'left', 'label' => __('Left', 'framework'), 'src' => ''), array('value' => 'center', 'label' => __('Center', 'framework'), 'src' => ''), array('value' => 'right', 'label' => __('Right', 'framework'), 'src' => ''))), array('id' => 'background_attachment', 'label' => __('Background attachment', 'framework'), 'desc' => '', 'std' => '', 'type' => 'Select', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'scroll', 'label' => __('Scroll', 'framework'), 'src' => ''), array('value' => 'fixed', 'label' => __('Fixed', 'framework'), 'src' => ''))), array('id' => 'background_size', 'label' => __('Background size', 'framework'), 'desc' => '', 'std' => '', 'type' => 'Select', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'original', 'label' => __('Original', 'framework'), 'src' => ''), array('value' => 'browser', 'label' => __('Fits to browser size', 'framework'), 'src' => ''))), array('id' => 'default_title_background', 'label' => __('Default title background', 'framework'), 'desc' => '', 'std' => '', 'type' => 'Upload', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'header_phone', 'label' => __('Header phone', 'framework'), 'desc' => __('Main menu "Style 2" and "Style 3" only, works only with preheader enabled for "Style 2"', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'header_email', 'label' => __('Header email', 'framework'), 'desc' => __('Main menu "Style 3" only', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'footer_text', 'label' => __('Footer text', 'framework'), 'desc' => __('You can add copyright text here.', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'main_menu_style', 'label' => __('Main menu style', 'framework'), 'desc' => '', 'std' => '', 'type' => 'Select', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ts_get_header_styles()), array('id' => 'show_preheader', 'label' => __('Show preheader', 'framework'), 'desc' => __('Show or hide preheader (main menu "Style 2" only)', 'framework'), 'std' => '', 'type' => 'Radio', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => 'switcher-on', 'choices' => array(array('value' => 'yes', 'label' => __('Yes', 'framework'), 'src' => ''), array('value' => 'no', 'label' => __('No', 'framework'), 'src' => ''))), array('id' => 'show_breadcrumbs', 'label' => __('Show breadcrumbs', 'framework'), 'desc' => __('Show or hide breadcrumbs', 'framework'), 'std' => '', 'type' => 'Radio', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => 'switcher-on', 'choices' => array(array('value' => 'yes', 'label' => __('Yes', 'framework'), 'src' => ''), array('value' => 'no', 'label' => __('No', 'framework'), 'src' => ''))), array('id' => 'show_search_nav', 'label' => __('Show search icon in navigation', 'framework'), 'desc' => __('Show or hide search form right to the main navigation', 'framework'), 'std' => '', 'type' => 'Radio', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => 'switcher-on', 'choices' => array(array('value' => 'yes', 'label' => __('Yes', 'framework'), 'src' => ''), array('value' => 'no', 'label' => __('No', 'framework'), 'src' => ''))), array('id' => 'retina_support', 'label' => __('Retina support', 'framework'), 'desc' => __('If enabled all images should be uploaded 2x larger. Requires more server resources if enabled.', 'framework'), 'std' => '', 'type' => 'Radio', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => 'switcher-off', 'choices' => array(array('value' => 'disabled', 'label' => __('Disabled', 'framework'), 'src' => ''), array('value' => 'enabled', 'label' => __('Enabled', 'framework'), 'src' => ''))), array('id' => 'control_panel', 'label' => __('Show control panel', 'framework'), 'desc' => __('Shows the Control Panel on your homepage if enabled.', 'framework'), 'std' => '', 'type' => 'select', 'section' => 'general_settings', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'disabled', 'label' => __('Disabled', 'framework'), 'src' => ''), array('value' => 'enabled_admin', 'label' => __('Enabled for administrator', 'framework'), 'src' => ''), array('value' => 'enabled_all', 'label' => __('Enabled for all', 'framework'), 'src' => ''))), array('id' => 'title_font', 'label' => __('Title font', 'framework'), 'desc' => __('Font style for page title', 'framework'), 'std' => '', 'type' => 'select', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ts_get_font_choices()), array('id' => 'title_font_size', 'label' => __('Title font size', 'framework'), 'desc' => __('The size of the page title in pixels', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'content_font', 'label' => __('Content font', 'framework'), 'desc' => __('Font style for content', 'framework'), 'std' => '', 'type' => 'select', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ts_get_font_choices()), array('id' => 'content_font_size', 'label' => __('Content font size', 'framework'), 'desc' => __('The size of the page content in pixels', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'menu_font', 'label' => __('Menu font', 'framework'), 'desc' => __('Font style for menu items', 'framework'), 'std' => '', 'type' => 'select', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ts_get_font_choices()), array('id' => 'menu_font_size', 'label' => __('Menu font size', 'framework'), 'desc' => __('The size of the menu elements in pixels', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'headers_font', 'label' => __('Header font', 'framework'), 'desc' => __('Font style for all headers (H1, H2 etc.)', 'framework'), 'std' => '', 'type' => 'select', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ts_get_font_choices()), array('id' => 'h1_size', 'label' => __('H1 font size', 'framework'), 'desc' => __('The size of H1 elements in pixels', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'h2_size', 'label' => __('H2 font size', 'framework'), 'desc' => __('The size of H2 elements in pixels', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'h3_size', 'label' => __('H3 font size', 'framework'), 'desc' => __('The size of H3 elements in pixels', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'h4_size', 'label' => __('H4 font size', 'framework'), 'desc' => __('The size of H4 elements in pixels', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'h5_size', 'label' => __('H5 font size', 'framework'), 'desc' => __('The size of H5 elements in pixels', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'h6_size', 'label' => __('H6 font size', 'framework'), 'desc' => __('The size of H6 elements in pixels', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'fonts', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'main_color', 'label' => __('Main color', 'framework'), 'desc' => __('Main theme color', 'framework'), 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'main_body_background_color', 'label' => __('Main body background color', 'framework'), 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'main_body_text_color', 'label' => __('Main body text color', 'framework'), 'desc' => __('Main body text color, used for post content.', 'framework'), 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'headers_text_color', 'label' => __('Headers text color', 'framework'), 'desc' => __('Color of all headers', 'framework'), 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'header_background_color', 'label' => __('Header background color', 'framework'), 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'page_title_background_color', 'label' => __('Page title background color', 'framework'), 'desc' => __('Background color of the page title', 'framework'), 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'menu_background_color', 'label' => __('Menu background color', 'framework'), 'desc' => __('Background color of the menu (header style 1, 2 and 3 only)', 'framework'), 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'menu_background_transparency', 'label' => __('Menu background transparency', 'framework'), 'desc' => '', 'std' => '', 'type' => 'Select', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ts_get_menu_background_transparency_values()), array('id' => 'sub_menu_background_color', 'label' => __('Sub menu background color', 'framework'), 'desc' => __('Background color of the sub menu item', 'framework'), 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'body_background_color_1', 'label' => __('Home background color 1', 'framework'), 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'body_background_color_2', 'label' => __('Home background color 2', 'framework'), 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'preheader_background_color', 'label' => __('Preheader background color', 'framework'), 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'preheader_text_color', 'label' => __('Preheader text color', 'framework'), 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'footer_background_color', 'label' => __('Footer background color', 'framework'), 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'footer_headers_color', 'label' => __('Footer headers color', 'framework'), 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'footer_main_text_color', 'label' => __('Footer main text color', 'framework'), 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'copyrights_bar_background', 'label' => __('Copyrights bar background color', 'framework'), 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'copyrights_bar_text_color', 'label' => __('Copyrights bar text color', 'framework'), 'desc' => '', 'std' => '', 'type' => 'colorpicker', 'section' => 'elements_color', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => ''), array('id' => 'portfolio_page', 'label' => __('Portfolio page', 'framework'), 'desc' => '', 'std' => '', 'type' => 'page-select', 'section' => 'pages', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'show_related_projects_on_portfolio_single', 'label' => __('Related projects', 'framework'), 'desc' => __('Show related projects on a single post page', 'framework'), 'std' => '', 'type' => 'Radio', 'section' => 'pages', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => 'switcher-on', 'choices' => array(array('value' => 'yes', 'label' => __('Yes', 'framework'), 'src' => ''), array('value' => 'no', 'label' => __('No', 'framework'), 'src' => ''))), array('id' => 'portfolio_page_related_projects_header', 'label' => __('Portfolio page - related projects header', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'pages', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'portfolio_page_related_projects_description', 'label' => __('Portfolio page - related projects description', 'framework'), 'desc' => '', 'std' => '', 'type' => 'textarea', 'section' => 'pages', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'google_analytics_id', 'label' => __('Google Analytics ID', 'framework'), 'desc' => __('Your Google Analytics ID eg. UA-1xxxxx8-1', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'integration', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'scripts_header', 'label' => __('Header scripts', 'framework'), 'desc' => __('Scripts will be added to the header. Don\'t forget to add ‹script›;...‹/script› tags.', 'framework'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'integration', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'scripts_footer', 'label' => __('Footer scripts', 'framework'), 'desc' => __('Scripts will be added to the footer. You can use this for Google Analytics etc. Don\'t forget to add ‹script›...‹/script› tags.', 'framework'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'integration', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'custom_css', 'label' => __('Custom CSS', 'framework'), 'desc' => __('Please add css classes only', 'framework'), 'std' => '', 'type' => 'textarea-simple', 'section' => 'integration', 'rows' => '10', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'active_social_items', 'label' => __('Actived items', 'framework'), 'desc' => __('Items available on your website', 'framework'), 'std' => '', 'type' => 'checkbox', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => array(array('value' => 'twitter', 'label' => __('Twitter', 'framework'), 'src' => ''), array('value' => 'facebook', 'label' => __('Facebook', 'framework'), 'src' => ''), array('value' => 'skype', 'label' => __('Skype', 'framework'), 'src' => ''), array('value' => 'dribble', 'label' => __('Dribble', 'framework'), 'src' => ''), array('value' => 'youtube', 'label' => __('Youtube', 'framework'), 'src' => ''), array('value' => 'pinterest', 'label' => __('Pinterest', 'framework'), 'src' => ''), array('value' => 'tumblr', 'label' => __('Tumblr', 'framework'), 'src' => ''), array('value' => 'google_plus', 'label' => __('Google+', 'framework'), 'src' => ''), array('value' => 'linkedin', 'label' => __('LinkedIn', 'framework'), 'src' => ''))), array('id' => 'facebook_url', 'label' => __('Facebook URL', 'framework'), 'desc' => __('URL to your Facebook account', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'twitter_url', 'label' => __('Twitter URL', 'framework'), 'desc' => __('URL to your Twitter account', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'skype_username', 'label' => __('Skype username', 'framework'), 'desc' => __('Your Skype username', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'dribble_url', 'label' => __('Dribble URL', 'framework'), 'desc' => __('URL to your Dribble account', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'youtube_url', 'label' => __('Youtube URL', 'framework'), 'desc' => __('URL to your Youtube account', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'pinterest_url', 'label' => __('Pinterest URL', 'framework'), 'desc' => __('URL to your Pinterest account', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'tumblr_url', 'label' => __('Tumblr URL', 'framework'), 'desc' => __('URL to your Tumblr account', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'google_plus_url', 'label' => __('Google+ URL', 'framework'), 'desc' => __('URL to your Google+ account', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'linkedin_url', 'label' => __('LinkedIn URL', 'framework'), 'desc' => __('URL to your LinkedIn account', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'twitter_account_recent_tweets', 'label' => __('Twitter URL', 'framework'), 'desc' => __('Your Twitter URL to use in the footer', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'twitter_consumer_key', 'label' => __('Consumer key', 'framework'), 'desc' => __("Consumer key from your application's OAuth settings.", 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'twitter_consumer_secret', 'label' => __('Consumer secret', 'framework'), 'desc' => __("Consumer secret from your application's OAuth settings.", 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'twitter_user_token', 'label' => __('User token', 'framework'), 'desc' => __("'User token from your application's OAuth settings.", 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'twitter_token_secret', 'label' => __('Access token secret', 'framework'), 'desc' => __("'Access token secret from your application's OAuth settings.", 'framework'), 'std' => '', 'type' => 'text', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('id' => 'show_recent_tweet_footer_show_errors', 'label' => __('Show recent tweets authentication errors', 'framework'), 'desc' => __('Use this option if you test your setttings only.', 'framework'), 'std' => '', 'type' => 'Radio', 'section' => 'social', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => 'switcher-off', 'choices' => array(array('value' => 'no', 'label' => __('No', 'framework'), 'src' => ''), array('value' => 'yes', 'label' => __('Yes', 'framework'), 'src' => ''))), array('id' => 'contact_form_email', 'label' => __('Email', 'framework'), 'desc' => __('Email to receive messages from contact forms', 'framework'), 'std' => '', 'type' => 'text', 'section' => 'contact_form', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => ''), array('label' => 'Sidebars', 'id' => 'user_sidebars', 'type' => 'list-item', 'desc' => __('List of user defined sidebars. Please use "save changes" button after adding or editing sidebars.', 'framework'), 'settings' => array(array('label' => __('Description', 'framework'), 'id' => 'user_sidebar_description', 'type' => 'text', 'desc' => '', 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '')), 'std' => '', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'section' => 'sidebars'), array('id' => 'woocomerce_sidebar', 'label' => __('WooCommerce sidebar', 'framework'), 'desc' => '', 'std' => '', 'type' => 'Select', 'section' => 'sidebars', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'choices' => $sidebar_choices), array('id' => 'enable_translations', 'label' => __('Enable translations', 'framework'), 'desc' => '', 'std' => '', 'type' => 'Radio', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => 'switcher-off', 'choices' => array(array('value' => 'no', 'label' => __('No', 'framework'), 'src' => ''), array('value' => 'yes', 'label' => __('Yes', 'framework'), 'src' => ''))), array('id' => 'translator_' . sanitize_title('%s Comments'), 'label' => __('%s Comments', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => '%s Comments'), array('id' => 'translator_' . sanitize_title('1 Comment'), 'label' => __('1 Comment', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => '1 Comment'), array('id' => 'translator_' . sanitize_title('1 hour ago'), 'label' => __('1 hour ago', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => '1 hour ago'), array('id' => 'translator_' . sanitize_title('1 minute ago'), 'label' => __('1 minute ago', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => '1 minute ago'), array('id' => 'translator_' . sanitize_title('1 year ago'), 'label' => __('1 year ago', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => '1 year ago'), array('id' => 'translator_' . sanitize_title('404 Page Not Found'), 'label' => __('404 Page Not Found', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => '404 Page Not Found'), array('id' => 'translator_' . sanitize_title('About the author'), 'label' => __('About the author', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'About the author'), array('id' => 'translator_' . sanitize_title('About the author'), 'label' => __('About the author', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'About the author'), array('id' => 'translator_' . sanitize_title('All'), 'label' => __('All', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'All'), array('id' => 'translator_' . sanitize_title('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.'), 'label' => __('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.'), array('id' => 'translator_' . sanitize_title('Archive by Category "%s"'), 'label' => __('Archive by Category "%s"', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Archive by Category "%s"'), array('id' => 'translator_' . sanitize_title('Blog'), 'label' => __('Blog', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Blog'), array('id' => 'translator_' . sanitize_title('By'), 'label' => __('By', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'By'), array('id' => 'translator_' . sanitize_title('Cancel Comment'), 'label' => __('Cancel Comment', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Cancel Comment'), array('id' => 'translator_' . sanitize_title('Clear'), 'label' => __('Clear', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Clear'), array('id' => 'translator_' . sanitize_title('Comment'), 'label' => __('Comment', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Comment'), array('id' => 'translator_' . sanitize_title('Comments'), 'label' => __('Comments', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Comments'), array('id' => 'translator_' . sanitize_title('COMMENTS'), 'label' => __('COMMENTS', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'COMMENTS'), array('id' => 'translator_' . sanitize_title('Comments are closed.'), 'label' => __('Comments are closed.', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Comments are closed.'), array('id' => 'translator_' . sanitize_title('Contact form'), 'label' => __('Contact form', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Contact form'), array('id' => 'translator_' . sanitize_title('days ago'), 'label' => __('days ago', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'days ago'), array('id' => 'translator_' . sanitize_title('Edit'), 'label' => __('Edit', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Edit'), array('id' => 'translator_' . sanitize_title('Email'), 'label' => __('Email', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Email'), array('id' => 'translator_' . sanitize_title('Email sent. Thank you for contacting us.'), 'label' => __('Email sent. Thank you for contacting us.', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Email sent. Thank you for contacting us.'), array('id' => 'translator_' . sanitize_title('Filter'), 'label' => __('Filter', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Filter'), array('id' => 'translator_' . sanitize_title('Home'), 'label' => __('Home', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Home'), array('id' => 'translator_' . sanitize_title('hours ago'), 'label' => __('hours ago', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'hours ago'), array('id' => 'translator_' . sanitize_title('just now'), 'label' => __('just now', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'just now'), array('id' => 'translator_' . sanitize_title('Leave a Comment'), 'label' => __('Leave a Comment', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Leave a Comment'), array('id' => 'translator_' . sanitize_title('Leave a Comment to %s'), 'label' => __('Leave a Comment to %s', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Leave a Comment to %s'), array('id' => 'translator_' . sanitize_title('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>'), 'label' => __('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>'), array('id' => 'translator_' . sanitize_title('minutes ago'), 'label' => __('minutes ago', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'minutes ago'), array('id' => 'translator_' . sanitize_title('months ago'), 'label' => __('months ago', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'months ago'), array('id' => 'translator_' . sanitize_title('Name'), 'label' => __('Name', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Name'), array('id' => 'translator_' . sanitize_title('Next'), 'label' => __('Next', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Next'), array('id' => 'translator_' . sanitize_title('next'), 'label' => __('next', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'next'), array('id' => 'translator_' . sanitize_title('Next »'), 'label' => __('Next »', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Next »'), array('id' => 'translator_' . sanitize_title('next post'), 'label' => __('next post', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'next post'), array('id' => 'translator_' . sanitize_title('No comments'), 'label' => __('No comments', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'No comments'), array('id' => 'translator_' . sanitize_title('Page %s'), 'label' => __('Page %s', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Page %s'), array('id' => 'translator_' . sanitize_title('Pages:'), 'label' => __('Pages:', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Pages:'), array('id' => 'translator_' . sanitize_title('Pingback:'), 'label' => __('Pingback:', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Pingback:'), array('id' => 'translator_' . sanitize_title('Please check your email.'), 'label' => __('Please check your email.', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Please check your email.'), array('id' => 'translator_' . sanitize_title('Please fill all required fields.'), 'label' => __('Please fill all required fields.', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Please fill all required fields.'), array('id' => 'translator_' . sanitize_title('Posts by %s'), 'label' => __('Posts by %s', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Posts by %s'), array('id' => 'translator_' . sanitize_title('Posts by %s'), 'label' => __('Posts by %s', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Posts by %s'), array('id' => 'translator_' . sanitize_title('Posts made in %s'), 'label' => __('Posts made in %s', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Posts made in %s'), array('id' => 'translator_' . sanitize_title('Posts Tagged "%s"'), 'label' => __('Posts Tagged "%s"', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Posts Tagged "%s"'), array('id' => 'translator_' . sanitize_title('Previous'), 'label' => __('Previous', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Previous'), array('id' => 'translator_' . sanitize_title('previous'), 'label' => __('previous', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'previous'), array('id' => 'translator_' . sanitize_title('previous post'), 'label' => __('previous post', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'previous post'), array('id' => 'translator_' . sanitize_title('« Previous'), 'label' => __('« Previous', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => '« Previous'), array('id' => 'translator_' . sanitize_title('project details'), 'label' => __('project details', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'project details'), array('id' => 'translator_' . sanitize_title('project info'), 'label' => __('project info', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'project info'), array('id' => 'translator_' . sanitize_title('read more'), 'label' => __('read more', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'read more'), array('id' => 'translator_' . sanitize_title('related works'), 'label' => __('related works', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'related works'), array('id' => 'translator_' . sanitize_title('required'), 'label' => __('required', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'required'), array('id' => 'translator_' . sanitize_title('Search Results for "%s" Query'), 'label' => __('Search Results for "%s" Query', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Search Results for "%s" Query'), array('id' => 'translator_' . sanitize_title('Search results for %s'), 'label' => __('Search results for %s', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Search results for %s'), array('id' => 'translator_' . sanitize_title('Send'), 'label' => __('Send', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Send'), array('id' => 'translator_' . sanitize_title('SENT'), 'label' => __('SENT', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'SENT'), array('id' => 'translator_' . sanitize_title('Server error. Pease try again later.'), 'label' => __('Server error. Pease try again later.', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Server error. Pease try again later.'), array('id' => 'translator_' . sanitize_title('weeks ago'), 'label' => __('weeks ago', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'weeks ago'), array('id' => 'translator_' . sanitize_title('years ago'), 'label' => __('years ago', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'years ago'), array('id' => 'translator_' . sanitize_title('Yesterday'), 'label' => __('Yesterday', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Yesterday'), array('id' => 'translator_' . sanitize_title('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s'), 'label' => __('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s'), array('id' => 'translator_' . sanitize_title('You must be <a href="%s">logged in</a> to post a comment.'), 'label' => __('You must be <a href="%s">logged in</a> to post a comment.', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'You must be <a href="%s">logged in</a> to post a comment.'), array('id' => 'translator_' . sanitize_title('Your comment is awaiting moderation.'), 'label' => __('Your comment is awaiting moderation.', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Your comment is awaiting moderation.'), array('id' => 'translator_' . sanitize_title('Your message'), 'label' => __('Your message', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'Your message'), array('id' => 'translator_' . sanitize_title('WHAT CLIENTS SAY'), 'label' => __('WHAT CLIENTS SAY', 'framework'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'translations', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'class' => '', 'default' => 'WHAT CLIENTS SAY'))); /* allow settings to be filtered before saving */ $custom_settings = apply_filters('option_tree_settings_args', $custom_settings); /* settings are not the same update the DB */ if ($saved_settings !== $custom_settings) { update_option('option_tree_settings', $custom_settings); } }
function fun_wp_footer() { echo ' <script type="text/javascript" src="' . THEME_URI . '/js/jquery.min.js"></script> <script type="text/javascript" src="' . THEME_URI . '/js/scripts.js"></script> '; if (is_home() && ot_get_option('opt_slider') == 'on') { ?> <script type="text/javascript"> eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--)d[c]=k[c]||c;k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(4).3(2(){$(\'#1\').0()});',5,5,'nivoSlider|slider|function|load|window'.split('|'),0,{})) </script> <?php } if (ot_get_option('opt_share')) { ?> <script type="text/javascript"> window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin","douban"]}}; with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)]; </script> <?php } if (is_single()) { ?> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?> /js/comments-ajax.js"></script> <?php } }
/** * Search results per page */ function vestalite_wp_change_wp_search_size($query) { if ($query->is_search) { $query->query_vars['posts_per_page'] = ot_get_option('search_results_per_page', '10', true); } return $query; }
function lpd_ggl_web_font() { $body_font_family = ot_get_option('body_font_family'); if ($body_font_family == "") { $body_font_family = "Raleway"; } $heading_font_family = ot_get_option('heading_font_family'); if ($heading_font_family == "") { $heading_font_family = "Raleway"; } $elements_font_family = ot_get_option('elements_font_family'); if ($elements_font_family == "") { $elements_font_family = "Lato"; } $new_body_font_family = $new_heading_font_family = $new_elements_font_family = ''; if ($body_font_family != $heading_font_family) { if ($heading_font_family == 'Open+Sans' || $heading_font_family == 'Titillium+Web' || $heading_font_family == 'Oxygen' || $heading_font_family == 'Quicksand' || $heading_font_family == 'Lato' || $heading_font_family == 'Raleway' || $heading_font_family == 'Source+Sans+Pro' || $heading_font_family == 'Dosis' || $heading_font_family == 'Exo' || $heading_font_family == 'Arvo' || $heading_font_family == 'Vollkorn' || $heading_font_family == 'Ubuntu' || $heading_font_family == 'PT+Sans' || $heading_font_family == 'PT+Serif' || $heading_font_family == 'Droid+Sans' || $heading_font_family == 'Droid+Serif' || $heading_font_family == 'Cabin' || $heading_font_family == 'Lora' || $heading_font_family == 'Oswald' || $heading_font_family == 'Varela+Round' || $heading_font_family == 'Unna' || $heading_font_family == 'Rokkitt' || $heading_font_family == 'Merriweather' || $heading_font_family == 'Bitter' || $heading_font_family == 'Kreon' || $heading_font_family == 'Playfair+Display' || $heading_font_family == 'Roboto+Slab' || $heading_font_family == 'Bree+Serif' || $heading_font_family == 'Libre+Baskerville' || $heading_font_family == 'Cantata+One' || $heading_font_family == 'Alegreya' || $heading_font_family == 'Noto+Serif' || $heading_font_family == 'EB+Garamond' || $heading_font_family == 'Noticia+Text' || $heading_font_family == 'Old+Standard+TT' || $heading_font_family == 'Crimson+Text' || $heading_font_family == 'Josefin+Sans' || $heading_font_family == 'Ubuntu') { $new_heading_font_family = $heading_font_family . ':300,400,500,700,900,700italic,400italic|'; } } if ($body_font_family != $elements_font_family || $heading_font_family != $elements_font_family) { if ($elements_font_family == 'Open+Sans' || $elements_font_family == 'Titillium+Web' || $elements_font_family == 'Oxygen' || $elements_font_family == 'Quicksand' || $elements_font_family == 'Lato' || $elements_font_family == 'Raleway' || $elements_font_family == 'Source+Sans+Pro' || $elements_font_family == 'Dosis' || $elements_font_family == 'Exo' || $elements_font_family == 'Arvo' || $elements_font_family == 'Vollkorn' || $elements_font_family == 'Ubuntu' || $elements_font_family == 'PT+Sans' || $elements_font_family == 'PT+Serif' || $elements_font_family == 'Droid+Sans' || $elements_font_family == 'Droid+Serif' || $elements_font_family == 'Cabin' || $elements_font_family == 'Lora' || $elements_font_family == 'Oswald' || $elements_font_family == 'Varela+Round' || $elements_font_family == 'Unna' || $elements_font_family == 'Rokkitt' || $elements_font_family == 'Merriweather' || $elements_font_family == 'Bitter' || $elements_font_family == 'Kreon' || $elements_font_family == 'Playfair+Display' || $elements_font_family == 'Roboto+Slab' || $elements_font_family == 'Bree+Serif' || $elements_font_family == 'Libre+Baskerville' || $elements_font_family == 'Cantata+One' || $elements_font_family == 'Alegreya' || $elements_font_family == 'Noto+Serif' || $elements_font_family == 'EB+Garamond' || $elements_font_family == 'Noticia+Text' || $elements_font_family == 'Old+Standard+TT' || $elements_font_family == 'Crimson+Text' || $elements_font_family == 'Josefin+Sans' || $elements_font_family == 'Ubuntu') { $new_elements_font_family = $elements_font_family . ':300,400,500,700,900,700italic,400italic|'; } } if ($body_font_family == 'Open+Sans' || $body_font_family == 'Titillium+Web' || $body_font_family == 'Oxygen' || $body_font_family == 'Quicksand' || $body_font_family == 'Lato' || $body_font_family == 'Raleway' || $body_font_family == 'Source+Sans+Pro' || $body_font_family == 'Dosis' || $body_font_family == 'Exo' || $body_font_family == 'Arvo' || $body_font_family == 'Vollkorn' || $body_font_family == 'Ubuntu' || $body_font_family == 'PT+Sans' || $body_font_family == 'PT+Serif' || $body_font_family == 'Droid+Sans' || $body_font_family == 'Droid+Serif' || $body_font_family == 'Cabin' || $body_font_family == 'Lora' || $body_font_family == 'Oswald' || $body_font_family == 'Varela+Round' || $body_font_family == 'Unna' || $body_font_family == 'Rokkitt' || $body_font_family == 'Merriweather' || $body_font_family == 'Bitter' || $body_font_family == 'Kreon' || $body_font_family == 'Playfair+Display' || $body_font_family == 'Roboto+Slab' || $body_font_family == 'Bree+Serif' || $body_font_family == 'Libre+Baskerville' || $body_font_family == 'Cantata+One' || $body_font_family == 'Alegreya' || $body_font_family == 'Noto+Serif' || $body_font_family == 'EB+Garamond' || $body_font_family == 'Noticia+Text' || $body_font_family == 'Old+Standard+TT' || $body_font_family == 'Crimson+Text' || $body_font_family == 'Josefin+Sans' || $body_font_family == 'Ubuntu') { $new_body_font_family = $body_font_family . ':300,400,500,700,900,700italic,400italic|'; } if (!is_admin()) { wp_register_style('lpd_ggl_web_font', 'http://fonts.googleapis.com/css?family=' . $new_body_font_family . '' . $new_heading_font_family . '' . $new_elements_font_family . ''); wp_enqueue_style('lpd_ggl_web_font'); } }
function ktz_mustread_content() { global $post; if (ot_get_option('ktz_popup_activated') == 'yes') { $paged = get_query_var('paged') ? get_query_var('paged') : 1; $args = array('post_type' => 'post', 'orderby' => 'rand', 'order' => 'desc', 'showposts' => 3, 'post_status' => 'publish', 'ignore_sticky_posts' => 1); $ktz_topfeatquery = new WP_Query($args); if ($ktz_topfeatquery->have_posts()) { echo '<div id="ktz_slidebox">'; echo '<strong class="mustread_title">' . __('Must read', ktz_theme_textdomain) . '</strong><a href="#" class="close">×</a>'; echo '<ul class="mustread_list">'; while ($ktz_topfeatquery->have_posts()) { $ktz_topfeatquery->the_post(); echo '<li class="mustread_li clearfix">'; echo '<div class="pull-left">'; echo ktz_featured_img(50, 50); echo '</div>'; echo '<div class="title">'; echo ktz_posted_title_a(); echo '</div>'; echo '</li>'; } echo '</ul>'; echo '</div>'; } wp_reset_query(); } }
function coll_enqueue_styles() { global $coll_is_mobile; if (!$coll_is_mobile) { wp_register_style('scrollbar', get_template_directory_uri() . '/css/perfect-scrollbar.css'); wp_enqueue_style('scrollbar'); } wp_register_style('googlefonts', '//fonts.googleapis.com/css?family=Bentham|Pinyon+Script|Bitter:400,700|Raleway:300,400,500,600|Sacramento|Lato:300,400,900|Open+Sans:400,700,800|Pacifico|Lobster|Roboto:400,900,700|Oswald:400,700'); wp_register_style('normalize', get_template_directory_uri() . '/css/normalize.css'); wp_register_style('foundation', get_template_directory_uri() . '/css/foundation.css', null, null); wp_register_style('magicpopup', get_template_directory_uri() . '/css/magnific-popup.css'); wp_register_style('icons', get_template_directory_uri() . '/css/font-awesome.min.css'); wp_register_style('superfish', get_template_directory_uri() . '/css/superfish.css'); wp_register_style('flexslider', get_template_directory_uri() . '/css/flexslider.css', null, null); wp_register_style('plugin', get_template_directory_uri() . '/css/plugin.css', null, null); wp_register_style('public', get_template_directory_uri() . '/css/public.css', null, null); wp_register_style('morpheus', get_stylesheet_uri(), null, null); wp_enqueue_style('googlefonts'); wp_enqueue_style('foundation'); wp_enqueue_style('magicpopup'); wp_enqueue_style('icons'); wp_enqueue_style('superfish'); wp_enqueue_style('flexslider'); wp_enqueue_style('plugin'); wp_enqueue_style('public'); wp_enqueue_style('morpheus'); // add custom css $custom_css = ot_get_option('coll_custom_css'); if (!empty($custom_css)) { wp_add_inline_style('morpheus', $custom_css); } }
function parse_tm_related_post_func($atts, $content) { $title = isset($atts['title']) ? $atts['title'] : ''; $postformat = isset($atts['postformat']) ? $atts['postformat'] : ''; $posttypes = isset($atts['posttypes']) ? $atts['posttypes'] : 'post'; $count = isset($atts['count']) ? $atts['count'] : ''; $tags = isset($atts['tag']) ? $atts['tag'] : ''; $orderby = isset($atts['orderby']) ? $atts['orderby'] : ''; if (function_exists('ot_get_option')) { $themes_pur = ot_get_option('theme_purpose'); } if (function_exists('ot_get_option')) { $layout_ct_video = ot_get_option('single_layout_ct_video'); if ($layout_ct_video != 'full') { $count = '4'; } else { $count = '6'; } } if (class_exists('CT_ContentHelper')) { $item_loop_video = new CT_ContentHelper(); $the_query = $item_loop_video->tm_get_related_posts($posttypes, $tags, $postformat, $count, $orderby, $args = array()); $thumb = 'thumb_196x126'; $show_title = 1; $show_meta = $show_exceprt = 0; $item_video = new CT_ContentHtml(); if ($the_query->have_posts()) { $html = ' <div class="smart-box smart-box-style-2 is-carousel" >'; $html .= '<div class="smart-box-head"> <h2 class="light-title">' . $title . '</h2> </div> <div class="smart-box-content"> <div class="smart-item"> <div class="row"> '; while ($the_query->have_posts()) { $the_query->the_post(); if ($layout_ct_video != 'full') { $html .= ' <div class="col-md-3 col-sm-6 col-xs-6">'; } else { $html .= ' <div class="col-md-2 col-sm-6 col-xs-6">'; } $html .= $item_video->get_item_medium_video($thumb, $show_title, $show_exceprt, $show_meta, $themes_pur); $html .= '</div>'; } $html .= '</div> </div> </div> </div> <div class="clear"></div> '; } wp_reset_query(); return $html; } }
function save_images($image_url, $post_id, $i) { //set_time_limit(180); //每个图片最长允许下载时间,秒 $file = file_get_contents($image_url); $fileext = substr(strrchr($image_url, '.'), 1); $fileext = strtolower($fileext); if ($fileext == "" || strlen($fileext) > 4) { $fileext = "jpg"; } $savefiletype = array('jpg', 'gif', 'png', 'bmp'); if (!in_array($fileext, $savefiletype)) { $fileext = "jpg"; } $im_name = date('YmdHis', time()) . $i . mt_rand(10, 20) . '.' . $fileext; $res = wp_upload_bits($im_name, '', $file); if (isset($res['file'])) { $attach_id = insert_attachment($res['file'], $post_id); } else { return; } if (ot_get_option('auto_save_image_thumb') == 'on' && $i == 1) { set_post_thumbnail($post_id, $attach_id); } return $res; }