本文整理汇总了PHP中genesis_site_layout函数的典型用法代码示例。如果您正苦于以下问题:PHP genesis_site_layout函数的具体用法?PHP genesis_site_layout怎么用?PHP genesis_site_layout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了genesis_site_layout函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: utility_pro_skip_links
/**
* Add skiplinks for screen readers and keyboard navigation
*
* @since 1.0.0
*/
function utility_pro_skip_links()
{
// Call function to add IDs to the markup
utility_skiplinks_markup();
// write HTML, skiplinks in a list with a heading
echo '<h2 class="screen-reader-text">' . __('Skip links', 'utility-pro') . '</h2>' . "\n";
echo '<ul class="wpacc-genesis-skip-link">' . "\n";
if (has_nav_menu('primary')) {
echo ' <li><a href="#genwpacc-genesis-nav-primary" class="screen-reader-shortcut">' . __('Skip to primary navigation', 'utility-pro') . '</a></li>' . "\n";
}
echo ' <li><a href="#genwpacc-genesis-content" class="screen-reader-shortcut">' . __('Skip to content', 'utility-pro') . '</a></li>' . "\n";
if ('sidebar-content' === genesis_site_layout() || 'content-sidebar' === genesis_site_layout()) {
echo ' <li><a href="#genwpacc-sidebar-primary" class="screen-reader-shortcut">' . __('Skip to primary sidebar', 'utility-pro') . '</a></li>' . "\n";
}
if (1 == current_theme_supports('genesis-footer-widgets')) {
$footer_widgets = get_theme_support('genesis-footer-widgets');
}
if (isset($footer_widgets[0]) && is_numeric($footer_widgets[0])) {
echo ' <li><a href="#genwpacc-genesis-footer-widgets" class="screen-reader-shortcut">' . __('Skip to footer widgets', 'utility-pro') . '</a></li>' . "\n";
}
if (has_nav_menu('footer')) {
echo ' <li><a href="#genwpacc-genesis-nav-footer" class="screen-reader-shortcut">' . __('Skip to footer navigation', 'utility-pro') . '</a></li>' . "\n";
}
echo '</ul>' . "\n";
}
开发者ID:ashenkar,项目名称:sanga,代码行数:30,代码来源:skip-links.php
示例2: bfg_layout_options_modify_classes_to_add
function bfg_layout_options_modify_classes_to_add($classes_to_add)
{
$layout = genesis_site_layout();
// content-sidebar // default
// full-width-content // supported
if ('full-width-content' === $layout) {
$classes_to_add['content'] = 'col-sm-12';
}
// sidebar-content // supported
if ('sidebar-content' === $layout) {
$classes_to_add['content'] = 'col-sm-8 col-sm-push-4';
$classes_to_add['sidebar-primary'] = 'col-sm-4 col-sm-pull-8';
}
// content-sidebar-sidebar // supported
if ('content-sidebar-sidebar' === $layout) {
$classes_to_add['content'] = 'col-sm-6';
$classes_to_add['sidebar-primary'] = 'col-sm-4';
$classes_to_add['sidebar-secondary'] = 'col-sm-2';
}
// sidebar-sidebar-content // supported
if ('sidebar-sidebar-content' === $layout) {
$classes_to_add['content'] = 'col-sm-6 col-sm-push-6';
$classes_to_add['sidebar-primary'] = 'col-sm-4 col-sm-pull-4';
$classes_to_add['sidebar-secondary'] = 'col-sm-2 col-sm-pull-10';
}
// sidebar-content-sidebar // supported
if ('sidebar-content-sidebar' === $layout) {
$classes_to_add['content'] = 'col-sm-6 col-sm-push-2';
$classes_to_add['sidebar-primary'] = 'col-sm-4 col-sm-push-2';
$classes_to_add['sidebar-secondary'] = 'col-sm-2 col-sm-pull-10';
}
return $classes_to_add;
}
开发者ID:WayneStratton,项目名称:Bootstrap-for-Genesis,代码行数:33,代码来源:bootstrap.php
示例3: mcg_layout_options_modify_classes_to_add
function mcg_layout_options_modify_classes_to_add($classes_to_add)
{
$layout = genesis_site_layout();
// content-sidebar // default
// full-width-content // supported
if ('full-width-content' === $layout) {
$classes_to_add['content'] = 'col s12';
}
// sidebar-content // supported
if ('sidebar-content' === $layout) {
$classes_to_add['content'] = 'col s12 m8 right';
$classes_to_add['sidebar-primary'] = 'col s12 m4 left';
}
// content-sidebar-sidebar // supported
if ('content-sidebar-sidebar' === $layout) {
$classes_to_add['content'] = 'col s12 m6';
$classes_to_add['sidebar-primary'] = 'col s12 m4';
$classes_to_add['sidebar-secondary'] = 'col s12 m2';
}
// sidebar-sidebar-content // supported
if ('sidebar-sidebar-content' === $layout) {
$classes_to_add['content'] = 'col s12 m6 right';
$classes_to_add['sidebar-primary'] = 'col s12 m4 right';
$classes_to_add['sidebar-secondary'] = 'col s12 m2 left';
}
// sidebar-content-sidebar // supported
if ('sidebar-content-sidebar' === $layout) {
$classes_to_add['content'] = 'col s12 m6';
$classes_to_add['sidebar-primary'] = 'col s12 m4';
$classes_to_add['sidebar-secondary'] = 'col s12 m2';
}
return $classes_to_add;
}
开发者ID:electricbrick,项目名称:materialize-genesis,代码行数:33,代码来源:materialize.php
示例4: bsg_layout_options_modify_classes_to_add
function bsg_layout_options_modify_classes_to_add($classes_to_add)
{
$layout = genesis_site_layout();
// content-sidebar // default
// full-width-content // supported
if ('full-width-content' === $layout) {
$classes_to_add['content'] = 'col-sm-12';
}
// sidebar-content // supported
if ('sidebar-content' === $layout) {
$classes_to_add['content'] = 'col-sm-9 col-sm-push-3';
$classes_to_add['sidebar-primary'] = 'col-sm-3 col-sm-pull-9';
}
// content-sidebar-sidebar // supported
/* if ( 'content-sidebar-sidebar' === $layout ) {
$classes_to_add['content'] = 'col-sm-6';
$classes_to_add['sidebar-primary'] = 'col-sm-3';
$classes_to_add['sidebar-secondary'] = 'col-sm-3';
}*/
// sidebar-sidebar-content // supported
/* if ( 'sidebar-sidebar-content' === $layout ) {
$classes_to_add['content'] = 'col-sm-6 col-sm-push-6';
$classes_to_add['sidebar-primary'] = 'col-sm-3 col-sm-pull-3';
$classes_to_add['sidebar-secondary'] = 'col-sm-3 col-sm-pull-9';
}*/
// sidebar-content-sidebar // supported
/*if ( 'sidebar-content-sidebar' === $layout ) {
$classes_to_add['content'] = 'col-sm-6 col-sm-push-3';
$classes_to_add['sidebar-primary'] = 'col-sm-3 col-sm-push-3';
$classes_to_add['sidebar-secondary'] = 'col-sm-3 col-sm-pull-9';
}*/
return $classes_to_add;
}
开发者ID:finestpixels,项目名称:finestpixels2015,代码行数:33,代码来源:bootstrap-markup-layout-options.php
示例5: bsg_layouts_modify_classes
function bsg_layouts_modify_classes($classes_to_add)
{
$layout = genesis_site_layout();
// full-width-content
if ('full-width-content' === $layout) {
$classes_to_add['content'] = 'col-sm-12';
}
// sidebar-content
if ('sidebar-content' === $layout) {
$classes_to_add['content'] = 'col-xs-12 col-sm-8 col-md-8 col-lg-7 col-sm-push-4 col-lg-push-4';
$classes_to_add['sidebar-primary'] = 'hidden-xs col-sm-4 col-md-4 col-lg-3 col-sm-pull-8 col-lg-pull-6';
}
// content-sidebar-sidebar
if ('content-sidebar-sidebar' === $layout) {
$classes_to_add['content'] = 'col-xs-12 col-sm-8 col-md-6';
$classes_to_add['sidebar-primary'] = 'hidden-xs col-sm-4 col-md-3';
$classes_to_add['sidebar-secondary'] = 'hidden-xs hidden-sm col-md-3';
}
// sidebar-sidebar-content
if ('sidebar-sidebar-content' === $layout) {
$classes_to_add['content'] = 'col-xs-12 col-sm-8 col-sm-push-4 col-md-6 col-md-push-6';
$classes_to_add['sidebar-primary'] = 'hidden-xs col-sm-4 col-sm-pull-8 col-md-3 col-md-pull-3';
$classes_to_add['sidebar-secondary'] = 'hidden-xs hidden-sm col-md-3 col-md-pull-9';
}
// sidebar-content-sidebar
if ('sidebar-content-sidebar' === $layout) {
$classes_to_add['content'] = 'col-xs-12 col-sm-8 col-md-6 col-md-push-3';
$classes_to_add['sidebar-primary'] = 'hidden-xs col-sm-4 col-md-3 col-md-pull-6';
$classes_to_add['sidebar-secondary'] = 'hidden-xs hidden-sm col-md-3';
}
return $classes_to_add;
}
开发者ID:Wordpress-Development,项目名称:genesis-bootstrap,代码行数:32,代码来源:site-layouts.php
示例6: ldm_full_width_classes
function ldm_full_width_classes($classes_to_add, $context, $attr)
{
$layout = genesis_site_layout();
if ('full-width-content' === $layout) {
$classes_to_add['content'] = 'col-sm-12';
}
return $classes_to_add;
}
开发者ID:tbcorr,项目名称:rocket,代码行数:8,代码来源:layout-full-width.php
示例7: ldm_sidebar_content_markup_mod
function ldm_sidebar_content_markup_mod()
{
$layout = genesis_site_layout();
if ('sidebar-content' === $layout) {
remove_action('genesis_after_content', 'genesis_get_sidebar');
add_action('genesis_before_content', 'genesis_get_sidebar');
}
}
开发者ID:tbcorr,项目名称:rocket,代码行数:8,代码来源:layout-sidebar-content.php
示例8: ldm_content_sidebar_sidebar_markup_mod
function ldm_content_sidebar_sidebar_markup_mod()
{
$layout = genesis_site_layout();
if ('content-sidebar-sidebar' === $layout) {
remove_action('genesis_after_content_sidebar_wrap', 'genesis_get_sidebar_alt');
add_action('genesis_after_content', 'genesis_get_sidebar_alt', 15);
}
}
开发者ID:tbcorr,项目名称:rocket,代码行数:8,代码来源:layout-content-sidebar-sidebar.php
示例9: be_no_sidebar
/**
* Custom Loop for Archive Layout
* @author Bill Erickson
* @link http://www.billerickson.net/wordpress-genesis-custom-layout/
*/
function be_no_sidebar()
{
$site_layout = genesis_site_layout();
if ('no-sidebar' == $site_layout) {
be_no_sidebar();
} else {
genesis_standard_loop();
}
}
开发者ID:katstar01,项目名称:sydneys-specialorder-theme,代码行数:14,代码来源:layout-nosidebar.php
示例10: ldm_sidebar_sidebar_content_markup_mod
function ldm_sidebar_sidebar_content_markup_mod()
{
$layout = genesis_site_layout();
if ('sidebar-sidebar-content' === $layout) {
// secondary sidebar
remove_action('genesis_after_content_sidebar_wrap', 'genesis_get_sidebar_alt');
add_action('genesis_before_content', 'genesis_get_sidebar_alt', 5);
// primary sidebar
remove_action('genesis_after_content', 'genesis_get_sidebar');
add_action('genesis_before_content', 'genesis_get_sidebar', 10);
}
}
开发者ID:tbcorr,项目名称:rocket,代码行数:12,代码来源:layout-sidebar-sidebar-content.php
示例11: change_sidebar_order
/**
* Swap Primary and Secondary Sidebars on Sidebar-Sidebar-Content
*
* @author Bill Erickson
* @link http://www.billerickson.net/switch-genesis-sidebars/
*/
function change_sidebar_order()
{
$site_layout = genesis_site_layout();
if ('sidebar-content-sidebar' == $site_layout) {
// Remove the Primary Sidebar from the Primary Sidebar area.
remove_action('genesis_sidebar', 'genesis_do_sidebar');
// Remove the Secondary Sidebar from the Secondary Sidebar area.
remove_action('genesis_sidebar_alt', 'genesis_do_sidebar_alt');
// Place the Secondary Sidebar into the Primary Sidebar area.
add_action('genesis_sidebar', 'genesis_do_sidebar_alt');
// Place the Primary Sidebar into the Secondary Sidebar area.
add_action('genesis_sidebar_alt', 'genesis_do_sidebar');
}
}
开发者ID:dkenzik,项目名称:genesis-starter-grunt-sass,代码行数:20,代码来源:theme-views.php
示例12: ssm_layout_options_modify_classes_to_add
function ssm_layout_options_modify_classes_to_add($classes_to_add)
{
$layout = genesis_site_layout();
// content-sidebar // default
// full-width-content // supported
if ('full-width-content' === $layout) {
$classes_to_add['content'] = array('small-12', 'column');
}
// sidebar-content
// - same markup as content-sidebar with css modifications rather than markup
// content-sidebar-sidebar // not yet supported
// sidebar-sidebar-content // not yet supported
// sidebar-content-sidebar // not yet supported
return $classes_to_add;
}
开发者ID:Wordpress-Development,项目名称:genesis-foundation,代码行数:15,代码来源:genesis-markup.php
示例13: msdlab_bootstrap_sidebar_alt
function msdlab_bootstrap_sidebar_alt($attributes)
{
$layout = genesis_site_layout();
$template = get_page_template();
switch ($layout) {
case 'content-sidebar':
case 'sidebar-content':
$attributes['class'] .= ' row col-md-4 col-12sm';
break;
case 'content-sidebar-sidebar':
case 'sidebar-sidebar-content':
case 'sidebar-content-sidebar':
$attributes['class'] .= ' row col-md-4 col-12sm';
break;
case 'full-width-content':
$attributes['class'] .= ' hidden';
break;
}
return $attributes;
}
开发者ID:foxydot,项目名称:daretocare,代码行数:20,代码来源:genesis_bootstrap_hooks.php
示例14: ygf_layout_options_modify_classes_to_add
function ygf_layout_options_modify_classes_to_add($classes_to_add)
{
$layout = genesis_site_layout();
// full-width-content // supported
// content-sidebar // default
if ('content-sidebar' === $layout) {
$classes_to_add['content'] .= ' small-12 medium-7 large-8 xlarge-9';
$classes_to_add['sidebar-primary'] .= ' small-12 medium-5 large-4 xlarge-3';
}
// sidebar-content
if ('sidebar-content' === $layout) {
$classes_to_add['content'] .= ' small-12 medium-7 medium-push-5 large-8 large-push-4 xlarge-9 xlarge-push-3';
$classes_to_add['sidebar-primary'] .= ' small-12 medium-5 medium-pull-7 large-4 large-pull-8 xlarge-3 xlarge-pull-9';
}
// content-sidebar-sidebar
if ('content-sidebar-sidebar' === $layout) {
$classes_to_add['content'] .= ' small-12 medium-4 large-6 xlarge-8';
$classes_to_add['sidebar-primary'] .= ' small-12 medium-4 large-3 xlarge-2';
$classes_to_add['sidebar-secondary'] .= ' small-12 medium-4 large-3 xlarge-2';
}
// sidebar-sidebar-content // not yet supported
if ('sidebar-sidebar-content' === $layout) {
$classes_to_add['content'] .= ' small-12 medium-4 medium-push-8 large-6 large-push-6 xlarge-8 xlarge-push-4';
$classes_to_add['sidebar-primary'] .= ' small-12 medium-4 medium-pull-4 large-3 large-pull-6 xlarge-2 xlarge-pull-8';
$classes_to_add['sidebar-secondary'] .= ' small-12 medium-4 medium-pull-4 large-3 large-pull-6 xlarge-2 xlarge-pull-8';
}
// sidebar-content-sidebar
if ('sidebar-content-sidebar' === $layout) {
$classes_to_add['content'] .= ' small-12 medium-4 medium-push-4 large-6 large-push-3 xlarge-8 xlarge-push-2';
$classes_to_add['sidebar-primary'] .= ' small-12 medium-4 medium-pull-4 large-3 large-pull-6 xlarge-2 xlarge-pull-8';
$classes_to_add['sidebar-secondary'] .= ' small-12 medium-4 large-3 xlarge-2';
}
return $classes_to_add;
}
开发者ID:brianjking,项目名称:genesis-foundation-child-theme,代码行数:34,代码来源:markup.php
示例15: msd_new_custom_layout_logic
function msd_new_custom_layout_logic()
{
$site_layout = genesis_site_layout();
if ($site_layout == 'sidebar-content-sidebar') {
// Remove default genesis sidebars
remove_action('genesis_after_content', 'genesis_get_sidebar');
remove_action('genesis_after_content_sidebar_wrap', 'genesis_get_sidebar_alt');
// Add layout specific sidebars
add_action('genesis_before_content_sidebar_wrap', 'genesis_get_sidebar');
add_action('genesis_after_content', 'genesis_get_sidebar_alt');
}
}
开发者ID:foxydot,项目名称:madvia,代码行数:12,代码来源:genesis_tweaks.php
示例16: mov_attr_sidebar_secondary
/**
* Add Bootstrap grid classes to the secondary sidebar.
* Apply classes for different laypout settings.
*
* @since 1.0.0
*
* Reference: genesis/lib/functions/markup.php - genesis/lib/functions/layout.php
*/
function mov_attr_sidebar_secondary($attributes)
{
$layout = genesis_site_layout();
if ('content-sidebar-sidebar' == $layout) {
$column_class = 'col-lg-2 col-md-4 col-sm-6 pull-right';
}
if ('sidebar-sidebar-content' == $layout) {
$column_class = 'col-lg-2 col-lg-pull-10 col-md-4 col-md-pull-8 col-sm-6';
}
if ('sidebar-content-sidebar' == $layout) {
$column_class = 'col-lg-2 col-lg-pull-10 col-md-3 col-md-pull-9 col-sm-6';
}
$attributes['class'] = apply_filters("mov_sidebar-secondary_class_{$layout}", $column_class) . ' sidebar sidebar-secondary widget-area';
return $attributes;
}
开发者ID:jKratzik,项目名称:Movelize,代码行数:23,代码来源:bootstrap-markup.php
示例17: genesis_skip_links
/**
* Add skiplinks for screen readers and keyboard navigation
*
* @since 2.2.0
*/
function genesis_skip_links()
{
if (!genesis_a11y('skip-links')) {
return;
}
// Call function to add IDs to the markup
genesis_skiplinks_markup();
// Determine which skip links are needed
$links = array();
if (genesis_nav_menu_supported('primary') && has_nav_menu('primary')) {
$links['genesis-nav-primary'] = __('Skip to primary navigation', 'genesis');
}
$links['genesis-content'] = __('Skip to content', 'genesis');
if ('full-width-content' != genesis_site_layout()) {
$links['genesis-sidebar-primary'] = __('Skip to primary sidebar', 'genesis');
}
if (in_array(genesis_site_layout(), array('sidebar-sidebar-content', 'sidebar-content-sidebar', 'content-sidebar-sidebar'))) {
$links['genesis-sidebar-secondary'] = __('Skip to secondary sidebar', 'genesis');
}
if (current_theme_supports('genesis-footer-widgets')) {
$footer_widgets = get_theme_support('genesis-footer-widgets');
if (isset($footer_widgets[0]) && is_numeric($footer_widgets[0])) {
if (is_active_sidebar('footer-1')) {
$links['genesis-footer-widgets'] = __('Skip to footer', 'genesis');
}
}
}
/**
* Filter the skip links.
*
* @since 2.2.0
*
* @param array $links {
* Default skiplinks.
*
* @type string HTML ID attribute value to link to.
* @type string Anchor text.
* }
*/
$links = apply_filters('genesis_skip_links_output', $links);
// write HTML, skiplinks in a list with a heading
$skiplinks = '<section>';
$skiplinks .= '<h2 class="screen-reader-text">' . __('Skip links', 'genesis') . '</h2>';
$skiplinks .= '<ul class="genesis-skip-link">';
// Add markup for each skiplink
foreach ($links as $key => $value) {
$skiplinks .= '<li><a href="' . esc_url('#' . $key) . '" class="screen-reader-shortcut"> ' . $value . '</a></li>';
}
$skiplinks .= '</ul>';
$skiplinks .= '</section>' . "\n";
echo $skiplinks;
}
开发者ID:robalford,项目名称:alfordhomesinc,代码行数:57,代码来源:header.php
示例18: ddw_gle_layouts_frontend_styles
/**
* Load our additional frontend helper styles if alternate layouts are used.
*
* @since 2.0.0
*
* @uses genesis_site_layout()
* @uses genesis_get_option()
* @uses wp_enqueue_style()
*
* @param string $gle_site_layout
*/
function ddw_gle_layouts_frontend_styles()
{
/** Bail early if Genesis is not present, i.e. if Jetpack Mobile Theme is active */
if (!function_exists('genesis_site_layout')) {
return;
}
/** Get registered layouts */
$gle_site_layout = genesis_site_layout();
/** Enqueue style based on current layout */
if ('sidebars-below-content' == $gle_site_layout && genesis_get_option('gle_layout_styles_sbc', GLE_SETTINGS_FIELD)) {
wp_enqueue_style('gle-layout-sbc');
} elseif (('content-sidebaralt' == $gle_site_layout || 'sidebaralt-content' == $gle_site_layout) && genesis_get_option('gle_layout_styles_2col', GLE_SETTINGS_FIELD)) {
wp_enqueue_style('gle-layout-2col');
} elseif (('content-sidebaralt-sidebar' == $gle_site_layout || 'sidebar-sidebaralt-content' == $gle_site_layout || 'sidebar-content-sidebaralt' == $gle_site_layout) && genesis_get_option('gle_layout_styles_3col', GLE_SETTINGS_FIELD)) {
wp_enqueue_style('gle-layout-3col');
} elseif (('primary-below-content' == $gle_site_layout || 'primary-above-content' == $gle_site_layout) && genesis_get_option('gle_layout_styles_prims', GLE_SETTINGS_FIELD)) {
wp_enqueue_style('gle-layout-prims');
} elseif ('headernav-content-sidebar' == $gle_site_layout && genesis_get_option('gle_layout_styles_hncs', GLE_SETTINGS_FIELD)) {
wp_enqueue_style('gle-layout-hncs');
}
// end if layout check
}
开发者ID:jonpetersen,项目名称:PHTC,代码行数:33,代码来源:gle-frontend.php
示例19: _e
<p><?php
_e('Full Width Content Layout Widths', 'dynamik');
?>
</p>
</div>
<div class="dynamik-design-option">
<p>
<?php
_e('Content', 'dynamik');
?>
<input type="text" id="dynamik-content-width-no-sb" class="dynamik-width-option" name="dynamik[cc_width_no_sb]" value="<?php
echo dynamik_design_options_defaults(true, 'cc_width_no_sb');
?>
" style="width:40px;" /><?php
_e('px', 'dynamik');
?>
<?php
_e(' | Wrap Width: ', 'dynamik');
?>
<strong><span id="calculated-width-no-sb" <?php
if (genesis_site_layout() == 'full-width-content') {
echo 'class="default-layout-wrap-width"';
}
?>
>960</span></strong>px
</p>
</div>
</div>
</div>
</div>
开发者ID:kabrewer07,项目名称:mrw,代码行数:31,代码来源:design-widths.php
示例20: genesis_get_sidebar_alt
/**
* Output the sidebar_alt.php file if layout allows for it.
*
* @since 0.2.0
*
* @uses genesis_site_layout() Return the site layout for different contexts.
*/
function genesis_get_sidebar_alt()
{
$site_layout = genesis_site_layout();
//* Don't load sidebar-alt on pages that don't need it
if (in_array($site_layout, array('content-sidebar', 'sidebar-content', 'full-width-content'))) {
return;
}
get_sidebar('alt');
}
开发者ID:treydonovan,项目名称:innergame-anna,代码行数:16,代码来源:layout.php
注:本文中的genesis_site_layout函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论