当前位置: 首页>>代码示例>>PHP>>正文


PHP hoot_get_option函数代码示例

本文整理汇总了PHP中hoot_get_option函数的典型用法代码示例。如果您正苦于以下问题:PHP hoot_get_option函数的具体用法?PHP hoot_get_option怎么用?PHP hoot_get_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了hoot_get_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: hoot_get_option_footer

/**
 * Get footer column option.
 *
 * @since 1.0.0
 * @access public
 * @return void
 */
function hoot_get_option_footer()
{
    $footers = hoot_get_option('footer');
    $columns = $footers ? intval(substr($footers, 0, 1)) : false;
    $columns = is_numeric($columns) && 0 < $columns ? $columns : false;
    return $columns;
}
开发者ID:CMDM-Lab,项目名称:CMDM-Lab.github.io,代码行数:14,代码来源:sidebars.php

示例2: hoot_theme_attr_page_wrapper

/**
 * Page wrapper attributes.
 *
 * @since 1.0
 * @access public
 * @param array $attr
 * @return array
 */
function hoot_theme_attr_page_wrapper($attr)
{
    $site_layout = hoot_get_option('site_layout');
    $attr['class'] = $site_layout == 'boxed' ? 'grid site-boxed' : 'site-stretch';
    $attr['class'] .= ' page-wrapper';
    return $attr;
}
开发者ID:hect1c,项目名称:martina-blog,代码行数:15,代码来源:attr.php

示例3: hoot_custom_css

/**
 * Custom CSS built from user theme options
 * For proper sanitization, always use functions from hoot/functions/css-styles.php
 *
 * @since 1.0
 * @access public
 */
function hoot_custom_css()
{
    $css = '';
    $accent_color = hoot_get_option('accent_color');
    $accent_color_dark = hoot_color_decrease($accent_color, 20, 20);
    $accent_font = hoot_get_option('accent_font');
    $cssrules = array();
    // Hoot Grid
    $cssrules['.grid'] = hoot_css_grid_width();
    // Base Typography and HTML
    $cssrules['a'] = hoot_css_rule('color', $accent_color);
    // Overridden by hoot_premium_custom_cssrules()
    $cssrules['.invert-typo'] = array(hoot_css_rule('background', $accent_color), hoot_css_rule('color', $accent_font));
    $cssrules['.invert-typo a, .invert-typo a:hover, .invert-typo h1, .invert-typo h2, .invert-typo h3, .invert-typo h4, .invert-typo h5, .invert-typo h6, .invert-typo .title'] = hoot_css_rule('color', $accent_font);
    $cssrules['input[type="submit"], #submit, .button'] = array(hoot_css_rule('background', $accent_color), hoot_css_rule('color', $accent_font));
    $cssrules['input[type="submit"]:hover, #submit:hover, .button:hover'] = array(hoot_css_rule('background', $accent_color_dark), hoot_css_rule('color', $accent_font));
    // Layout
    $content_bg = hoot_get_option('background');
    $cssrules['body'][] = hoot_css_background($content_bg);
    if (hoot_get_option('site_layout') == 'boxed') {
        $content_bg = hoot_get_option('box_background');
        $cssrules['#page-wrapper'][] = hoot_css_background($content_bg);
    }
    $cssrules['#page-wrapper'][] = hoot_css_rule('border-color', $accent_color);
    // Header
    $cssrules['#topbar-right-inner' . ', ' . '#topbar-right-inner input'] = hoot_css_rule('background', $content_bg['color']);
    // Shortcodes
    $cssrules['#page-wrapper ul.shortcode-tabset-nav li.current'] = hoot_css_rule('border-bottom-color', $content_bg['color']);
    // Light Slider
    $cssrules['.lSSlideOuter .lSPager.lSpg > li:hover a, .lSSlideOuter .lSPager.lSpg > li.active a'] = hoot_css_rule('background-color', $accent_color);
    // Allow CSS to be modified
    $cssrules = apply_filters('hoot_dynamic_cssrules', $cssrules);
    /** Print CSS Rules **/
    foreach ($cssrules as $selector => $rules) {
        if (!empty($selector)) {
            $css .= $selector . ' {';
            if (is_array($rules)) {
                foreach ($rules as $rule) {
                    $css .= $rule . ' ';
                }
            } else {
                $css .= $rules;
            }
            $css .= ' }' . "\n";
        }
    }
    // @todo add media queries to preceding code
    // Allow CSS to be modified
    $cssrules = apply_filters('hoot_dynamic_css', $css);
    // Print CSS
    if (!empty($css)) {
        wp_add_inline_style('style', $css);
    }
}
开发者ID:AttyC,项目名称:elizafilby,代码行数:61,代码来源:css.php

示例4: while

        // Loads the template-parts/loop-meta.php template to display Title Area with Meta Info (of the loop)
    }
    // Begins the loop through found posts, and load the post data.
    while (have_posts()) {
        the_post();
        // Loads the template-parts/content-{$post_type}.php template.
        hoot_get_content_template();
        // End found posts loop.
    }
    ?>

				</div><!-- #content-wrap -->

				<?php 
    // Loads the template-parts/loop-nav.php template.
    if (hoot_get_option('post_prev_next_links')) {
        get_template_part('template-parts/loop-nav');
    }
    // Loads the comments.php template
    if (!is_attachment()) {
        comments_template('', true);
    }
    // If no posts were found.
} else {
    // Loads the template-parts/error.php template.
    get_template_part('template-parts/error');
    // End check for posts.
}
?>

		</main><!-- #content -->
开发者ID:CMDM-Lab,项目名称:CMDM-Lab.github.io,代码行数:31,代码来源:single.php

示例5: custom_excerpt_length

 /**
  * Modify the exceprt length.
  *
  * @since 1.0
  * @access public
  * @return void
  */
 function custom_excerpt_length($length)
 {
     $excerpt_length = intval(hoot_get_option('excerpt_length'));
     if (!empty($excerpt_length)) {
         return $excerpt_length;
     }
     return 105;
 }
开发者ID:CMDM-Lab,项目名称:CMDM-Lab.github.io,代码行数:15,代码来源:hoot-theme.php

示例6: _e

    ?>
				<div class="entry-sticky-tag contrast-typo"><?php 
    _e('Sticky', 'responsive-brix');
    ?>
</div>
			<?php 
}
?>

			<?php 
hoot_meta_info_blocks(hoot_get_option('archive_post_meta'));
?>

			<div <?php 
hoot_attr('entry-summary');
?>
>
				<?php 
if ('full-content' == hoot_get_option('archive_post_content')) {
    the_content();
} else {
    the_excerpt();
}
?>
			</div><!-- .entry-summary -->

		</div><!-- .entry-grid-content -->

	</div><!-- .entry-grid -->

</article><!-- .entry -->
开发者ID:hect1c,项目名称:martina-blog,代码行数:31,代码来源:content-archive.php

示例7: hoot_custom_css

/**
 * Custom CSS built from user theme options
 * For proper sanitization, always use functions from hoot/functions/css-styles.php
 *
 * @since 1.0
 * @access public
 */
function hoot_custom_css()
{
    $css = '';
    $vars = array();
    $accent_color = hoot_get_option('accent_color');
    $accent_color_dark = hoot_color_increase($accent_color, 10, 10);
    $accent_font = hoot_get_option('accent_font');
    $cssrules = array();
    // Hoot Grid
    $cssrules['.grid'] = hoot_css_grid_width();
    // Base Typography and HTML
    $cssrules['a'] = hoot_css_rule('color', $accent_color);
    // Overridden by hoot_premium_custom_cssrules()
    $cssrules['.invert-typo'] = array(hoot_css_rule('background', $accent_color), hoot_css_rule('color', $accent_font));
    $cssrules['.invert-typo a, .invert-typo a:hover, .invert-typo h1, .invert-typo h2, .invert-typo h3, .invert-typo h4, .invert-typo h5, .invert-typo h6, .invert-typo .title'] = hoot_css_rule('color', $accent_font);
    $cssrules['input[type="submit"], #submit, .button'] = array(hoot_css_rule('background', $accent_color), hoot_css_rule('color', $accent_font));
    $cssrules['input[type="submit"]:hover, #submit:hover, .button:hover'] = array(hoot_css_rule('background', $accent_color_dark), hoot_css_rule('color', $accent_font));
    // Override @headingsFontFamily if selected in options
    if ('cursive' != hoot_get_option('headings_fontface')) {
        $cssrules['h1, h2, h3, h4, h5, h6, .title, .titlefont'] = array(hoot_css_rule('font-family', '"Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif'), hoot_css_rule('font-weight', '300'), hoot_css_rule('color', '#000000'));
    }
    // Layout
    $content_bg = hoot_get_option('background');
    $cssrules['body'][] = hoot_css_background($content_bg);
    if (hoot_get_option('site_layout') == 'boxed') {
        $content_bg = array('color' => hoot_get_option('box_background_color'));
        $cssrules['#page-wrapper'][] = hoot_css_background($content_bg);
    }
    $vars['content_bg'] = $content_bg;
    // Header (Topbar, Header, Main Nav Menu)
    // Topbar
    $cssrules['.topbar-right-inner input'] = hoot_css_rule('background', $content_bg['color']);
    // Header Layout
    if (hoot_get_option('logo_background_type') == 'accent') {
        $cssrules['#header:before'] = hoot_css_rule('background', $accent_color);
    } else {
        $cssrules['#header:before, #site-logo'] = hoot_css_rule('background', 'transparent');
        $cssrules['#header, #branding, #header-aside'] = hoot_css_rule('background', 'none');
        $cssrules['#site-logo #site-title, #site-logo #site-description'] = hoot_css_rule('color', $accent_color);
    }
    // Logo (with icon)
    $title_icon_size = hoot_get_option('site_title_icon_size', NULL);
    if (intval($title_icon_size)) {
        $cssrules['.site-logo-with-icon #site-title i'] = hoot_css_rule('font-size', $title_icon_size);
    }
    $title_icon = hoot_get_option('site_title_icon', NULL);
    if ($title_icon && intval($title_icon_size)) {
        $cssrules['.site-logo-with-icon #site-title'] = hoot_css_rule('padding-left', $title_icon_size);
    }
    // Mixed Logo (with image)
    $logo_image_width = hoot_get_option('logo_image_width', NULL);
    $logo_image_width = intval($logo_image_width) ? intval($logo_image_width) : 120;
    $cssrules['.site-logo-with-image .site-logo-mixed-image, .site-logo-with-image .site-logo-mixed-image img'] = hoot_css_rule('width', intval($logo_image_width) . 'px');
    // Important to have logo img width as img does not follow max-width inside non-fixed tables in Firefox
    // Custom Logo
    $hoot_logo = hoot_get_option('logo');
    if ('custom' == $hoot_logo || 'mixedcustom' == $hoot_logo) {
        $title_custom = apply_filters('hoot_logo_custom_text', hoot_get_option('logo_custom'));
        if (is_array($title_custom) && !empty($title_custom)) {
            $lcount = 1;
            foreach ($title_custom as $title_line) {
                if (!empty($title_line['size'])) {
                    $cssrules['#site-logo-custom .site-title-line' . $lcount . ',#site-logo-mixedcustom .site-title-line' . $lcount] = hoot_css_rule('font-size', $title_line['size']);
                }
                $lcount++;
            }
        }
    }
    // Light Slider
    $cssrules['.lSSlideOuter .lSPager.lSpg > li:hover a, .lSSlideOuter .lSPager.lSpg > li.active a'] = hoot_css_rule('background-color', $accent_color);
    // Allow CSS to be modified
    $cssrules = apply_filters('hoot_dynamic_cssrules', $cssrules, $vars);
    /** Print CSS Rules **/
    foreach ($cssrules as $selector => $rules) {
        if (!empty($selector)) {
            $css .= $selector . ' {';
            if (is_array($rules)) {
                foreach ($rules as $rule) {
                    $css .= $rule . ' ';
                }
            } else {
                $css .= $rules;
            }
            $css .= ' }' . "\n";
        }
    }
    // @todo add media queries to preceding code
    // Allow CSS to be modified
    $cssrules = apply_filters('hoot_dynamic_css', $css, $vars);
    // Print CSS
    if (!empty($css)) {
        wp_add_inline_style('style', $css);
    }
//.........这里部分代码省略.........
开发者ID:redline13,项目名称:wp-theme-responsive-brix,代码行数:101,代码来源:css.php

示例8: wp_link_pages

			</div>
			<?php 
    wp_link_pages();
    ?>
		</div><!-- .entry-content -->

		<div class="screen-reader-text" itemprop="datePublished" itemtype="https://schema.org/Date"><?php 
    echo get_the_date('Y-m-d');
    ?>
</div>

		<?php 
    $show_entry_footer = apply_filters('hoot_show_entry_footer', true);
    ?>
		<?php 
    if ($show_entry_footer && 'bottom' != hoot_get_option('post_meta_location') && !is_attachment()) {
        ?>
			<footer class="entry-footer">
				<?php 
        hoot_meta_info_blocks(array('author' => false, 'date' => false, 'cats' => true, 'tags' => true, 'comments' => true));
        ?>
			</footer><!-- .entry-footer -->
		<?php 
    }
    ?>

	</article><!-- .entry -->

<?php 
    /**
     * If not viewing a single post i.e. viewing the post in a list index (archive etc.)
开发者ID:redline13,项目名称:wp-theme-responsive-brix,代码行数:31,代码来源:content.php

示例9: hoot_get_option

    // Display HTML Slider
    $slider_width = hoot_get_option('wt_html_slider_width');
    $slider_grid = 'stretch' == $slider_width ? 'grid-stretch' : 'grid';
    ?>

	<div id="widgetized-template-html-slider" class="widgetized-template-area ">
		<div class="widgetized-template-slider">
			<div class="grid-row">
				<div class="grid-span-12">
					<?php 
    global $hoot_theme;
    /* Reset any previous slider */
    $hoot_theme->slider = array();
    $hoot_theme->sliderSettings = array('class' => 'wt-slider', 'min_height' => hoot_get_option('wt_html_slider_min_height'));
    /* Create slider object */
    $slides = hoot_get_option('wt_html_slider');
    foreach ($slides as $slide) {
        if (!empty($slide['image']) || !empty($slide['content']) || !empty($slide['url'])) {
            $hoot_theme->slider[] = $slide;
        }
    }
    /* Display Slider Template */
    get_template_part('template-parts/slider-html');
    ?>
				</div>
			</div>
		</div>
	</div>
<?php 
}
?>
开发者ID:hect1c,项目名称:martina-blog,代码行数:31,代码来源:index.php

示例10: hoot_custom_background_cb

/**
 * Callback function for Custom Background
 *
 * @since 1.1.72
 * @access public
 * @return string
 */
function hoot_custom_background_cb()
{
    // $background is the saved custom image, or the default image.
    $background = set_url_scheme(get_background_image());
    // $color is the saved custom color.
    // A default has to be specified in style.css. It will not be printed here.
    $color = get_background_color();
    if ($color === get_theme_support('custom-background', 'default-color')) {
        $color = false;
    }
    if (!$background && !$color) {
        return;
    }
    $style = $color ? "background-color: #{$color};" : '';
    $hoot_bg = hoot_get_option('background');
    if ($background && isset($hoot_bg['type']) && $hoot_bg['type'] == 'custom') {
        $image = " background-image: url('{$background}');";
        $repeat = get_theme_mod('background_repeat', get_theme_support('custom-background', 'default-repeat'));
        if (!in_array($repeat, array('no-repeat', 'repeat-x', 'repeat-y', 'repeat'))) {
            $repeat = 'repeat';
        }
        $repeat = " background-repeat: {$repeat};";
        $position = get_theme_mod('background_position_x', get_theme_support('custom-background', 'default-position-x'));
        if (!in_array($position, array('center', 'right', 'left'))) {
            $position = 'left';
        }
        $position = " background-position: top {$position};";
        $attachment = get_theme_mod('background_attachment', get_theme_support('custom-background', 'default-attachment'));
        if (!in_array($attachment, array('fixed', 'scroll'))) {
            $attachment = 'scroll';
        }
        $attachment = " background-attachment: {$attachment};";
        $style .= $image . $repeat . $position . $attachment;
    }
    ?>
<style type="text/css" id="custom-background-css">
body.custom-background { <?php 
    echo trim($style);
    ?>
 }
</style>
<?php 
}
开发者ID:redline13,项目名称:wp-theme-responsive-brix,代码行数:50,代码来源:css-styles.php

示例11: apply_filters

									<?php 
                $hide_meta_info = '';
                $hide_meta_info = apply_filters('hoot_hide_meta_info', $hide_meta_info, 'top');
                ?>
									<?php 
                if (!$hide_meta_info && 'top' == hoot_get_option('post_meta_location') && !is_attachment()) {
                    ?>
										<div <?php 
                    hoot_attr('loop-description');
                    ?>
>
											<?php 
                    if (is_page()) {
                        hoot_meta_info_blocks(hoot_get_option('page_meta'));
                    } else {
                        hoot_meta_info_blocks(hoot_get_option('post_meta'));
                    }
                    ?>
										</div><!-- .loop-description -->
									<?php 
                }
                ?>

								</div><!-- .entry-header -->
							</div><!-- .loop-meta -->

						</div>
					</div>
				</div>

			<?php 
开发者ID:hect1c,项目名称:martina-blog,代码行数:31,代码来源:loop-meta.php

示例12: hoot_google_fonts_enqueue_url

/**
 * Build URL for loading Google Fonts
 * @credit http://themeshaper.com/2014/08/13/how-to-add-google-fonts-to-wordpress-themes/
 *
 * @since 1.0
 * @access public
 * @return void
 */
function hoot_google_fonts_enqueue_url()
{
    $fonts_url = '';
    $query_args = array();
    /* Translators: If there are characters in your language that are not
     * supported by this font, translate this to 'off'. Do not translate
     * into your own language.
     */
    $playball = 'cursive' == hoot_get_option('headings_fontface') ? _x('on', 'Playball font: on or off', 'responsive-brix') : 'off';
    /* Translators: If there are characters in your language that are not
     * supported by this font, translate this to 'off'. Do not translate
     * into your own language.
     */
    $open_sans = _x('on', 'Open Sans font: on or off', 'responsive-brix');
    if ('off' !== $playball || 'off' !== $open_sans) {
        $font_families = array();
        if ('off' !== $playball) {
            $font_families[] = 'Playball:400';
        }
        if ('off' !== $open_sans) {
            $font_families[] = 'Open Sans:400,400italic,700,700italic,800';
        }
        $query_args = array('family' => urlencode(implode('|', $font_families)), 'subset' => urlencode('latin'));
    }
    if (!empty($query_args)) {
        $fonts_url = add_query_arg($query_args, '//fonts.googleapis.com/css');
    }
    return $fonts_url;
}
开发者ID:hect1c,项目名称:martina-blog,代码行数:37,代码来源:enqueue.php

示例13: hoot_woo_custom_loop_columns_css

 function hoot_woo_custom_loop_columns_css()
 {
     $columns = hoot_get_option('wooshop_product_columns', 4);
     if ($columns == 4) {
         return;
     }
     switch ($columns) {
         case '2':
             $css = '.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { width: 48.1%; }';
             break;
         case '3':
             $css = '.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { width: 30.8%; }';
             break;
         case '5':
             $css = '.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { width: 16.96%; }';
             break;
     }
     if (!empty($css)) {
         wp_add_inline_style('style', $css);
     }
 }
开发者ID:CMDM-Lab,项目名称:CMDM-Lab.github.io,代码行数:21,代码来源:functions.php

示例14: array

                echo $highlight_class;
                ?>
">
						<div class="widgetized-template-slider <?php 
                echo $slider_grid;
                ?>
">
							<div class="grid-row">
								<div class="grid-span-12">
									<?php 
                global $hoot_theme;
                /* Reset any previous slider */
                $hoot_theme->slider = array();
                $hoot_theme->sliderSettings = array('class' => 'wt-slider');
                /* Create slider object */
                $slides = hoot_get_option('wt_img_slider');
                foreach ($slides as $slide) {
                    if (!empty($slide['image'])) {
                        $hoot_theme->slider[] = $slide;
                    }
                }
                /* Display Slider Template */
                get_template_part('template-parts/slider-image');
                ?>
								</div>
							</div>
						</div>
					</div>

					<?php 
                break;
开发者ID:CMDM-Lab,项目名称:CMDM-Lab.github.io,代码行数:31,代码来源:template-widgetized.php

示例15: hoot_page_header_attop

/**
 * Utility function to determine the location of page header
 *
 * @since 1.0
 * @access public
 */
function hoot_page_header_attop()
{
    $full = wp_parse_args(hoot_get_option('page_header_full'), array('default' => '1', 'posts' => 0, 'pages' => '1', 'no-sidebar' => '1'));
    /* Override For Full Width Pages (including 404 page) */
    if ($full['no-sidebar']) {
        $sidebar_size = hoot_main_layout('primary-sidebar');
        if (empty($sidebar_size) || hoot_is_404()) {
            return apply_filters('hoot_page_header_attop', true);
        }
    }
    /* For Posts */
    if (is_singular('post')) {
        if ($full['posts']) {
            return apply_filters('hoot_page_header_attop', true);
        } else {
            return apply_filters('hoot_page_header_attop', false);
        }
    }
    /* For Pages */
    if (is_page()) {
        if ($full['pages']) {
            return apply_filters('hoot_page_header_attop', true);
        } else {
            return apply_filters('hoot_page_header_attop', false);
        }
    }
    /* Default */
    if ($full['default']) {
        return apply_filters('hoot_page_header_attop', true);
    } else {
        return apply_filters('hoot_page_header_attop', false);
    }
}
开发者ID:hect1c,项目名称:martina-blog,代码行数:39,代码来源:template-helpers.php


注:本文中的hoot_get_option函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。