本文整理汇总了PHP中genesis_html5函数的典型用法代码示例。如果您正苦于以下问题:PHP genesis_html5函数的具体用法?PHP genesis_html5怎么用?PHP genesis_html5使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了genesis_html5函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: genesis_404
/**
* This function outputs a 404 "Not Found" error message
*
* @since 1.6
*/
function genesis_404()
{
echo genesis_html5() ? '<article class="entry">' : '<div class="post hentry">';
printf('<h1 class="entry-title">%s</h1>', apply_filters('genesis_404_entry_title', __('Not found, error 404', 'genesis')));
echo '<div class="entry-content">';
if (genesis_html5()) {
echo apply_filters('genesis_404_entry_content', '<p>' . sprintf(__('The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it by using the search form below.', 'genesis'), trailingslashit(home_url())) . '</p>');
get_search_form();
} else {
?>
<p><?php
printf(__('The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it with the information below.', 'genesis'), trailingslashit(home_url()));
?>
</p>
<?php
}
if (!genesis_html5()) {
genesis_sitemap('h4');
} elseif (genesis_a11y('404-page')) {
echo '<h2>' . __('Sitemap', 'genesis') . '</h2>';
genesis_sitemap('h3');
}
echo '</div>';
echo genesis_html5() ? '</article>' : '</div>';
}
开发者ID:Oak86,项目名称:matthewbuttler.work,代码行数:34,代码来源:404.php
示例2: bfg_do_doctype
/**
* Overrides the default Genesis doctype with IE and JS identifier classes.
*
* See: http://html5boilerplate.com/
*
* @since 2.2.4
*/
function bfg_do_doctype()
{
if (genesis_html5()) {
?>
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9" <?php
language_attributes('html');
?>
> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" <?php
language_attributes('html');
?>
> <!--<![endif]-->
<head>
<meta charset="<?php
bloginfo('charset');
?>
">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- <meta name="format-detection" content="telephone=no"> -->
<?php
} else {
genesis_xhtml_doctype();
}
}
开发者ID:ricardovelero,项目名称:bones-for-genesis-2-0,代码行数:32,代码来源:header.php
示例3: widget
/**
* Echo the widget content.
*
* @since 0.1.8
*
* @global WP_Query $wp_query Query object.
* @global integer $more
*
* @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
* @param array $instance The settings for the particular instance of the widget
*/
function widget($args, $instance)
{
//* Merge with defaults
$instance = wp_parse_args((array) $instance, $this->defaults);
if (!empty($instance['url'])) {
$instance['url'] = do_shortcode($instance['url']);
}
if (!empty($instance['image_url'])) {
$instance['image_url'] = do_shortcode($instance['image_url']);
}
if (!empty($instance['description'])) {
$instance['description'] = do_shortcode($instance['description']);
}
echo $args['before_widget'];
if (!empty($instance['title'])) {
echo $args['before_title'] . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $args['after_title'];
}
genesis_markup(array('html5' => '<article %s>', 'xhtml' => sprintf('<div class="%s">', implode(' ', get_post_class())), 'context' => 'entry'));
if (!empty($instance['url'])) {
echo '<a href="' . $instance['url'] . '" title="' . $instance['title'] . '" class="' . esc_attr($instance['image_alignment']) . '">' . '<img src="' . $instance['image_url'] . '" class="entry-image" itemprop="image" />' . '</a>';
}
if (!empty($instance['description'])) {
echo genesis_html5() ? '<div class="entry-content">' : '';
echo esc_html($instance['description']);
echo genesis_html5() ? '</div>' : '';
}
genesis_markup(array('html5' => '</article>', 'xhtml' => '</div>'));
echo $args['after_widget'];
}
开发者ID:unity3software,项目名称:unity3,代码行数:40,代码来源:plugin.php
示例4: genesis_standard_loop
/**
* Standard loop, meant to be executed without modification in most circumstances where content needs to be displayed.
*
* It outputs basic wrapping HTML, but uses hooks to do most of its content output like title, content, post information
* and comments.
*
* The action hooks called are:
*
* - `genesis_before_entry`
* - `genesis_entry_header`
* - `genesis_before_entry_content`
* - `genesis_entry_content`
* - `genesis_after_entry_content`
* - `genesis_entry_footer`
* - `genesis_after_endwhile`
* - `genesis_loop_else` (only if no posts were found)
*
* @since 1.1.0
*
* @uses genesis_html5() Check for HTML5 support.
* @uses genesis_legacy_loop() XHTML loop.
* @uses genesis_attr() Contextual attributes.
*
* @return null Return early after legacy loop if not supporting HTML5.
*/
function genesis_standard_loop()
{
//* Use old loop hook structure if not supporting HTML5
if (!genesis_html5()) {
genesis_legacy_loop();
return;
}
if (have_posts()) {
do_action('genesis_before_while');
while (have_posts()) {
the_post();
do_action('genesis_before_entry');
printf('<article %s>', genesis_attr('entry'));
do_action('genesis_entry_header');
do_action('genesis_before_entry_content');
printf('<div %s>', genesis_attr('entry-content'));
do_action('genesis_entry_content');
echo '</div>';
do_action('genesis_after_entry_content');
do_action('genesis_entry_footer');
echo '</article>';
do_action('genesis_after_entry');
}
//* end of one post
do_action('genesis_after_endwhile');
} else {
//* if no posts exist
do_action('genesis_loop_else');
}
//* end loop
}
开发者ID:treydonovan,项目名称:innergame-anna,代码行数:56,代码来源:loops.php
示例5: genesis_markup
/**
* Output markup conditionally.
*
* Supported keys for `$args` are:
*
* - `html5` (`sprintf()` pattern markup),
* - `xhtml` (XHTML markup),
* - `context` (name of context),
* - `echo` (default is true).
*
* If the child theme supports HTML5, then this function will output the `html5` value, with a call to `genesis_attr()`
* with the same context added in. Otherwise, it will output the `xhtml` value.
*
* Applies a `genesis_markup_{context}` filter early to allow shortcutting the function.
*
* Applies a `genesis_markup_{context}_output` filter at the end.
*
* @since 1.9.0
*
* @uses genesis_html5() Check for HTML5 support.
* @uses genesis_attr() Contextual attributes.
*
* @param array $args Array of arguments.
*
* @return string Markup.
*/
function genesis_markup($args = array())
{
$defaults = array('html5' => '', 'xhtml' => '', 'context' => '', 'echo' => true);
$args = wp_parse_args($args, $defaults);
//* Short circuit filter
$pre = apply_filters('genesis_markup_' . $args['context'], false, $args);
if (false !== $pre) {
return $pre;
}
if (!$args['html5'] || !$args['xhtml']) {
return '';
}
//* If HTML5, return HTML5 tag. Maybe add attributes. Else XHTML.
if (genesis_html5()) {
$tag = $args['context'] ? sprintf($args['html5'], genesis_attr($args['context'])) : $args['html5'];
} else {
$tag = $args['xhtml'];
}
//* Contextual filter
$tag = $args['context'] ? apply_filters('genesis_markup_' . $args['context'] . '_output', $tag, $args) : $tag;
if ($args['echo']) {
echo $tag;
} else {
return $tag;
}
}
开发者ID:treydonovan,项目名称:innergame-anna,代码行数:52,代码来源:markup.php
示例6: genesis_html5_ie_fix
/**
* Load the html5 shiv for IE8 and below. Can't enqueue with IE conditionals.
*
* @since 2.0.0
*
* @uses genesis_html5() Check for HTML5 support.
*
* @return Return early if HTML5 not supported.
*
*/
function genesis_html5_ie_fix()
{
if (!genesis_html5()) {
return;
}
echo '<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->' . "\n";
}
开发者ID:Friends-School-Atlanta,项目名称:Deployable-WordPress,代码行数:17,代码来源:load-scripts.php
示例7: genesis_update_check
/**
* Ping http://api.genesistheme.com/ asking if a new version of this theme is available.
*
* If not, it returns false.
*
* If so, the external server passes serialized data back to this function, which gets unserialized and returned for use.
*
* Applies `genesis_update_remote_post_options` filter.
*
* Ping occurs at a maximum of once every 24 hours.
*
* @since 1.1.0
*
* @uses genesis_get_option() Get theme setting value.
* @uses genesis_html5() Check for HTML5 support.
* @uses PARENT_THEME_VERSION Genesis version string.
*
* @global string $wp_version WordPress version string.
*
* @return array Unserialized data, or empty on failure.
*/
function genesis_update_check()
{
//* Use cache
static $genesis_update = null;
global $wp_version;
//* If updates are disabled
if (!genesis_get_option('update') || !current_theme_supports('genesis-auto-updates')) {
return array();
}
//* If cache is empty, pull transient
if (!$genesis_update) {
$genesis_update = get_transient('genesis-update');
}
//* If transient has expired, do a fresh update check
if (!$genesis_update) {
$url = 'http://api.genesistheme.com/update-themes/';
$options = apply_filters('genesis_update_remote_post_options', array('body' => array('genesis_version' => PARENT_THEME_VERSION, 'html5' => genesis_html5(), 'php_version' => phpversion(), 'uri' => home_url(), 'user-agent' => "WordPress/{$wp_version};", 'wp_version' => $wp_version)));
$response = wp_remote_post($url, $options);
$genesis_update = wp_remote_retrieve_body($response);
//* If an error occurred, return FALSE, store for 1 hour
if ('error' === $genesis_update || is_wp_error($genesis_update) || !is_serialized($genesis_update)) {
set_transient('genesis-update', array('new_version' => PARENT_THEME_VERSION), 60 * 60);
return array();
}
//* Else, unserialize
$genesis_update = maybe_unserialize($genesis_update);
//* And store in transient for 24 hours
set_transient('genesis-update', $genesis_update, 60 * 60 * 24);
}
//* If we're already using the latest version, return empty array.
if (version_compare(PARENT_THEME_VERSION, $genesis_update['new_version'], '>=')) {
return array();
}
return $genesis_update;
}
开发者ID:denis-chmel,项目名称:wordpress,代码行数:56,代码来源:upgrade.php
示例8: genesis_nav_menu_link_attributes
/**
* Pass nav menu link attributes through attribute parser.
*
* Adds nav menu link attributes via the Genesis markup API.
*
* @since 2.2.0
*
* @param array $atts {
* The HTML attributes applied to the menu item's <a>, empty strings are ignored.
*
* @type string $title Title attribute.
* @type string $target Target attribute.
* @type string $rel The rel attribute.
* @type string $href The href attribute.
* }
* @param object $item The current menu item.
* @param array $args An array of wp_nav_menu() arguments.
*
* @return array Maybe modified menu attributes array.
*/
function genesis_nav_menu_link_attributes($atts, $item, $args)
{
if (genesis_html5()) {
$atts = genesis_parse_attr('nav-link', $atts);
}
return $atts;
}
开发者ID:nkeat12,项目名称:dv,代码行数:27,代码来源:menu.php
示例9: genesis_search_form
/**
* Replace the default search form with a Genesis-specific form.
*
* The exact output depends on whether the child theme supports HTML5 or not.
*
* Applies the `genesis_search_text`, `genesis_search_button_text`, `genesis_search_form_label` and
* `genesis_search_form` filters.
*
* @since 0.2.0
*
* @uses genesis_html5() Check for HTML5 support.
*
* @return string HTML markup.
*/
function genesis_search_form()
{
$search_text = get_search_query() ? apply_filters('the_search_query', get_search_query()) : apply_filters('genesis_search_text', __('Search this website', 'genesis') . ' …');
$button_text = apply_filters('genesis_search_button_text', esc_attr__('Search', 'genesis'));
$onfocus = "if ('" . esc_js($search_text) . "' === this.value) {this.value = '';}";
$onblur = "if ('' === this.value) {this.value = '" . esc_js($search_text) . "';}";
//* Empty label, by default. Filterable.
$label = apply_filters('genesis_search_form_label', '');
$value_or_placeholder = get_search_query() == '' ? 'placeholder' : 'value';
if (genesis_html5()) {
$form = sprintf('<form %s>', genesis_attr('search-form'));
if (genesis_a11y('search-form')) {
if ('' == $label) {
$label = apply_filters('genesis_search_text', __('Search this website', 'genesis'));
}
$form_id = uniqid('searchform-');
$form .= sprintf('<meta itemprop="target" content="%s"/><label class="search-form-label screen-reader-text" for="%s">%s</label><input itemprop="query-input" type="search" name="s" id="%s" %s="%s" /><input type="submit" value="%s" /></form>', home_url('/?s={s}'), esc_attr($form_id), esc_html($label), esc_attr($form_id), $value_or_placeholder, esc_attr($search_text), esc_attr($button_text));
} else {
$form .= sprintf('%s<meta itemprop="target" content="%s"/><input itemprop="query-input" type="search" name="s" %s="%s" /><input type="submit" value="%s" /></form>', esc_html($label), home_url('/?s={s}'), $value_or_placeholder, esc_attr($search_text), esc_attr($button_text));
}
} else {
$form = sprintf('<form method="get" class="searchform search-form" action="%s" role="search" >%s<input type="text" value="%s" name="s" class="s search-input" onfocus="%s" onblur="%s" /><input type="submit" class="searchsubmit search-submit" value="%s" /></form>', home_url('/'), esc_html($label), esc_attr($search_text), esc_attr($onfocus), esc_attr($onblur), esc_attr($button_text));
}
return apply_filters('genesis_search_form', $form, $search_text, $button_text, $label);
}
开发者ID:Oak86,项目名称:matthewbuttler.work,代码行数:39,代码来源:search.php
示例10: genesis_html5_ie_fix
/**
* Load the html5 shiv for IE8 and below. Can't enqueue with IE conditionals.
*
* @since 2.0.0
*
* @uses genesis_html5() Check for HTML5 support.
*
* @return Return early if HTML5 not supported.
*
*/
function genesis_html5_ie_fix()
{
if (!genesis_html5()) {
return;
}
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
printf('<!--[if lt IE 9]><script src="%s"></script><![endif]-->' . "\n", GENESIS_JS_URL . "/html5shiv{$suffix}.js");
}
开发者ID:sello-rex,项目名称:ased,代码行数:18,代码来源:load-scripts.php
示例11: coastal_404
/**
* This function outputs a 404 "Not Found" error message
*
* @since 1.6
*/
function coastal_404()
{
echo genesis_html5() ? '<article class="entry">' : '<div class="post hentry">';
printf('<h1 class="entry-title">%s</h1>', __('Not found, error 404', 'genesis'));
echo '<div class="entry-content">';
echo '<p>' . sprintf(__('Whoops, looks like the page you are looking for isn\'t here. Let\'s go back to the <a href="%s">homepage</a> and try again.', 'genesis'), get_home_url()) . '</p>';
echo '</div>';
echo genesis_html5() ? '</article>' : '</div>';
}
开发者ID:jasonHalsey,项目名称:whitehaven_costal,代码行数:14,代码来源:404.php
示例12: widget
/**
* Echo the widget content.
*
* @since 0.1.8
*
* @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
* @param array $instance The settings for the particular instance of the widget
*/
function widget($args, $instance)
{
global $wp_query;
extract($args);
//* Merge with defaults
$instance = wp_parse_args((array) $instance, $this->defaults);
echo $before_widget;
//* Set up the author bio
if (!empty($instance['title'])) {
echo $before_title . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $after_title;
}
$wp_query = new WP_Query(array('page_id' => $instance['page_id']));
if (have_posts()) {
while (have_posts()) {
the_post();
genesis_markup(array('html5' => '<article %s>', 'xhtml' => sprintf('<div class="%s">', implode(' ', get_post_class())), 'context' => 'entry'));
$image = genesis_get_image(array('format' => 'html', 'size' => $instance['image_size'], 'context' => 'featured-page-widget', 'attr' => genesis_parse_attr('entry-image-widget')));
if ($instance['show_image'] && $image) {
printf('<a href="%s" title="%s" class="%s">%s</a>', get_permalink(), the_title_attribute('echo=0'), esc_attr($instance['image_alignment']), $image);
}
if (!empty($instance['show_title'])) {
if (genesis_html5()) {
printf('<header class="entry-header"><h2 class="entry-title"><a href="%s" title="%s">%s</a></h2></header>', get_permalink(), the_title_attribute('echo=0'), get_the_title());
} else {
printf('<h2><a href="%s" title="%s">%s</a></h2>', get_permalink(), the_title_attribute('echo=0'), get_the_title());
}
}
if (!empty($instance['show_content'])) {
echo genesis_html5() ? '<div class="entry-content">' : '';
if (empty($instance['content_limit'])) {
global $more;
$more = 0;
the_content($instance['more_text']);
} else {
the_content_limit((int) $instance['content_limit'], esc_html($instance['more_text']));
}
echo genesis_html5() ? '</div>' : '';
}
if (!empty($instance['custom_text'])) {
$text = wp_kses_post($instance['custom_text']);
echo '<div class="custom-text">';
echo $instance['filter'] ? wpautop($text) : $text;
if (!empty($instance['more_text'])) {
echo '<span class="more-link"><a href="' . get_permalink($instance['page_id']) . '">' . $instance['more_text'] . '</a></span>';
}
echo '</div>';
}
genesis_markup(array('html5' => '</article>', 'xhtml' => '</div>'));
}
}
//* Restore original query
wp_reset_query();
echo $after_widget;
}
开发者ID:Bobcatou,项目名称:enhanceworldwide,代码行数:62,代码来源:wsm-featured-page.php
示例13: genesis_default_widget_area_content
/**
* Template for default widget area content.
*
* @since 2.0.0
*
* @param string $name Name of the widget area e.g. `__( 'Secondary Sidebar Widget Area', 'yourtextdomain' )`.
*/
function genesis_default_widget_area_content($name)
{
echo genesis_html5() ? '<section class="widget widget_text">' : '<div class="widget widget_text">';
echo '<div class="widget-wrap">';
printf('<h4 class="widgettitle">%s</h4>', esc_html($name));
echo '<div class="textwidget"><p>';
printf(__('This is the %s. You can add content to this area by visiting your <a href="%s">Widgets Panel</a> and adding new widgets to this area.', 'genesis'), $name, admin_url('widgets.php'));
echo '</p></div>';
echo '</div>';
echo genesis_html5() ? '</section>' : '</div>';
}
开发者ID:treydonovan,项目名称:innergame-anna,代码行数:18,代码来源:sidebar.php
示例14: custom_header_inline_logo
function custom_header_inline_logo($title, $inside, $wrap)
{
$logo = '<img src="' . get_stylesheet_directory_uri() . '/images/logo.png" alt="' . esc_attr(get_bloginfo('name')) . '" title="' . esc_attr(get_bloginfo('name')) . '" width="359" height="72" />';
$inside = sprintf('<a href="%s" title="%s">%s</a>', trailingslashit(home_url()), esc_attr(get_bloginfo('name')), $logo);
// Determine which wrapping tags to use - changed is_home to is_front_page to fix Genesis bug
$wrap = is_front_page() && 'title' === genesis_get_seo_option('home_h1_on') ? 'h1' : 'p';
// A little fallback, in case an SEO plugin is active - changed is_home to is_front_page to fix Genesis bug
$wrap = is_front_page() && !genesis_get_seo_option('home_h1_on') ? 'h1' : $wrap;
// And finally, $wrap in h1 if HTML5 & semantic headings enabled
$wrap = genesis_html5() && genesis_get_seo_option('semantic_headings') ? 'h1' : $wrap;
return sprintf('<%1$s %2$s>%3$s</%1$s>', $wrap, genesis_attr('site-title'), $inside);
}
开发者ID:Bobcatou,项目名称:plancurtail,代码行数:12,代码来源:functions.php
示例15: menu_in_footer
function menu_in_footer()
{
$class = 'menu-footer';
$args = array('menu' => 'Footer', 'container' => '', 'menu_class' => $class, 'echo' => 0, 'depth' => 1);
$nav = wp_nav_menu($args);
$nav_markup_open = genesis_markup(array('html5' => '<nav %s>', 'xhtml' => '<div id="nav">', 'context' => 'nav-footer', 'echo' => false));
$nav_markup_open .= genesis_structural_wrap('menu-footer', 'open', 0);
$nav_markup_close = genesis_structural_wrap('menu-footer', 'close', 0);
$nav_markup_close .= genesis_html5() ? '</nav>' : '</div>';
$nav_output = $nav_markup_open . $nav . $nav_markup_close;
echo $nav_output;
}
开发者ID:aroldoa,项目名称:alicepediatric,代码行数:12,代码来源:functions.php
示例16: gb_genesis_get_nav_menu
/**
* Return the markup to display a menu consistent with the Genesis format.
*
* Applies the `genesis_$location_nav` filter e.g. `genesis_header_nav`. For primary and secondary menu locations, it
* also applies the `genesis_do_nav` and `genesis_do_subnav` filters for backwards compatibility.
*
* Makes Genesis Structural Wrap optional for better Bootstrap 3 compatibility
*
* @since 2.1.0
*
* @uses genesis_markup() Contextual markup.
* @uses genesis_html5() Check for HTML5 support.
* @uses genesis_structural_wrap() Adds optional internal wrap divs.
*
* @param string $args Menu arguments.
*
* @return string Navigation menu markup.
*/
function gb_genesis_get_nav_menu($args = array(), $structural_wrap = false)
{
$args = wp_parse_args($args, array('theme_location' => '', 'container' => '', 'menu_class' => 'menu genesis-nav-menu', 'echo' => 0));
//* If a menu is not assigned to theme location, abort
if (!has_nav_menu($args['theme_location'])) {
return;
}
$sanitized_location = sanitize_key($args['theme_location']);
$nav = wp_nav_menu($args);
//* Do nothing if there is nothing to show
if (!$nav) {
return;
}
$xhtml_id = $args['theme_location'];
if ('primary' === $args['theme_location']) {
$xhtml_id = 'nav';
} elseif ('secondary' === $args['theme_location']) {
$xhtml_id = 'subnav';
}
$nav_markup_open = genesis_markup(array('html5' => '<nav %s>', 'xhtml' => '<div id="' . $xhtml_id . '">', 'context' => 'nav-' . $sanitized_location, 'echo' => false));
$nav_markup_close = '';
if ($structural_wrap) {
$nav_markup_open .= genesis_structural_wrap('menu-' . $sanitized_location, 'open', 0);
$nav_markup_close .= genesis_structural_wrap('menu-' . $sanitized_location, 'close', 0);
}
$nav_markup_close .= genesis_html5() ? '</nav>' : '</div>';
$nav_output = $nav_markup_open . $nav . $nav_markup_close;
$filter_location = 'genesis_' . $sanitized_location . '_nav';
//* Handle back-compat for primary and secondary nav filters.
if ('primary' === $args['theme_location']) {
$filter_location = 'genesis_do_nav';
} elseif ('secondary' === $args['theme_location']) {
$filter_location = 'genesis_do_subnav';
}
/**
* Filter the navigation markup.
*
* @since 2.1.0
*
* @param string $nav_output Opening container markup, nav, closing container markup.
* @param string $nav Navigation list (`<ul>`).
* @param array $args {
* Arguments for `wp_nav_menu()`.
*
* @type string $theme_location Menu location ID.
* @type string $container Container markup.
* @type string $menu_class Class(es) applied to the `<ul>`.
* @type bool $echo 0 to indicate `wp_nav_menu()` should return not echo.
* }
*/
return apply_filters($filter_location, $nav_output, $nav, $args);
}
开发者ID:Wordpress-Development,项目名称:genesis-bootstrap-1,代码行数:70,代码来源:menu.php
示例17: uci_genesis_site_description
function uci_genesis_site_description()
{
//* Set what goes inside the wrapping tags
$inside = esc_html(get_bloginfo('description'));
//* Determine which wrapping tags to use
$wrap = 'p';
//* Build the description
$description = genesis_html5() ? sprintf("<{$wrap} %s>", genesis_attr('site-description')) : sprintf('<%s id="description">%s</%s>', $wrap, $inside, $wrap);
$description .= genesis_html5() ? "{$inside}</{$wrap}>" : '';
//* Output (filtered)
$output = $inside ? apply_filters('uci_genesis_site_description', $description, $inside, $wrap) : '';
echo $output;
}
开发者ID:quantegy,项目名称:wp-genesis-child-theme,代码行数:13,代码来源:functions_site_description.php
示例18: do_front_blog_excerpt
/**
* Show optional excerpt on blog or front page.
*
* If it's not the front page and isn't home, nothing happens.
*
* If there's an excerpt and the move excerpts option is selected, it runs through `wpautop()` before being added to a div.
*
* @since 1.3.0
*
* @return null Return early if not blog/front page.
*/
public function do_front_blog_excerpt()
{
if (!is_front_page() && !is_home()) {
return;
}
// set front page and posts page variables
$title = $this->get_front_blog_title();
$itemprop = genesis_html5() ? 'itemprop="headline"' : '';
$headline = empty($title) ? '' : sprintf('<h1 class="entry-title" ' . $itemprop . '>%s</h1>', $title);
$intro_text = $this->get_front_blog_intro_text();
if ($headline || $intro_text) {
printf('<div class="excerpt">%s</div>', wp_kses_post($headline . wpautop($intro_text)));
}
}
开发者ID:stevepolitodesign,项目名称:nema-wordpress,代码行数:25,代码来源:class-displayfeaturedimagegenesis-description.php
示例19: bsg_genesis_prev_next_posts_nav
function bsg_genesis_prev_next_posts_nav()
{
$prev_link = get_previous_posts_link(apply_filters('genesis_prev_link_text', '<span aria-hidden="true">←</span> ' . __('Previous Page', 'genesis')));
$next_link = get_next_posts_link(apply_filters('genesis_next_link_text', __('Next Page', 'genesis') . ' <span aria-hidden="true">→</span>'));
$prev = $prev_link ? '<li class="previous">' . $prev_link . '</li>' : '';
$next = $next_link ? '<li class="next">' . $next_link . '</li>' : '';
$nav = genesis_markup(array('html5' => '<nav %s><ul class="pager">', 'xhtml' => '<div class="navigation"><ul class="pager">', 'context' => 'archive-pagination', 'echo' => false));
$nav .= $prev;
$nav .= $next;
$nav .= genesis_html5() ? '</ul></nav>' : '</ul></div>';
if ($prev || $next) {
echo $nav;
}
}
开发者ID:finestpixels,项目名称:riverplace2016,代码行数:14,代码来源:pagination-prev-next.php
示例20: genesis_search_form
/**
* Replace the default search form with a Genesis-specific form.
*
* The exact output depends on whether the child theme supports HTML5 or not.
*
* Applies the `genesis_search_text`, `genesis_search_button_text`, `genesis_search_form_label` and
* `genesis_search_form` filters.
*
* @since 0.2.0
*
* @uses genesis_html5() Check for HTML5 support.
*
* @return string HTML markup.
*/
function genesis_search_form()
{
$search_text = get_search_query() ? apply_filters('the_search_query', get_search_query()) : apply_filters('genesis_search_text', __('Search this website', 'genesis') . '…');
$button_text = apply_filters('genesis_search_button_text', esc_attr__('Search', 'genesis'));
$onfocus = "if ('" . esc_js($search_text) . "' === this.value) {this.value = '';}";
$onblur = "if ('' === this.value) {this.value = '" . esc_js($search_text) . "';}";
//* Empty label, by default. Filterable.
$label = apply_filters('genesis_search_form_label', '');
if (genesis_html5()) {
$form = sprintf('<form method="get" class="search-form" action="%s" role="search">%s<input type="search" name="s" placeholder="%s" /><input type="submit" value="%s" /></form>', home_url('/'), esc_html($label), esc_attr($search_text), esc_attr($button_text));
} else {
$form = sprintf('<form method="get" class="searchform search-form" action="%s" role="search" >%s<input type="text" value="%s" name="s" class="s search-input" onfocus="%s" onblur="%s" /><input type="submit" class="searchsubmit search-submit" value="%s" /></form>', home_url('/'), esc_html($label), esc_attr($search_text), esc_attr($onfocus), esc_attr($onblur), esc_attr($button_text));
}
return apply_filters('genesis_search_form', $form, $search_text, $button_text, $label);
}
开发者ID:TravisSperry,项目名称:mpa_website,代码行数:29,代码来源:search.php
注:本文中的genesis_html5函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论