/**
  * Currency switcher
  *
  * @access public
  * @return void|bool|string
  */
 public static function currencies($atts)
 {
     $atts = shortcode_atts(array(), $atts, 'realia_currencies');
     if (!current_theme_supports('realia-currencies')) {
         return;
     }
     $currencies = get_theme_mod('realia_currencies');
     if ($currencies == false) {
         $currencies = array(array('symbol' => '$', 'code' => 'USD', 'show_after' => false, 'money_decimals' => 2, 'money_dec_point' => '.', 'money_thousands_separator' => ','));
     } elseif (!is_array($currencies)) {
         return false;
     }
     array_splice($currencies, get_theme_mod('realia_currencies_other', 0) + 1);
     $result = '';
     if (!empty($currencies) && is_array($currencies)) {
         ksort($currencies);
         $currency_code = Realia_Currencies::get_current_currency_code();
         $result = '';
         ob_start();
         include Realia_Template_Loader::locate('misc/currencies');
         $result = ob_get_contents();
         ob_end_clean();
     }
     return $result;
 }
Esempio n. 2
1
function stormbringer_addthis()
{
    $addthis_id = get_theme_mod('addthis_id');
    if ($addthis_id) {
        wp_enqueue_script('addthis', '//s7.addthis.com/js/300/addthis_widget.js#pubid=' . $addthis_id, array(), null, true);
    }
}
Esempio n. 3
1
 /**
  * Get fonts URL.
  *
  * @return string
  */
 function educator_theme_fonts_url()
 {
     $fonts = array();
     $fonts[] = get_theme_mod('headings_font', 'Open Sans');
     $fonts[] = get_theme_mod('body_font', 'Open Sans');
     $font_families = array();
     $available_fonts = apply_filters('ib_theme_get_fonts', array());
     foreach ($fonts as $font_name) {
         if (isset($font_families[$font_name])) {
             continue;
         }
         if (isset($available_fonts[$font_name])) {
             $font = $available_fonts[$font_name];
             $font_families[$font_name] = urlencode($font_name);
             if (!empty($font['font_styles'])) {
                 $font_families[$font_name] .= ':' . $font['font_styles'];
             }
         }
     }
     if (empty($font_families)) {
         return false;
     }
     $query_args = array(array('family' => implode('|', $font_families)));
     $charater_sets = get_theme_mod('charater_sets', 'latin,latin-ext');
     if (!empty($charater_sets)) {
         $query_args['subset'] = educator_sanitize_character_sets($charater_sets);
     }
     return add_query_arg($query_args, '//fonts.googleapis.com/css');
 }
Esempio n. 4
1
/**
Configure custom theme options.
@param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
function zorkish_customize_register($wp_customize)
{
    // Improve display of title, description, and header text color during preview
    // https://developer.wordpress.org/themes/advanced-topics/customizer-api/#using-postmessage-for-improved-setting-previewing
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    // Add a custom Customizer section
    $wp_customize->add_section('custom_favicon', array('title' => __('Favicon'), 'description' => __('Set up your site\'s favicon.'), 'panel' => '', 'priority' => 160, 'capability' => 'edit_theme_options', 'theme_supports' => ''));
    // Create a setting + control for the site favicons setup
    $wp_customize->add_setting('favicon_links', array('default' => ''));
    $wp_customize->add_control('favicon_links', array('type' => 'textarea', 'priority' => 10, 'section' => 'custom_favicon', 'label' => __('Favicon Links'), 'description' => __('Add your favicon links here.'), 'input_attrs' => array('class' => 'my-custom-class-for-js', 'style' => 'border: 1px solid #900', 'placeholder' => __('Add your favicon links here.'))));
    create_color_setting($wp_customize, 'header_color', 'Header Color', '#232323');
    create_color_setting($wp_customize, 'footer_color', 'Footer Color', '#232323');
    create_color_setting($wp_customize, 'header_byline_color', 'Byline Color', '#DDAE4F');
    // Remember whether Jetpack Site Logo is present
    $site_logo_active = function_exists('jetpack_the_site_logo');
    // Add a section for site logo customization. This is in additions
    // to whatever Jetpack might add (if installed).
    $wp_customize->add_section('zorkish_logo_section', array('title' => __($site_logo_active ? 'Inner Logo' : 'Site Logo', 'zorkish'), 'priority' => 30, 'description' => $site_logo_active ? 'Specify a logo to use on inner pages' : 'Upload a logo to replace the default site name and description in the header'));
    // If Jetpack isn't installed, display the custom logo uploader.
    // ALSO display it if we have a 'zorkish-logo' theme mod, to handle
    // the user adding a custom logo and later installing Jetpack.
    if (!$site_logo_active || get_theme_mod('zorkish-logo')) {
        $wp_customize->add_setting('zorkish_logo');
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'zorkish_logo', array('label' => __('Logo', 'zorkish'), 'section' => 'zorkish_logo_section', 'settings' => 'zorkish_logo')));
    }
    // Add a setting for the site's inner logo
    $wp_customize->add_setting('zorkish_inner_logo');
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'zorkish_inner_logo', array('label' => __('Inner Logo', 'zorkish'), 'section' => 'zorkish_logo_section', 'settings' => 'zorkish_inner_logo')));
}
 function jaxlite_setting($id)
 {
     $jaxlite_setting = get_theme_mod($id);
     if (isset($jaxlite_setting)) {
         return $jaxlite_setting;
     }
 }
    /**
     * Shows the small info text on top header part
     */
    function colormag_render_header_image()
    {
        $header_image = get_header_image();
        if (!empty($header_image)) {
            if (get_theme_mod('colormag_header_image_link', 0) == 1) {
                ?>
		<a href="<?php 
                echo esc_url(home_url('/'));
                ?>
" title="<?php 
                echo esc_attr(get_bloginfo('name', 'display'));
                ?>
" rel="home">
		<?php 
            }
            ?>
		<div class="header-image-wrap"><img src="http://thevrforums.com/images/banner.png" class="header-image" width="<?php 
            echo get_custom_header()->width;
            ?>
" height="<?php 
            echo get_custom_header()->height;
            ?>
" alt="<?php 
            echo esc_attr(get_bloginfo('name', 'display'));
            ?>
"></div>
	<?php 
            if (get_theme_mod('colormag_header_image_link', 0) == 1) {
                ?>
		</a>
		<?php 
            }
        }
    }
Esempio n. 7
0
function vc_menu_func($atts, $content)
{
    ob_start();
    ?>
	<nav class="navbar navbar-default" id="menunav">
				<div class="container">
					<div class="row">
						<ul class="nav navbar-nav pull-right margin-right-15">
							<li class="dropdown resv-dropdown" id="ibe-dropdown">
								<a class="resv-link dropdown-toggle" href="#back-to-reserve" id="ibe-dropdown-button"><?php 
    echo esc_html(get_theme_mod('booking_button_text', esc_attr__('Reservations', 'Property Theme')));
    ?>
								</a>
							</li>
						</ul>

						<?php 
    if (has_nav_menu('primary_navigation')) {
        wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav navbar-nav navbar-right']);
    }
    ?>
					</div>
				</div>
			</nav>
	<?php 
    $returnvariable = ob_get_clean();
    return $returnvariable;
}
 function start_el(&$output, $item, $depth, $args)
 {
     global $wp_query;
     $indent = $depth ? str_repeat("\t", $depth) : '';
     $class_names = $value = '';
     $classes = empty($item->classes) ? array() : (array) $item->classes;
     if ($item->menu_order == 1) {
         $classes[] = 'firstmenuitem';
     }
     if ($item->ID == get_theme_mod('lastmenuitem')) {
         $classes[] = 'lastmenuitem';
     }
     $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item));
     $class_names = ' class="' . esc_attr($class_names) . '"';
     $output .= $indent . '<li id="menu-item-' . $item->ID . '"' . $value . $class_names . '>';
     $attributes = !empty($item->attr_title) ? ' title="' . esc_attr($item->attr_title) . '"' : '';
     $attributes .= !empty($item->target) ? ' target="' . esc_attr($item->target) . '"' : '';
     $attributes .= !empty($item->xfn) ? ' rel="' . esc_attr($item->xfn) . '"' : '';
     $attributes .= !empty($item->url) ? ' href="' . esc_attr($item->url) . '"' : '';
     $prepend = ' ';
     $append = ' ';
     //$prepend = '';
     // $append = '';
     $description = !empty($item->description) ? '<span>' . esc_attr($item->description) . '</span>' : '';
     if ($depth != 0) {
         $description = $append = $prepend = "";
     }
     $item_output = $args->before;
     $item_output .= '<a' . $attributes . '>';
     $item_output .= $args->link_before . $prepend . apply_filters('the_title', $item->title, $item->ID) . $append;
     $item_output .= $description . $args->link_after;
     $item_output .= '</a>';
     $item_output .= $args->after;
     $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
 }
    function check_directory_fields()
    {
        if (get_theme_mod('custom-submission', true) || get_option('jmfe_listify_directory_fields_notice')) {
            return false;
        }
        ?>
		<script type="text/javascript">
			jQuery( document ).ready( function ( $ ) {
				$('.jmfe-listify-dfd.notice.is-dismissible' ).on('click', '.notice-dismiss', function(e){
					$.post( ajaxurl, {
						'action': 'jmfe_listify_dfd',
						'nonce' : '<?php 
        echo wp_create_nonce("jmfe-listify-dfd");
        ?>
',
					}, function () {} );
				});
			} );
		</script>
		<div class="jmfe-listify-dfd notice is-dismissible update-nag">
            <?php 
        echo sprintf(__('When using <em>WP Job Manager Field Editor</em> with the <em>Listify</em> theme it is <strong>strongly</strong> recommended that you use/check/enable the <a href="%s" target="_blank">Directory Submission Fields</a>', 'wp-job-manager-field-editor'), 'http://listify.astoundify.com/article/238-enable-job-manager-submission-fields');
        ?>
        </div>
		<?php 
    }
function bg_photo_frame_js_params()
{
    $image_order = get_theme_mod("image_order", "in_order");
    $theme_color = get_theme_mod('theme_color', 'light');
    $image_opacity = get_theme_mod("image_opacity", "70") / 100;
    $contents_opacity = get_theme_mod("contents_opacity", "70") / 100;
    echo "\n";
    echo '<script type="text/javascript">//<![CDATA[';
    //Color
    echo "\n";
    echo "var themeColor = '" . $theme_color . "';";
    //Opacity
    echo "\n";
    echo "var imageOpacity = " . $image_opacity . ";";
    echo "\n";
    echo "var contentsOpacity = " . $contents_opacity . ";";
    //Order
    echo "\n";
    if ($image_order == 'in_order') {
        echo "var shuffle = false;";
    } else {
        echo "var shuffle = true;";
    }
    echo "//]]></script>";
    echo "\n";
}
Esempio n. 11
0
/**
 * Add custom-background body class before it's saved.
 *
 * @since  1.0.0
 * @return array
 */
function toivo_lite_add_custom_background_class($classes)
{
    if (!get_theme_mod('background_color')) {
        $classes[] = 'custom-background';
    }
    return $classes;
}
Esempio n. 12
0
 /**
  * Add our custom stylesheets and scripts
  */
 function scripts()
 {
     $options = get_option('maera_admin_options', array());
     $active_shell = isset($options['shell']) ? $options['shell'] : 'core';
     // Remove the default EDD styles
     wp_dequeue_style('edd-styles');
     // If EDD-Software-Specs is installed, remove its styles
     if (class_exists('EDD_Software_Specs')) {
         wp_dequeue_style('edd-software-specs');
         wp_deregister_style('edd-software-specs');
     }
     // Add our custom styles
     wp_register_style('maera-edd', trailingslashit(get_template_directory_uri()) . 'assets/css/edd/style.css');
     wp_enqueue_style('maera-edd');
     if ('isotope' == get_theme_mod('filter_mode', 'isotope') && (is_archive('download') || is_tax('download_tag') || is_tax('download_category'))) {
         // Register && Enqueue Isotope
         wp_register_script('maera_isotope', trailingslashit(get_template_directory_uri()) . 'assets/vendor/jquery.isotope.min.js', false, null, true);
         wp_enqueue_script('maera_isotope');
         // Register && Enqueue Isotope-Sloppy-Masonry
         wp_register_script('maera_isotope_sloppy_masonry', trailingslashit(get_template_directory_uri()) . 'assets/vendor/jquery.isotope.sloppy-masonry.min.js', false, null, true);
         wp_enqueue_script('maera_isotope_sloppy_masonry');
         wp_enqueue_script('edd_script', trailingslashit(get_template_directory_uri()) . 'assets/js/edd-scripts.js', false, null, true);
         // wp_localize_script( 'maera_foundation_script', 'maera_foundation_script_vars', array(
         //
         //     )
         // );
     }
 }
Esempio n. 13
0
 function __construct()
 {
     global $exclusive_special_id_for_db;
     add_action('customize_preview_init', array($this, 'web_bussines_customize_preview_js'));
     $this->colorcontrol = "Color Control";
     $this->shortcolorcontrol = $exclusive_special_id_for_db . "cc";
     $value_of_std[0] = get_theme_mod($this->shortcolorcontrol . "_menu_elem_back_color", '#000066');
     $value_of_std[1] = get_theme_mod($this->shortcolorcontrol . "_content_back_color", '#FFFFFF');
     $value_of_std[2] = get_theme_mod($this->shortcolorcontrol . "_sideb_background_color", '#bfd1e5');
     $value_of_std[3] = get_theme_mod($this->shortcolorcontrol . "_footer_back_color", '#bfd1e5');
     $value_of_std[4] = get_theme_mod($this->shortcolorcontrol . "_home_top_posts_color", '#ECECEC');
     $value_of_std[5] = get_theme_mod($this->shortcolorcontrol . "_top_posts_color", '#333399');
     $value_of_std[6] = get_theme_mod($this->shortcolorcontrol . "_text_headers_color", '#333399');
     $value_of_std[7] = get_theme_mod($this->shortcolorcontrol . "_primary_text_color", '#1f1f1f');
     $value_of_std[8] = get_theme_mod($this->shortcolorcontrol . "_footer_text_color", '#1f1f1f');
     $value_of_std[9] = get_theme_mod($this->shortcolorcontrol . "_primary_links_color", '#000000');
     $value_of_std[10] = get_theme_mod($this->shortcolorcontrol . "_primary_links_hover_color", '#000000');
     $value_of_std[11] = get_theme_mod($this->shortcolorcontrol . "_menu_links_color", '#FFFFFF');
     $value_of_std[12] = get_theme_mod($this->shortcolorcontrol . "_menu_links_hover_color", '#FFFFFF');
     $value_of_std[13] = get_theme_mod($this->shortcolorcontrol . "_menu_color", '#000066');
     $value_of_std[14] = get_theme_mod($this->shortcolorcontrol . "_selected_menu_color", '#000066');
     $value_of_std[15] = get_theme_mod($this->shortcolorcontrol . "_color_scheme", '#E0E0E0');
     $value_of_std[16] = get_theme_mod($this->shortcolorcontrol . "_logo_text_color", '#ffffff');
     $value_of_std[17] = get_theme_mod($this->shortcolorcontrol . "_logo_text_color_for_phone", '#000000');
     $this->options_colorcontrol = array("menu_elem_back_color" => array("name" => __("Menu Element Backround Color", "wd_exclusive"), "desc" => "", "var_name" => 'menu_elem_back_color', "id" => $this->shortcolorcontrol . "_menu_elem_back_color", "type" => "picker", "std" => $value_of_std[0]), "sideb_background_color" => array("name" => __("Sidebar Background Color", "wd_exclusive"), "desc" => "", "var_name" => 'sideb_background_color', "id" => $this->shortcolorcontrol . "_sideb_background_color", "type" => "picker", "std" => $value_of_std[2]), "footer_back_color" => array("name" => __("Footer Background Color", "wd_exclusive"), "desc" => "", "var_name" => 'footer_back_color', "id" => $this->shortcolorcontrol . "_footer_back_color", "type" => "picker", "std" => $value_of_std[3]), "home_top_posts_color" => array("name" => __("Featured Post Background Color", "wd_exclusive"), "desc" => "", "var_name" => 'home_top_posts_color', "id" => $this->shortcolorcontrol . "_home_top_posts_color", "type" => "picker", "std" => $value_of_std[4]), "top_posts_color" => array("name" => __("Top Posts Background Color", "wd_exclusive"), "desc" => "", "var_name" => 'top_posts_color', "id" => $this->shortcolorcontrol . "_top_posts_color", "type" => "picker", "std" => $value_of_std[5]), "text_headers_color" => array("name" => __("Header Text(&lt;h1&gt; etc) Color", "wd_exclusive"), "desc" => "", "var_name" => 'text_headers_color', "id" => $this->shortcolorcontrol . "_text_headers_color", "type" => "picker", "std" => $value_of_std[6]), "primary_text_color" => array("name" => __("Primary Text Corlor", "wd_exclusive"), "desc" => "", "var_name" => 'primary_text_color', "id" => $this->shortcolorcontrol . "_primary_text_color", "type" => "picker", "std" => $value_of_std[7]), "footer_text_color" => array("name" => __("Footer Text Color", "wd_exclusive"), "desc" => "", "var_name" => 'footer_text_color', "id" => $this->shortcolorcontrol . "_footer_text_color", "type" => "picker", "std" => $value_of_std[8]), "primary_links_color" => array("name" => __("Primary Links", "wd_exclusive"), "desc" => "", "var_name" => 'primary_links_color', "id" => $this->shortcolorcontrol . "_primary_links_color", "type" => "picker", "std" => $value_of_std[9]), "primary_links_hover_color" => array("name" => __("Primary Links Hover", "wd_exclusive"), "desc" => "", "var_name" => 'primary_links_hover_color', "id" => $this->shortcolorcontrol . "_primary_links_hover_color", "type" => "picker", "std" => $value_of_std[10]), "menu_links_color" => array("name" => __("Menu Links", "wd_exclusive"), "desc" => "", "var_name" => 'menu_links_color', "id" => $this->shortcolorcontrol . "_menu_links_color", "type" => "picker", "std" => $value_of_std[11]), "menu_links_hover_color" => array("name" => __("Menu Links Hover", "wd_exclusive"), "desc" => "", "var_name" => 'menu_links_hover_color', "id" => $this->shortcolorcontrol . "_menu_links_hover_color", "type" => "picker", "std" => $value_of_std[12]), "menu_color" => array("name" => __("Hover Menu Item", "wd_exclusive"), "desc" => "", "var_name" => 'menu_color', "id" => $this->shortcolorcontrol . "_menu_color", "type" => "picker", "std" => $value_of_std[13]), "selected_menu_color" => array("name" => __("Selected Menu Item", "wd_exclusive"), "desc" => "", "var_name" => 'selected_menu_color', "id" => $this->shortcolorcontrol . "_selected_menu_color", "type" => "picker", "std" => $value_of_std[14]), "color_scheme" => array("name" => " ", "var_name" => 'color_scheme', "id" => $this->shortcolorcontrol . "_color_scheme", "type" => "", "std" => $value_of_std[15]), "logo_text_color" => array("name" => __("Logo Text Color ", "wd_exclusive"), "desc" => "", "var_name" => 'logo_text_color', "id" => $this->shortcolorcontrol . "_logo_text_color", "type" => "picker", "std" => $value_of_std[16]), "logo_text_color_for_phone" => array("name" => __("Logo Text Color For Phone", "wd_exclusive"), "desc" => "", "var_name" => 'logo_text_color_for_phone', "id" => $this->shortcolorcontrol . "_logo_text_color_for_phone", "type" => "picker", "std" => $value_of_std[17]));
 }
Esempio n. 14
0
function ce_map_shortcode($atts)
{
    $address = 'New York';
    if (is_page_template("page-post-ad.php") && !isset($_GET['id']) && is_user_logged_in()) {
        global $user_ID;
        $address = get_user_meta($user_ID, 'et_address', true);
    }
    $default = array('w' => '100%', 'h' => '300px', 'lat' => '', 'lng' => '', 'zoom' => 20, 'address' => $address, 'is_single' => 0);
    $atts = wp_parse_args($atts, $default);
    extract($atts);
    $mininfy = get_theme_mod('ce_minify', 0);
    // if(!$mininfy) {
    wp_enqueue_script('ce-map-shorcode');
    wp_localize_script('ce-map-shorcode', 'map_short_code', $atts);
    // }
    // if (!is_page_template('page-post-ad.php')) {
    //     wp_enqueue_script('gmap');
    //     wp_enqueue_script('marker_cluster', plugin_dir_url(__FILE__) . '/js/marker-cluster.js', array(
    //         'gmap'
    //     ) , '1.0');
    //     wp_enqueue_style('map-style', plugin_dir_url(__FILE__) . '/css/map-front.css', true, CE_MAP_VER);
    // }
    $html = '<div id="map-shortcode" class="map-shortcode" style="width : ' . $w . '; heigth: ' . $h . '; margin-top:0px;">';
    $html .= '</div>';
    return $html;
}
Esempio n. 15
0
    /**
     * Display navigation to next/previous post when applicable.
     */
    function oceanic_post_nav()
    {
        // Don't print empty markup if there's nowhere to navigate.
        $previous = is_attachment() ? get_post(get_post()->post_parent) : get_adjacent_post(false, '', true);
        $next = get_adjacent_post(false, '', false);
        if (!$next && !$previous) {
            return;
        }
        ?>
	<nav class="navigation post-navigation" role="navigation">
		<h1 class="screen-reader-text"><?php 
        _e('Post navigation', 'oceanic');
        ?>
</h1>
		<div class="nav-links">
			<?php 
        $slider_cats = get_theme_mod('oceanic-slider-cats', false);
        $slider_cat_ids = array();
        if ($slider_cats) {
            $slider_cats = explode(',', esc_html($slider_cats));
            for ($i = 0; $i < count($slider_cats); ++$i) {
                $cat_id = get_cat_ID($slider_cats[$i]);
                if ($cat_id > 0) {
                    $slider_cat_ids[$i] = $cat_id;
                }
            }
        }
        previous_post_link('<div class="nav-previous">%link</div>', _x('<span class="meta-nav">&larr;</span>&nbsp;%title', 'Previous post link', 'oceanic'), false, $slider_cat_ids);
        next_post_link('<div class="nav-next">%link</div>', _x('%title&nbsp;<span class="meta-nav">&rarr;</span>', 'Next post link', 'oceanic'), false, $slider_cat_ids);
        ?>
		</div><!-- .nav-links -->
	</nav><!-- .navigation -->
	<?php 
    }
Esempio n. 16
0
/**
 * Add custom styles using the primary color to header.
 *
 * @since  1.0.0
 * @access public
 * @return string
 */
function yarn_custom_styles()
{
    $hex = get_theme_mod('color_primary', '');
    $rgb = join(', ', hybrid_hex_to_rgb($hex));
    $output = "<style>\n \t\t\t\t.more-link { background-color: rgba( {$rgb}, 0.75); }\n \t\t\t\t.plural .format-link, .plural .entry.format-link > .wrap { background-color: #{$hex}; }\n \t\t\t\t</style>";
    echo $output;
}
 public function custom_css_code(Pojo_Create_CSS_Code $css_code)
 {
     $bg_color = get_theme_mod('a11y_toggle_button_bg_color', '#4054b2');
     if (!empty($bg_color)) {
         $css_code->add_value('#pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a', 'background-color', $bg_color);
         $css_code->add_value('#pojo-a11y-toolbar .pojo-a11y-toolbar-overlay, #pojo-a11y-toolbar .pojo-a11y-toolbar-overlay ul.pojo-a11y-toolbar-items.pojo-a11y-links', 'border-color', $bg_color);
     }
     $outline_style = get_theme_mod('a11y_focus_outline_style', 'solid');
     if (!empty($outline_style)) {
         $css_code->add_value('body.pojo-a11y-focusable a:focus', 'outline-style', $outline_style . ' !important');
     }
     $outline_width = get_theme_mod('a11y_focus_outline_width', '1px');
     if (!empty($outline_width)) {
         $css_code->add_value('body.pojo-a11y-focusable a:focus', 'outline-width', $outline_width . ' !important');
     }
     $outline_color = get_theme_mod('a11y_focus_outline_color', '#FF0000');
     if (!empty($outline_color)) {
         $css_code->add_value('body.pojo-a11y-focusable a:focus', 'outline-color', $outline_color . ' !important');
     }
     $distance_top = get_theme_mod('a11y_toolbar_distance_top', '100px');
     if (!empty($distance_top)) {
         $css_code->add_value('#pojo-a11y-toolbar', 'top', $distance_top . ' !important');
     }
     $distance_top_mobile = get_theme_mod('a11y_toolbar_distance_top_mobile', '50px');
     if (!empty($distance_top_mobile)) {
         $css_code->add_data("@media (max-height: 600px) { #pojo-a11y-toolbar { top: {$distance_top_mobile} !important } }");
     }
 }
function my_login_logo()
{
    $logo_image_url = get_theme_mod('coursepress_logo');
    ?>
    <style type="text/css">
        #login {
            background-image: url(<?php 
    echo $logo_image_url;
    ?>
);
			background-size: 100%;
   			background-repeat: no-repeat;
        }
		.login h1 a {
            background-image: url();
            padding-bottom: 30px;
			 -webkit-background-size: 0px;
			background-size: 0px;
			height: 100px;
			line-height: 0em;
			margin: 0;
			padding: 0;
			outline: 0;
			display: block;
        }
		
		body {
    background-color:;
	background-image: url();
		}		
    </style>
<?php 
}
 function __construct()
 {
     global $exclusive_special_id_for_db, $exclusive_web_dor;
     /// initial params
     $this->generalsettings = "General Settings";
     $this->shortgeneralsettings = $exclusive_special_id_for_db . "";
     /// get options from data base
     $value_of_std[0] = get_theme_mod($this->shortgeneralsettings . "_logo_img", '');
     $value_of_std[1] = get_theme_mod($this->shortgeneralsettings . "_body_back", '');
     $value_of_std[2] = get_theme_mod($this->shortgeneralsettings . "_custom_css", '');
     $value_of_std[3] = get_theme_mod($this->shortgeneralsettings . "_favicon_img", '');
     $value_of_std[4] = get_theme_mod($this->shortgeneralsettings . "_blog_style", '');
     $value_of_std[5] = get_theme_mod($this->shortgeneralsettings . "_grab_image", '');
     $value_of_std[6] = get_theme_mod($this->shortgeneralsettings . "_show_twitter_icon", 'on');
     $value_of_std[7] = get_theme_mod($this->shortgeneralsettings . "_show_rss_icon", 'on');
     $value_of_std[8] = get_theme_mod($this->shortgeneralsettings . "_show_facebook_icon", 'on');
     $value_of_std[9] = get_theme_mod($this->shortgeneralsettings . "_twitter_url", '');
     $value_of_std[10] = get_theme_mod($this->shortgeneralsettings . "_rss_url", '');
     $value_of_std[11] = get_theme_mod($this->shortgeneralsettings . "_facebook_url", '');
     $value_of_std[12] = get_theme_mod($this->shortgeneralsettings . "_our_style", '');
     $value_of_std[13] = get_theme_mod($this->shortgeneralsettings . "_menu_search_form", '');
     $value_of_std[14] = get_theme_mod($this->shortgeneralsettings . "_post_header", '');
     $value_of_std[15] = get_theme_mod($this->shortgeneralsettings . "_favicon_enable", '');
     $value_of_std[16] = get_theme_mod($this->shortgeneralsettings . "_date_enable", 'on');
     $value_of_std[17] = get_theme_mod($this->shortgeneralsettings . "_footer_text", '<span id="copyright">WordPress Themes by <a href="' . $exclusive_web_dor . '/wordpress-themes/exclusive.html"  target="_blank" title="Web-Dorado">Web-Dorado</a></span>');
     $this->options_generalsettings = array('logo_img' => array("name" => __("Logo", "exclusive"), "sanitize_type" => "esc_url_raw", "description" => __("You can apply a custom logo image by clicking on the Upload Image button and uploading your image.", "exclusive"), "var_name" => "logo_img", "id" => $this->shortgeneralsettings . "_logo_img", "std" => $value_of_std[0]), 'body_back' => array("name" => __("General Settings", "exclusive"), "description" => "", "var_name" => "body_back", "id" => $this->shortgeneralsettings . "_body_back", "std" => $value_of_std[1]), 'custom_css' => array("name" => __("Custom CSS", "exclusive"), "description" => __("Custom CSS will change the visual style of the site. This CSS code will be inserted in the &lt;head&gt; tag of your site. You can provide custom CSS code to be applied to specific elements.", "exclusive"), "var_name" => "custom_css", "sanitize_type" => "wp_strip_all_tags", "id" => $this->shortgeneralsettings . "_custom_css", "std" => $value_of_std[2]), 'favicon_img' => array("name" => "", "sanitize_type" => "esc_url_raw", "description" => __("You can apply a custom favicon image by clicking on the Upload Image button and uploading your image.", "exclusive"), "var_name" => "favicon_img", "id" => $this->shortgeneralsettings . "_favicon_img", "std" => $value_of_std[3]), 'blog_style' => array("name" => __("Blog Style Post Format", "exclusive"), "description" => __("Here you can choose to change the format of your index/homepage posts and view them as short post previews.", "exclusive"), "var_name" => "blog_style", "id" => $this->shortgeneralsettings . "_blog_style", "std" => $value_of_std[4]), 'grab_image' => array("name" => __("Grab the First Post Image", "exclusive"), "description" => __("Enable this option if you want to use the images that are already in your post to create a thumbnail without using custom fields. In this case thumbnail images will be generated automatically using the first added image of the post. Note that the image needs to be hosted on your own server.", "exclusive"), "var_name" => "grab_image", "id" => $this->shortgeneralsettings . "_grab_image", "std" => $value_of_std[5]), 'show_twitter_icon' => array("name" => __("Show Twitter Icon", "exclusive"), "description" => __("Here you can choose to show the Twitter Icon.", "exclusive"), "var_name" => "show_twitter_icon", "id" => $this->shortgeneralsettings . "_show_twitter_icon", "std" => $value_of_std[6]), 'show_rss_icon' => array("name" => __("Show RSS Icon", "exclusive"), "description" => __("Here you can choose to show the RSS Icon.", "exclusive"), "var_name" => "show_rss_icon", "id" => $this->shortgeneralsettings . "_show_rss_icon", "std" => $value_of_std[7]), 'show_facebook_icon' => array("name" => __("Show Facebook Icon", "exclusive"), "description" => __("Here you can choose to show the Facebook Icon.", "exclusive"), "var_name" => "show_facebook_icon", "id" => $this->shortgeneralsettings . "_show_facebook_icon", "std" => $value_of_std[8]), 'twitter_url' => array("name" => "", "sanitize_type" => "esc_url_raw", "description" => __("Enter your Twitter Profile URL below.", "exclusive"), "var_name" => "twitter_url", "id" => $this->shortgeneralsettings . "_twitter_url", "std" => $value_of_std[9]), 'rss_url' => array("name" => "", "sanitize_type" => "esc_url_raw", "description" => __("Enter your RSS URL below.", "exclusive"), "var_name" => "rss_url", "id" => $this->shortgeneralsettings . "_rss_url", "std" => $value_of_std[10]), 'facebook_url' => array("name" => "", "sanitize_type" => "esc_url_raw", "description" => __("Enter your Facebook Profile URL below.", "exclusive"), "var_name" => "facebook_url", "id" => $this->shortgeneralsettings . "_facebook_url", "std" => $value_of_std[11]), 'our_style' => array("name" => __("General Settings", "exclusive"), "description" => "", "var_name" => "our_style", "id" => $this->shortgeneralsettings . "_our_style", "std" => $value_of_std[12]), 'menu_search_form' => array("name" => __("General Settings", "exclusive"), "description" => "", "var_name" => "menu_search_form", "id" => $this->shortgeneralsettings . "_menu_search_form", "std" => $value_of_std[13]), 'post_header' => array("name" => __("General Settings", "exclusive"), "description" => "", "var_name" => "post_header", "id" => $this->shortgeneralsettings . "_post_header", "std" => $value_of_std[14]), 'favicon_enable' => array("name" => __("Show Favicon", "exclusive"), "description" => __("Check the box to show favicon on the site. You can add custom favicon to your homepage. Press &#34;Upload image&#34; button and choose the corresponding file if the box is checked. By default favicon is a 16 x 16 pixel file saved in favicon.ico format in root directory of the server.", "exclusive"), "var_name" => "favicon_enable", "id" => $this->shortgeneralsettings . "_favicon_enable", "std" => $value_of_std[15]), 'date_enable' => array("name" => __("Display Date to the Posts", "exclusive"), "description" => __("Choose to display date in posts whether or not.", "exclusive"), "var_name" => "date_enable", "id" => $this->shortgeneralsettings . "_date_enable", "std" => $value_of_std[16]), 'footer_text' => array("name" => __("Information in the Footer", "exclusive"), "description" => __("Here you can provide the HTML code to be inserted in the footer of your web site.", "exclusive"), "var_name" => "footer_text", "sanitize_type" => "wp_filter_kses", "id" => $this->shortgeneralsettings . "_footer_text", "std" => $value_of_std[17]));
 }
Esempio n. 20
0
    /**
     * Styles the header image and text displayed on the blog
     *
     * @see store_custom_header_setup().
     */
    function store_header_style()
    {
        ?>
	<style>
	#masthead {
			background-image: url(<?php 
        header_image();
        ?>
);
			background-size: <?php 
        echo get_theme_mod('store_himg_style', 'cover');
        ?>
;
			background-position-x: <?php 
        echo get_theme_mod('store_himg_align', 'center');
        ?>
;
			background-repeat: <?php 
        echo get_theme_mod('store_himg_repeat') ? "repeat" : "no-repeat";
        ?>
;
		}
	</style>	
	<?php 
    }
Esempio n. 21
0
function lifestyle_banner()
{
    ?>
	<div class="banner">
		<div class="wrap">
			<?php 
    if (is_front_page()) {
        lifestyle_get_home_banner();
    } elseif (!is_front_page() && get_theme_mod('lifestyle_header_home')) {
        echo '';
    } else {
        // get title
        $id = get_option('page_for_posts');
        if (is_home() || is_singular('post')) {
            if (has_post_thumbnail($id)) {
                echo get_the_post_thumbnail($id, 'full');
            }
        } elseif (has_post_thumbnail() && is_singular('page')) {
            the_post_thumbnail();
        }
    }
    ?>
		</div><!-- .wrap -->
  	</div><!-- .banner -->
<?php 
}
Esempio n. 22
0
 function get_sections($type = false)
 {
     global $editor_sections_data;
     // check the global 1st, we dont want to use an option if we cant help it.
     if (is_array($editor_sections_data) && !empty($editor_sections_data)) {
         if ($type && isset($editor_sections_data[$type])) {
             return $editor_sections_data[$type];
         } else {
             return $editor_sections_data;
         }
     }
     $data = get_theme_mod('editor-sections-data');
     // if no data is stored, it was either reset or never created
     if (!is_array($data) || empty($data)) {
         $data = $this->generate_data();
         $this->save_sections($data);
     }
     $editor_sections_data = $data;
     // by now we are sure to have an array even if its empty
     if ($type && isset($data[$type])) {
         return $data[$type];
     } else {
         return $data;
     }
 }
Esempio n. 23
0
/**
 * Custom logo
 */
function fastnews_light_customize_logo()
{
    $custom_styles = '';
    /* Logo */
    $logo_margin_top = get_theme_mod('logo_margin_top', '');
    $logo_margin_left = get_theme_mod('logo_margin_left', '');
    $logo_margin = '';
    if ($logo_margin_top) {
        $logo_margin .= "margin-top:{$logo_margin_top}px;";
    }
    if ($logo_margin_left) {
        $logo_margin .= "margin-left:{$logo_margin_left}px;";
    }
    if ($logo_margin) {
        $custom_styles .= ".kopa-logo { {$logo_margin} }";
    }
    /* Logo navigation */
    $logo_nav_margin_top = get_theme_mod('logo_nav_margin_top', '');
    $logo_nav_margin_left = get_theme_mod('logo_nav_margin_left', '');
    $logo_nav_margin = '';
    if ($logo_nav_margin_top) {
        $logo_nav_margin .= "margin-top:{$logo_nav_margin_top}px;";
    }
    if ($logo_nav_margin_left) {
        $logo_nav_margin .= "margin-left:{$logo_nav_margin_left}px;";
    }
    if ($logo_nav_margin) {
        $custom_styles .= ".nav-bar .kopa-logo { {$logo_nav_margin} }";
    }
    /* ==================================================================================================
     * Theme Options custom styles
     * ================================================================================================= */
    wp_add_inline_style('kopa-style', $custom_styles);
}
Esempio n. 24
0
function ds_add_top_header()
{
    $enable_header_top = esc_attr(get_theme_mod('dt_enable_header_top', DT_ENABLE_HEADER_TOP));
    if ($enable_header_top != '1') {
        return;
    }
    ?>
    <div class="ds-top-header">
        <div class="container">
            <div class="ds-top-header-inner">
                <div class="ds-top-head-left">
                    <?php 
    if (display_header_text()) {
        echo get_bloginfo('description', 'display');
    }
    ?>
                </div>
                <div class="ds-top-head-right">
                    <?php 
    wp_nav_menu(array('theme_location' => 'header-top', 'container_class' => 'header_top_menu', 'menu_class' => 'ds-top-menu-ul'));
    ?>
                </div>
            </div>
        </div>
    </div>
    <?php 
}
Esempio n. 25
0
 /**
  * Class Constructor
  */
 public function __construct()
 {
     // Initialize object variables
     $this->post = isset($GLOBALS['post']) ? $GLOBALS['post'] : null;
     // Setup default array for changeable variables
     $defaults = array('home_prefix' => get_theme_mod('pixova_lite_blog_breadcrumb_menu_prefix', __('Przeglądasz', 'pixova-lite')), 'separator' => get_theme_mod('pixova_lite_blog_breadcrumb_menu_separator', 'rarr'), 'show_post_type_archive' => '1', 'show_terms' => get_theme_mod('pixova_lite_blog_breadcrumb_menu_post_category', 1), 'home_label' => esc_html__('Home', 'pixova-lite'), 'tag_archive_prefix' => esc_html__('Tag:', 'pixova-lite'), 'search_prefix' => esc_html__('Search:', 'pixova-lite'), 'error_prefix' => esc_html__('404 - Page not Found', 'pixova-lite'));
     // Setup a filter for changeable variables and meger it with the defaults
     $args = apply_filters('pixova_lite_breadcrumbs_defaults', $defaults);
     $defaults = wp_parse_args($args, $defaults);
     $this->home_prefix = $defaults['home_prefix'];
     $this->separator = $defaults['separator'];
     $this->show_post_type_archive = $defaults['show_post_type_archive'];
     $this->show_terms = $defaults['show_terms'];
     $this->home_label = $defaults['home_label'];
     $this->tag_archive_prefix = $defaults['tag_archive_prefix'];
     $this->search_prefix = $defaults['search_prefix'];
     $this->error_prefix = $defaults['error_prefix'];
     // Set separator
     if ($this->separator == 'rarr') {
         $this->separator = '&rarr;';
     } else {
         if ($this->separator == 'middot') {
             $this->separator = '&middot;';
         } else {
             if ($this->separator == 'diez') {
                 $this->separator = '&#35;';
             } else {
                 if ($this->separator == 'ampersand') {
                     $this->separator = '&#38;';
                 }
             }
         }
     }
 }
Esempio n. 26
0
 function wpex_toggle_bar_btn()
 {
     if (!wpex_toggle_bar_active()) {
         return;
     }
     echo '<a href="#" class="toggle-bar-btn fade-toggle ' . get_theme_mod('toggle_bar_visibility') . '"><span class="fa fa-plus"></span></a>';
 }
function mf2012_custom_header_options()
{
    $defaults = mf2012_header_button_defaults();
    ?>
<h3>That big blue button</h3>
<table class="form-table">
	<tbody>
		<tr valign="top">
			<th scope="row"><?php 
    _e('Label (leave empty to remove the button):');
    ?>
</th>
			<td><p><input type="text" name="mf2012_header_button_label" value="<?php 
    echo esc_attr(get_theme_mod('mf2012_header_button_label', $defaults->label));
    ?>
"></p></td>
		</tr>
		<tr valign="top" class="hide-if-no-js">
			<th scope="row"><?php 
    _e('Target:');
    ?>
</th>
			<td><p><input type="text" name="mf2012_header_button_target" value="<?php 
    echo esc_attr(get_theme_mod('mf2012_header_button_target', $defaults->target));
    ?>
"></p></td>
		</tr>
	</tbody>
</table>
<?php 
}
Esempio n. 28
0
function aaron_highlights()
{
    /* 
    * Frontpage Highlights
    */
    if (get_theme_mod('aaron_hide_highlight') == "") {
        for ($i = 1; $i < 10; $i++) {
            if (get_theme_mod('aaron_highlight' . $i . '_headline') or get_theme_mod('aaron_highlight' . $i . '_text') or get_theme_mod('aaron_highlight' . $i . '_icon') and get_theme_mod('aaron_highlight' . $i . '_icon') != "no-icon" or get_theme_mod('aaron_highlight' . $i . '_image')) {
                echo '<div class="highlights" style="background:' . get_theme_mod('aaron_highlight' . $i . '_bgcolor', '#fafafa') . ';">';
                if (get_theme_mod('aaron_highlight' . $i . '_icon') != "" and get_theme_mod('aaron_highlight' . $i . '_icon') != "no-icon" and get_theme_mod('aaron_highlight' . $i . '_image') == "") {
                    echo '<i aria-hidden="true" class="dashicons ' . esc_attr(get_theme_mod('aaron_highlight' . $i . '_icon')) . '"  style="color:' . get_theme_mod('aaron_highlight' . $i . '_textcolor', '#333333') . ';"></i>';
                }
                if (get_theme_mod('aaron_highlight' . $i . '_image') != "") {
                    echo '<img src="' . esc_url(get_theme_mod('aaron_highlight' . $i . '_image')) . '">';
                }
                if (get_theme_mod('aaron_highlight' . $i . '_link') != "") {
                    echo '<a href="' . esc_url(get_theme_mod('aaron_highlight' . $i . '_link')) . '">';
                }
                if (get_theme_mod('aaron_highlight' . $i . '_headline') != "") {
                    echo '<h2 style="color:' . get_theme_mod('aaron_highlight' . $i . '_textcolor', '#333333') . ';">' . esc_html(get_theme_mod('aaron_highlight' . $i . '_headline')) . '</h2>';
                }
                if (get_theme_mod('aaron_highlight' . $i . '_text') != "") {
                    echo '<p style="color:' . get_theme_mod('aaron_highlight' . $i . '_textcolor', '#333333') . ';">' . esc_html(get_theme_mod('aaron_highlight' . $i . '_text')) . '</p>';
                }
                if (get_theme_mod('aaron_highlight' . $i . '_link') != "") {
                    echo '</a>';
                }
                echo '</div>';
            }
        }
    }
}
Esempio n. 29
-1
/**
 * Print customizer css.
 */
function acedemica_customizer_display_css()
{
    $styles = array();
    if ('#0a5794' != ($header_background_color = get_theme_mod('header-background-color', '#0a5794'))) {
        $styles[] = array('selectors' => '#header', 'declarations' => array('background-color' => $header_background_color));
    }
    if (empty($styles)) {
        return;
    }
    ?>

    <style type="text/css">

        <?php 
    foreach ($styles as $rule) {
        echo $rule['selectors'] . ' {';
        foreach ($rule['declarations'] as $property => $value) {
            echo "{$property}:{$value};\n";
        }
        echo '}';
    }
    ?>

    </style>

    <?php 
}
function ajax_contact_form()
{
    $response = array();
    $navn = isset($_POST['navn']) ? wp_strip_all_tags($_POST['navn']) : false;
    $email = isset($_POST['email']) ? wp_strip_all_tags($_POST['email']) : false;
    $firma = isset($_POST['firma']) ? wp_strip_all_tags($_POST['firma']) : false;
    $telefon = isset($_POST['telefon']) ? wp_strip_all_tags($_POST['telefon']) : false;
    $about = isset($_POST['about']) ? wp_strip_all_tags($_POST['about']) : false;
    $kommentar = isset($_POST['kommentar']) ? esc_textarea($_POST['kommentar']) : false;
    if (!$navn) {
        $response['error'] = 'Indtast et navn';
    } else {
        if (!$email) {
            $response['error'] = 'Indtast en email';
        }
    }
    if (!isset($response['error'])) {
        $post_vars = array('post_title' => $navn . ' [' . $email . ']', 'post_status' => 'publish', 'post_type' => 'form');
        $response['post_id'] = wp_insert_post($post_vars, true);
        if (is_wp_error($response['post_id'])) {
            $response['error'] = $return->get_error_message();
        }
    }
    if (!isset($response['error'])) {
        update_post_meta($response['post_id'], 'form_navn', $navn);
        update_post_meta($response['post_id'], 'form_email', $email);
        update_post_meta($response['post_id'], 'form_firma', $firma);
        update_post_meta($response['post_id'], 'form_telefon', $telefon);
        update_post_meta($response['post_id'], 'form_about', $about);
        update_post_meta($response['post_id'], 'form_kommentar', $kommentar);
        $response['success'] = '<article><h2>Tak for din henvendelse</h2><p>Vi vil besvare den hurtigst muligt.</p><article>';
        sendEmail(get_theme_mod('info_name'), get_theme_mod('info_email'), get_theme_mod('info_email'), 'Ny henvendelse fra ' . $navn, $kommentar);
    }
    wp_die(json_encode($response));
}