get_option() public static méthode

Get the value of an option from the db.
public static get_option ( string $config_id = '', string $field_id = '' ) : mixed
$config_id string The ID of the configuration corresponding to this field.
$field_id string The field_id (defined as 'settings' in the field arguments).
Résultat mixed The saved value of the field.
Exemple #1
0
/**
 * Adds custom classes to the array of body classes.
 * ================================================
 *
 * @param array $classes Classes for the body element.
 *
 * @return array
 */
function tm_polygon_body_classes($classes)
{
    // Adds a class of group-blog to blogs with more than 1 published author.
    if (is_multi_author()) {
        $classes[] = 'group-blog';
    }
    global $tm_polygon_custom_class;
    if ($tm_polygon_custom_class) {
        $classes[] = $tm_polygon_custom_class;
    }
    if (Kirki::get_option('tm-polygon', 'site_general_boxed') == 1) {
        $classes[] = 'boxed';
    }
    $classes[] = Kirki::get_option('tm-polygon', 'header_type');
    global $tm_polygon_page_layout_private;
    if ($tm_polygon_page_layout_private != 'default' && class_exists('cmb2_bootstrap_205')) {
        $tm_polygon_layout = get_post_meta(get_the_ID(), "tm_polygon_page_layout_private", true);
    } else {
        $tm_polygon_layout = Kirki::get_option('tm-polygon', 'page_layout');
    }
    $classes[] = $tm_polygon_layout;
    if (defined('TM_CORE_VERSION')) {
        $classes[] = 'core_' . str_replace(".", "", TM_CORE_VERSION);
    }
    return $classes;
}
Exemple #2
0
 /**
  * The class constructor.
  *
  * @var 	string		the setting ID.
  * @var 	string		theme_mod / option
  * @var 	array 		an array of arrays of the output arguments.
  * @var 	mixed		a callable function.
  */
 public static function css($field)
 {
     /**
      * Make sure the field is sanitized before proceeding any further.
      */
     $field = Kirki_Field::sanitize_field($field);
     /**
      * Get the config ID used in the Kirki class.
      */
     $config_id = Kirki::get_config_id($field);
     /**
      * Set class vars
      */
     self::$settings = $field['settings'];
     self::$output = $field['output'];
     self::$callback = $field['sanitize_callback'];
     /**
      * Get the value of this field
      */
     if ('option' == Kirki::$config[$config_id]['option_type'] && '' != Kirki::$config[$config_id]['option_name']) {
         self::$value = Kirki::get_option($config_id, str_replace(array(']', Kirki::$config[$config_id]['option_name'] . '['), '', $field['settings']));
     } else {
         self::$value = Kirki::get_option($config_id, $field['settings']);
     }
     /**
      * Returns the styles
      */
     if (!is_array(self::$value)) {
         return self::styles();
     }
 }
Exemple #3
0
function infinity_js_custom_code()
{
    ?>
  <?php 
    if (Kirki::get_option('infinity', 'custom_js_enable') == 1) {
        ?>
    <?php 
        echo html_entity_decode(Kirki::get_option('infinity', 'custom_js'));
        ?>
  <?php 
    }
    ?>
  <?php 
    if (Kirki::get_option('infinity', 'nav_sticky_enable') == 1 && has_nav_menu('primary')) {
        ?>
    <?php 
        if (Kirki::get_option('infinity', 'header_type') == 'header03' || Kirki::get_option('infinity', 'header_type') == 'header04') {
            ?>
      <script>
        jQuery(document).ready(function ($) {
          $(".header").headroom(
            {
              offset: 52
            }
          );
        });
      </script>
    <?php 
        } else {
            ?>
      <script>
        jQuery(document).ready(function ($) {
          $("#site-navigation").headroom(
            {
              offset: 160
            }
          );
        });
      </script>
    <?php 
        }
        ?>
  <?php 
    }
}
Exemple #4
0
function tm_polygon_js_custom_code()
{
    ?>
	<?php 
    if (Kirki::get_option('tm-polygon', 'custom_js_enable') == 1) {
        ?>
		<?php 
        echo html_entity_decode(Kirki::get_option('tm-polygon', 'custom_js'));
        ?>
	<?php 
    }
    ?>
	<?php 
    if (Kirki::get_option('tm-polygon', 'nav_sticky_enable') == 1 && has_nav_menu('primary')) {
        ?>
		<?php 
        if (Kirki::get_option('tm-polygon', 'header_type') == 'header02' || Kirki::get_option('tm-polygon', 'header_type') == 'header04') {
            ?>
			<script>
				jQuery(document).ready(function ($) {
					$(".sticky-menu").headroom(
						{
							offset: $(".site-top").innerHeight(),
						}
					);
				});
			</script>
		<?php 
        } else {
            ?>
			<script>
				jQuery(document).ready(function ($) {
					$(".sticky-menu").headroom(
						{
							offset: 0
						}
					);
				});
			</script>
		<?php 
        }
        ?>
	<?php 
    }
}
 public function test()
 {
     $this->assertEquals(kirki_get_option(), Kirki::get_option());
     $this->assertEquals(kirki_sanitize_hex('#ffffff'), Kirki_Color::sanitize_hex('#ffffff'));
     $this->assertEquals(kirki_get_rgb('#ffffff'), Kirki_Color::get_rgb('#ffffff'));
     $this->assertEquals(kirki_get_rgba('#ffffff'), Kirki_Color::get_rgba('#ffffff'));
     $this->assertEquals(kirki_get_brightness('#ffffff'), Kirki_Color::get_brightness('#ffffff'));
     $font_registry = Kirki_Toolkit::fonts();
     $this->assertEquals(Kirki_Fonts::get_all_fonts(), $font_registry->get_all_fonts());
     $this->assertEquals(Kirki_Fonts::get_font_choices(), $font_registry->get_font_choices());
     $this->assertEquals(Kirki_Fonts::is_google_font('foo'), $font_registry->is_google_font('foo'));
     $this->assertEquals(Kirki_Fonts::get_google_font_uri(array('foo')), $font_registry->get_google_font_uri(array('foo')));
     $this->assertEquals(Kirki_Fonts::get_google_font_subsets(), $font_registry->get_google_font_subsets());
     $this->assertEquals(Kirki_Fonts::choose_google_font_variants('Roboto'), $font_registry->choose_google_font_variants('Roboto'));
     $this->assertEquals(Kirki_Fonts::get_standard_fonts(), $font_registry->get_standard_fonts());
     $this->assertEquals(Kirki_Fonts::get_font_stack('foo'), $font_registry->get_font_stack('foo'));
     $this->assertEquals(Kirki_Fonts::sanitize_font_choice('foo'), $font_registry->sanitize_font_choice('foo'));
     $this->assertEquals(Kirki_Fonts::get_google_fonts(), $font_registry->get_google_fonts());
 }
Exemple #6
0
/**
 * Adds custom classes to the array of body classes.
 * ================================================
 * @param array $classes Classes for the body element.
 * @return array
 */
function infinity_body_classes($classes)
{
    // Adds a class of group-blog to blogs with more than 1 published author.
    if (is_multi_author()) {
        $classes[] = 'group-blog';
    }
    global $infinity_custom_class;
    if ($infinity_custom_class) {
        $classes[] = $infinity_custom_class;
    }
    if (Kirki::get_option('infinity', 'site_general_boxed') == 1) {
        $classes[] = 'boxed';
    }
    $classes[] = Kirki::get_option('infinity', 'header_type');
    global $infinity_page_layout_private;
    if ($infinity_page_layout_private != 'default' && class_exists('cmb2_bootstrap_205')) {
        $layout = get_post_meta(get_the_ID(), "infinity_page_layout_private", true);
    } else {
        $layout = Kirki::get_option('infinity', 'page_layout');
    }
    $classes[] = $layout;
    return $classes;
}
Exemple #7
0
 /**
  * Build the variables.
  *
  * @return array 	('variable-name' => value)
  */
 public function get_variables()
 {
     $variables = array();
     /**
      * Loop through all fields
      */
     foreach (Kirki::$fields as $field) {
         /**
          * Check if we have variables for this field
          */
         if (isset($field['variables']) && false != $field['variables'] && !empty($field['variables'])) {
             /**
              * Loop through the array of variables
              */
             foreach ($field['variables'] as $field_variable) {
                 /**
                  * Is the variable ['name'] defined?
                  * If yes, then we can proceed.
                  */
                 if (isset($field_variable['name'])) {
                     /**
                      * Sanitize the variable name
                      */
                     $variable_name = esc_attr($field_variable['name']);
                     /**
                      * Do we have a callback function defined?
                      * If not then set $variable_callback to false.
                      */
                     $variable_callback = isset($field_variable['callback']) && is_callable($field_variable['callback']) ? $field_variable['callback'] : false;
                     /**
                      * If we have a variable_callback defined then get the value of the option
                      * and run it through the callback function.
                      * If no callback is defined (false) then just get the value.
                      */
                     if ($variable_callback) {
                         $variables[$variable_name] = call_user_func($field_variable['callback'], Kirki::get_option(Kirki_Field_Sanitize::sanitize_settings($field)));
                     } else {
                         $variables[$variable_name] = Kirki::get_option($field['settings']);
                     }
                 }
             }
         }
     }
     /**
      * Pass the variables through a filter ('kirki/variable')
      * and return the array of variables
      */
     return apply_filters('kirki/variable', $variables);
 }
Exemple #8
0
/**
 * Custom social network icon links
 */
function flatbook_social_icons()
{
    $socials = array(array('name' => __('Facebook', 'flatbook'), 'link' => Kirki::get_option('fb', 'facebook_url'), 'icon' => 'fa-facebook-square'), array('name' => __('Twitter', 'flatbook'), 'link' => Kirki::get_option('fb', 'twitter_url'), 'icon' => 'fa-twitter-square'), array('name' => __('LinkedIn', 'flatbook'), 'link' => Kirki::get_option('fb', 'linkedin_url'), 'icon' => 'fa-linkedin-square'), array('name' => __('Dribbble', 'flatbook'), 'link' => Kirki::get_option('fb', 'dribbble_url'), 'icon' => 'fa-dribbble'), array('name' => __('Vimeo', 'flatbook'), 'link' => Kirki::get_option('fb', 'vimeo_url'), 'icon' => 'fa-vimeo-square'), array('name' => __('Flickr', 'flatbook'), 'link' => Kirki::get_option('fb', 'flickr_url'), 'icon' => 'fa-flickr'), array('name' => __('Instagram', 'flatbook'), 'link' => Kirki::get_option('fb', 'instagram_url'), 'icon' => 'fa-instagram'), array('name' => __('Pinterest', 'flatbook'), 'link' => Kirki::get_option('fb', 'pinterest_url'), 'icon' => 'fa-pinterest-square'), array('name' => __('YouTube', 'flatbook'), 'link' => Kirki::get_option('fb', 'youtube_url'), 'icon' => 'fa-youtube-square'), array('name' => __('Behance', 'flatbook'), 'link' => Kirki::get_option('fb', 'behance_url'), 'icon' => 'fa-behance-square'), array('name' => __('BitBucket', 'flatbook'), 'link' => Kirki::get_option('fb', 'bitbucket_url'), 'icon' => 'fa-bitbucket-square'), array('name' => __('GitHub', 'flatbook'), 'link' => Kirki::get_option('fb', 'github_url'), 'icon' => 'fa-github-square'), array('name' => __('Google+', 'flatbook'), 'link' => Kirki::get_option('fb', 'googleplus_url'), 'icon' => 'fa-google-plus-square'), array('name' => __('Skype', 'flatbook'), 'link' => Kirki::get_option('fb', 'skype_url'), 'icon' => 'fa-skype'), array('name' => __('Reddit', 'flatbook'), 'link' => Kirki::get_option('fb', 'reddit_url'), 'icon' => 'fa-reddit-square'), array('name' => __('Tumblr', 'flatbook'), 'link' => Kirki::get_option('fb', 'tumblr_url'), 'icon' => 'fa-tumblr-square'));
    echo '<ul class="social-icons">';
    foreach ($socials as $social) {
        if (!empty($social['link'])) {
            echo '<li>';
            echo '<a href="' . $social['link'] . '" title="' . $social['name'] . '" target="_blank">';
            echo '<i class="fa fa-lg ' . $social['icon'] . '"></i>';
            echo '</a>';
            echo '</li>';
        }
    }
    echo '</ul>';
}
							<?php 
dynamic_sidebar("frontpage-sidebar");
?>
						</div>
					</div>
				</div>
				<!-- /sidebar-frontpage-container -->

				<div class="separator"></div>

				<!-- frontpageseparate-page-content-container -->
				<div class="frontpageseparate-page-content-container">
					<div class="large-12 columns panel">
						<div class="row">
							<?php 
$front_page_separate_page_content_dropdown = Kirki::get_option(mc, front_page_separate_page_content_dropdown);
if ($front_page_separate_page_content_dropdown) {
    $front_page_separate_page_content_dropdown_content = get_post_field('post_content', $front_page_separate_page_content_dropdown);
    echo $front_page_separate_page_content_dropdown_content;
}
?>
						</div>
					</div>
				</div>
				<!-- /frontpageseparate-page-content-container -->


			</div>
			
<?php 
get_footer();
Exemple #10
0
/**
 * Update option after Customizer save.
 */
function beagency_customize_save_after()
{
    update_option('blogname', Kirki::get_option('general_site_title'));
    if (Kirki::get_option('general_front_page') != '0') {
        update_option('show_on_front ', 'page');
        update_option('page_on_front', Kirki::get_option('general_front_page'));
        update_option('page_for_posts', Kirki::get_option('general_posts_page'));
    }
}
Exemple #11
0
    ?>
  <div class="big-title" style="background-image: url('<?php 
    echo esc_url($infinity_heading_image);
    ?>
')">
    <div class="container">
      <?php 
    the_title('<h1 class="entry-title" itemprop="headline">', '</h1>');
    ?>
      <?php 
    if (function_exists('tm_bread_crumb') && Kirki::get_option('infinity', 'site_general_breadcrumb_enable') == 1) {
        ?>
        <div class="breadcrumb">
          <div class="container">
            <?php 
        echo tm_bread_crumb(array('home_label' => Kirki::get_option('infinity', 'site_general_breadcrumb_home_text')));
        ?>
          </div>
        </div>
      <?php 
    }
    ?>
    </div>
  </div>
<?php 
}
?>
<div class="container">
  <div class="row">
    <?php 
if ($layout == 'sidebar-content') {
Exemple #12
0
 function shamrock_get_option($option)
 {
     return Kirki::get_option('shamrock_settings', $option);
 }
Exemple #13
0
">
							<div class="social">
								<?php 
        wp_nav_menu(array('theme_location' => 'social', 'menu_id' => 'social-menu', 'container_class' => 'social-menu', 'fallback_cb' => false));
        ?>
							</div>
						</div>
						<?php 
    }
    ?>
						<div class="<?php 
    echo esc_attr($text_cl);
    ?>
">
							<?php 
    echo html_entity_decode(Kirki::get_option('tm-polygon', 'copyright_layout_text'));
    ?>
						</div>
					</div>
				</div>
			</div><!-- .copyright -->
		<?php 
}
?>
	</div><!-- #page -->
	<?php 
tha_body_bottom();
?>
	<?php 
wp_footer();
?>
Exemple #14
0
<?php

/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package tm_polygon
 */
$tm_polygon_layout = Kirki::get_option('tm-polygon', 'site_layout');
$tm_polygon_heading_image = Kirki::get_option('tm-polygon', 'page_bg_image');
get_header();
?>
<div class="big-title" style="background-image: url('<?php 
echo esc_url($tm_polygon_heading_image);
?>
')">
	<div class="container">
		<h1 class="entry-title" itemprop="headline"><?php 
echo esc_html__('Blog', 'tm-polygon');
?>
</h1>
	</div>
</div>
<div class="container">
	<div class="row">
		<?php 
Exemple #15
0
<?php

/**
 * The footer layouts used in theme
 * 
 * @package FlatBook
 */
$footer_widgets = Kirki::get_option('fb', 'layout_footer_widgets_display');
$blog_footer_widgets = Kirki::get_option('fb', 'blog_page_display_footer_widgets');
$single_footer_widgets = Kirki::get_option('fb', 'blog_single_display_footer_widgets');
$footer_subscribe = Kirki::get_option('fb', 'layout_footer_subscribe_display');
$blog_footer_subscribe = Kirki::get_option('fb', 'blog_page_display_footer_subscribe');
$single_footer_subscribe = Kirki::get_option('fb', 'blog_single_display_footer_subscribe');
?>


<footer id="site-footer" class="footer">

<?php 
if (is_page_template('page-builder.php')) {
    // IF BUILDER PAGE
    if (have_rows('footer_builder')) {
        while (have_rows('footer_builder')) {
            the_row();
            if (get_row_layout() == 'subscribe_footer') {
                get_template_part('partials/footer', 'subscribe');
            }
            if (get_row_layout() == 'widgets_footer') {
                get_template_part('partials/footer', 'widgets');
            }
            if (get_row_layout() == 'copyright_footer') {
 public function google_link()
 {
     // Get the array of fields
     $fields = Kirki::$fields;
     // Early exit if no fields are found.
     if (empty($fields)) {
         return;
     }
     $fonts = array();
     foreach ($fields as $field) {
         /**
          * Sanitize the field
          */
         $field = Kirki_Field::sanitize_field($field);
         if (!is_array($field['output'])) {
             continue;
         }
         foreach ($field['output'] as $output) {
             if (in_array($output['property'], array('font-family', 'font-weight', 'font-subset'))) {
                 /**
                  * Get the value of the field
                  */
                 $config_id = Kirki::get_config_id($field);
                 $settings = $field['settings'];
                 if ('option' == Kirki::$config[$config_id]['option_type'] && '' != Kirki::$config[$config_id]['option_name']) {
                     $settings = str_replace(array(']', Kirki::$config[$config_id]['option_name'] . '['), '', $field['settings']);
                 }
                 $value = Kirki::get_option($config_id, $settings);
                 if ('font-family' == $output['property']) {
                     /**
                      * Add the font-family to the array
                      */
                     $fonts[]['font-family'] = $value;
                 } else {
                     if ('font-weight' == $output['property']) {
                         /**
                          * Add font-weight to the array
                          */
                         $fonts[]['font-weight'] = $value;
                     } else {
                         if ('font-subset' == $output['property']) {
                             /**
                              * add font subsets to the array
                              */
                             $fonts[]['subsets'] = $value;
                         }
                     }
                 }
             }
         }
     }
     foreach ($fonts as $font) {
         // Do we have font-families?
         if (isset($font['font-family'])) {
             $font_families = !isset($font_families) ? array() : $font_families;
             $font_families[] = $font['font-family'];
             if (Kirki_Toolkit::fonts()->is_google_font($font['font-family'])) {
                 $has_google_font = true;
             }
         }
         // Do we have font-weights?
         if (isset($font['font-weight'])) {
             $font_weights = !isset($font_weights) ? array() : $font_weights;
             $font_weights[] = $font['font-weight'];
         }
         // Do we have font-subsets?
         if (isset($font['subsets'])) {
             $font_subsets = !isset($font_subsets) ? array() : $font_subsets;
             $font_subsets[] = $font['subsets'];
         }
     }
     // Make sure there are no empty values and define defaults.
     $font_families = !isset($font_families) || empty($font_families) ? false : $font_families;
     $font_weights = !isset($font_weights) || empty($font_weights) ? '400' : $font_weights;
     $font_subsets = !isset($font_subsets) || empty($font_subsets) ? 'all' : $font_subsets;
     if (!isset($has_google_font) || !$has_google_font) {
         $font_families = false;
     }
     // Return the font URL.
     return $font_families ? Kirki_Toolkit::fonts()->get_google_font_uri($font_families, $font_weights, $font_subsets) : false;
 }
Exemple #17
0
<?php

/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package Infinity
 */
$layout = Kirki::get_option('infinity', 'site_layout');
$infinity_heading_image = Kirki::get_option('infinity', 'page_bg_image');
get_header();
?>
<div class="big-title" style="background-image: url('<?php 
echo esc_url($infinity_heading_image);
?>
')">
  <div class="container">
    <h1 class="entry-title" itemprop="headline"><?php 
echo __('Blog', 'infinity');
?>
</h1>
  </div>
</div>
<div class="container">
  <div class="row">
    <?php 
 /**
  * Get the value of a field.
  * This is a deprecated function that we in use when there was no API.
  * Please use the Kirki::get_option() method instead.
  * Documentation is available for the new method on https://github.com/aristath/kirki/wiki/Getting-the-values
  *
  * @return mixed
  */
 function kirki_get_option($option = '')
 {
     return Kirki::get_option('', $option);
 }
Exemple #19
0
<?php

/**
 * The subscribe footer partial for the Page Builder
 *
 * @package FlatBook
 */
$mailchimp_code = Kirki::get_option('fb', 'layout_footer_subscribe_code');
$subscribe_title = Kirki::get_option('fb', 'layout_footer_subscribe_title');
?>


<div class="footer-subscribe">

		<div class="container">

		<div class="row">

			<div class="col-md-6 hidden-sm hidden-xs">

				<i class="subscribe-icon fa fa-envelope-o"></i>

				<h4 class="subscribe-title">

					<?php 
echo $subscribe_title;
?>


				</h4>
Exemple #20
0
/**
 * Custom admin logo
 */
function flatbook_custom_admin_logo()
{
    $admin_logo = Kirki::get_option('fb', 'admin_logo');
    if ($admin_logo != '') {
        $admin_logo;
    }
    $dimensions = @getimagesize($admin_logo);
    echo '<style>' . "\n" . 'body.login #login h1 a { background: url("' . $admin_logo . '") no-repeat scroll center top transparent; height: ' . $dimensions[1] . 'px; 
	background-size: auto !important; width: auto; }' . "\n.login #nav {text-align: center} .login #backtoblog { display:none }" . '</style>' . "\n";
}
Exemple #21
0
 /**
  * Build the variables.
  *
  * @return array 	('variable-name' => value)
  */
 public static function get_variables()
 {
     $variables = array();
     // Loop through all fields.
     foreach (Kirki::$fields as $field) {
         // Check if we have variables for this field.
         if (isset($field['variables']) && $field['variables'] && !empty($field['variables'])) {
             // Loop through the array of variables.
             foreach ($field['variables'] as $field_variable) {
                 // Is the variable ['name'] defined? If yes, then we can proceed.
                 if (isset($field_variable['name'])) {
                     // Sanitize the variable name.
                     $variable_name = esc_attr($field_variable['name']);
                     // Do we have a callback function defined? If not then set $variable_callback to false.
                     $variable_callback = isset($field_variable['callback']) && is_callable($field_variable['callback']) ? $field_variable['callback'] : false;
                     // If we have a variable_callback defined then get the value of the option
                     // and run it through the callback function.
                     // If no callback is defined (false) then just get the value.
                     if ($variable_callback) {
                         $variables[$variable_name] = call_user_func($field_variable['callback'], Kirki::get_option($field['settings']));
                     } else {
                         $variables[$variable_name] = Kirki::get_option($field['settings']);
                     }
                 }
             }
         }
     }
     // Pass the variables through a filter ('kirki/variable') and return the array of variables.
     return apply_filters('kirki/variable', $variables);
 }
Exemple #22
0
<?php

/**
 * The signup header partial for the Page Builder
 *
 * @package FlatBook
 */
$title = get_sub_field('header_title');
$descr = get_sub_field('header_descr', false, false);
$small = get_sub_field('header_small');
$signup = get_sub_field('header_signup_form');
$sanim = get_sub_field('header_signup_anim');
$tanim = get_sub_field('header_title_anim');
$bgimg = Kirki::get_option('fb', 'layout_header_home_header_background_image');
?>


<header id="site-header" class="signup-header" 

	<?php 
if ($bgimg) {
    echo 'data-image-src="' . $bgimg . '" ' . 'data-parallax="scroll"';
} else {
    echo 'style="background-color: #444;"';
}
?>
>

    <div class="container">

		<div class="row"> 
Exemple #23
0
        <?php 
    $class = 'col-md-12';
    ?>
      <?php 
}
?>
      <div class="<?php 
echo esc_attr($class);
?>
">
        <?php 
wp_nav_menu(array('theme_location' => 'primary', 'menu_id' => 'primary-menu', 'container_class' => 'primary-menu'));
?>
      </div>
      <?php 
if (class_exists('WooCommerce') && Kirki::get_option('infinity', 'header_layout_mini_cart_enable') == 1) {
    ?>
        <div class="col-md-1">
          <div class="mini-cart">
            <?php 
    echo thememove__minicart();
    ?>
            <div class="widget_shopping_cart_content"></div>
          </div>
        </div>
      <?php 
}
?>
    </div>
  </div>
</nav><!-- #site-navigation -->
 /**
  * Get field option data
  *
  * @param string $option_name
  *
  * @static
  * @access
  * @return string
  */
 public static function getOption($option_name)
 {
     $customizer_id = CustomizerAbstract::getId();
     $value = \Kirki::get_option($customizer_id, $option_name);
     return htmlspecialchars_decode($value, ENT_NOQUOTES);
 }
								<?php 
    if (Kirki::get_option('homepage_promotion_content') != '') {
        ?>
									<span><?php 
        echo Kirki::get_option('homepage_promotion_content');
        ?>
</span>
								<?php 
    }
    ?>

								<a href="<?php 
    echo Kirki::get_option('homepage_promotion_btn_link');
    ?>
" class="button button-lg"><?php 
    echo Kirki::get_option('homepage_promotion_btn_text');
    ?>
</a>
							</div><!--.promotion -->
						</section><!--#promotion -->
					<?php 
}
?>
				</div><!--.container -->
			</div><!--.content-wrap -->
		</main><!-- #main -->
	</div><!-- #primary -->

<?php 
get_footer();
Exemple #26
0
					<div class="<?php 
    echo esc_attr($tm_polygon_cart_class);
    ?>
 search-cart hidden-xs hidden-sm">
						<div class="mini-cart">
							<?php 
    echo tm_polygon_minicart();
    ?>
							<div class="widget_shopping_cart_content"></div>
						</div>
					</div>
				<?php 
}
?>
				<?php 
if (Kirki::get_option('tm-polygon', 'header_layout_search_enable') == 1) {
    ?>
					<div class="search-cart hidden-xs hidden-sm">
						<div class="search-box">
							<?php 
    get_search_form();
    ?>
							<i class="pe-7s-search"></i>
						</div>
					</div>
				<?php 
}
?>
			</div>
		</div>
	</div>
 /**
  *
  * Get control value
  *
  * @return string
  * @access public
  */
 public function getValue()
 {
     $value = \Kirki::get_option(CustomizerAbstract::getId(), $this->getName());
     //todo add filters from ZF2
     $value = htmlspecialchars_decode($value, ENT_NOQUOTES);
     if (strpos($value, '&#039;') !== false) {
         $value = str_replace('&#039;', '\'', $value);
     }
     return $value;
 }
Exemple #28
0
 public function test_get_option()
 {
     $this->add_config();
     $this->add_field();
     $this->assertEquals('some-default-value', Kirki::get_option('my_config', 'my_setting0'));
     $this->assertEquals('some-default-value', Kirki::get_option('my_config2', 'my_setting1'));
     $this->assertEquals('some-default-value', Kirki::get_option('my_config3', 'my_setting2'));
 }
Exemple #29
0
')">
		<div class="container">
			<div class="row middle">
				<div class="col-md-6">
					<?php 
the_archive_title('<h1 class="entry-title">', '</h1>');
the_archive_description('<div class="taxonomy-description">', '</div>');
?>
				</div>
			<?php 
if (function_exists('tm_bread_crumb')) {
    ?>
				<div class="breadcrumb col-md-6 end">
					<div class="container">
						<?php 
    echo tm_bread_crumb(array('home_label' => Kirki::get_option('tm-polygon', 'site_general_breadcrumb_home_text')));
    ?>
					</div>
				</div>
			<?php 
}
?>
			</div>
		</div>
	</header>
	<div class="container">
		<div class="row">
			<?php 
if ($tm_polygon_layout == 'sidebar-content') {
    ?>
				<?php 
Exemple #30
0
<?php

/**
 * The template for displaying archive pages.
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package tm_polygon
 */
$tm_polygon_heading_image = Kirki::get_option('tm-polygon', 'page_bg_image');
$layout = Kirki::get_option('tm-polygon', 'archive_layout');
get_header();
?>
	<header class="big-title" style="background-image: url('<?php 
echo esc_url($tm_polygon_heading_image);
?>
')">
		<div class="container">
			<?php 
the_archive_title('<h1 class="entry-title">', '</h1>');
?>
			<span class="entry-desc">
				<?php 
the_archive_description();
?>
			</span>
		</div>
	</header>
	<div class="container">
		<div class="row">
			<?php