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


PHP et_divi_get_top_nav_items函数代码示例

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


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

示例1: et_layout_body_class

function et_layout_body_class($classes)
{
    if (true === et_get_option('vertical_nav', false)) {
        $classes[] = 'et_vertical_nav';
    } else {
        if ('on' === et_get_option('divi_fixed_nav', 'on')) {
            $classes[] = 'et_fixed_nav';
        }
    }
    if (true === et_get_option('boxed_layout', false)) {
        $classes[] = 'et_boxed_layout';
    }
    if (true === et_get_option('cover_background', true)) {
        $classes[] = 'et_cover_background';
    }
    $et_secondary_nav_items = et_divi_get_top_nav_items();
    if ($et_secondary_nav_items->top_info_defined) {
        $classes[] = 'et_secondary_nav_enabled';
    }
    if ($et_secondary_nav_items->two_info_panels) {
        $classes[] = 'et_secondary_nav_two_panels';
    }
    if ($et_secondary_nav_items->secondary_nav && !($et_secondary_nav_items->contact_info_defined || $et_secondary_nav_items->show_header_social_icons)) {
        $classes[] = 'et_secondary_nav_only_menu';
    }
    if ('left' !== ($header_style = et_get_option('header_style', 'left'))) {
        $classes[] = esc_attr("et_header_style_{$header_style}");
    }
    if ((is_page() || is_singular('project')) && 'on' == get_post_meta(get_the_ID(), '_et_pb_side_nav', true) && et_pb_is_pagebuilder_used(get_the_ID())) {
        $classes[] = 'et_pb_side_nav_page';
    }
    if (stristr($_SERVER['HTTP_USER_AGENT'], "mac")) {
        $classes[] = 'osx';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "linux")) {
        $classes[] = 'linux';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "windows")) {
        $classes[] = 'windows';
    }
    return $classes;
}
开发者ID:ahmedghazi,项目名称:tpls,代码行数:40,代码来源:functions.php

示例2: et_layout_body_class

function et_layout_body_class($classes)
{
    if ('rgba' == substr(et_get_option('primary_nav_bg', '#ffffff'), 0, 4) && false === et_get_option('vertical_nav', false)) {
        $classes[] = 'et_transparent_nav';
    }
    // home-posts class is used by customizer > blog to work. It modifies post title and meta
    // of WP default layout (home, archive, single), but should not modify post title and meta of blog module (page as home)
    if (in_array('home', $classes) && !in_array('page', $classes)) {
        $classes[] = 'home-posts';
    }
    if (true === et_get_option('nav_fullwidth', false)) {
        if (true === et_get_option('vertical_nav', false)) {
            $classes[] = 'et_fullwidth_nav_temp';
        } else {
            $classes[] = 'et_fullwidth_nav';
        }
    }
    if (true === et_get_option('secondary_nav_fullwidth', false)) {
        $classes[] = 'et_fullwidth_secondary_nav';
    }
    if (true === et_get_option('vertical_nav', false)) {
        $classes[] = 'et_vertical_nav';
        if ('right' === et_get_option('vertical_nav_orientation', 'left')) {
            $classes[] = 'et_vertical_right';
        }
    } else {
        if ('on' === et_get_option('divi_fixed_nav', 'on')) {
            $classes[] = 'et_fixed_nav';
        } else {
            if ('on' !== et_get_option('divi_fixed_nav', 'on')) {
                $classes[] = 'et_non_fixed_nav';
            }
        }
    }
    if (true === et_get_option('vertical_nav', false) && 'on' === et_get_option('divi_fixed_nav', 'on')) {
        $classes[] = 'et_vertical_fixed';
    }
    if (true === et_get_option('boxed_layout', false)) {
        $classes[] = 'et_boxed_layout';
    }
    if (true === et_get_option('hide_nav', false) && (!is_singular() || is_singular() && 'no' !== get_post_meta(get_the_ID(), '_et_pb_post_hide_nav', true))) {
        $classes[] = 'et_hide_nav';
    } else {
        $classes[] = 'et_show_nav';
    }
    if (true === et_get_option('hide_primary_logo', false)) {
        $classes[] = 'et_hide_primary_logo';
    }
    if (true === et_get_option('hide_fixed_logo', false)) {
        $classes[] = 'et_hide_fixed_logo';
    }
    if (true === et_get_option('hide_mobile_logo', false)) {
        $classes[] = 'et_hide_mobile_logo';
    }
    if (false !== et_get_option('cover_background', true)) {
        $classes[] = 'et_cover_background';
    }
    $et_secondary_nav_items = et_divi_get_top_nav_items();
    if ($et_secondary_nav_items->top_info_defined && 'slide' !== et_get_option('header_style', 'left') && 'fullscreen' !== et_get_option('header_style', 'left')) {
        $classes[] = 'et_secondary_nav_enabled';
    }
    if ($et_secondary_nav_items->two_info_panels && 'slide' !== et_get_option('header_style', 'left') && 'fullscreen' !== et_get_option('header_style', 'left')) {
        $classes[] = 'et_secondary_nav_two_panels';
    }
    if ($et_secondary_nav_items->secondary_nav && !($et_secondary_nav_items->contact_info_defined || $et_secondary_nav_items->show_header_social_icons) && 'slide' !== et_get_option('header_style', 'left') && 'fullscreen' !== et_get_option('header_style', 'left')) {
        $classes[] = 'et_secondary_nav_only_menu';
    }
    if ('on' === get_post_meta(get_the_ID(), '_et_pb_side_nav', true) && et_pb_is_pagebuilder_used(get_the_ID())) {
        $classes[] = 'et_pb_side_nav_page';
    }
    if (true === et_get_option('et_pb_sidebar-remove_border', false)) {
        $classes[] = 'et_pb_no_sidebar_vertical_divider';
    }
    if (is_singular(array('post', 'page', 'project', 'product')) && 'on' == get_post_meta(get_the_ID(), '_et_pb_post_hide_nav', true)) {
        $classes[] = 'et_hide_nav';
    }
    if (!et_get_option('use_sidebar_width', false)) {
        $classes[] = 'et_pb_gutter';
    }
    if (stristr($_SERVER['HTTP_USER_AGENT'], "mac")) {
        $classes[] = 'osx';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "linux")) {
        $classes[] = 'linux';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "windows")) {
        $classes[] = 'windows';
    }
    $gutter_width = '' !== ($page_custom_gutter = get_post_meta(get_the_ID(), '_et_pb_gutter_width', true)) ? $page_custom_gutter : et_get_option('gutter_width', '3');
    $classes[] = esc_attr("et_pb_gutters{$gutter_width}");
    $primary_dropdown_animation = et_get_option('primary_nav_dropdown_animation', 'fade');
    $classes[] = esc_attr("et_primary_nav_dropdown_animation_{$primary_dropdown_animation}");
    $secondary_dropdown_animation = et_get_option('secondary_nav_dropdown_animation', 'fade');
    $classes[] = esc_attr("et_secondary_nav_dropdown_animation_{$secondary_dropdown_animation}");
    $footer_columns = et_get_option('footer_columns', '4');
    $classes[] = esc_attr("et_pb_footer_columns{$footer_columns}");
    $header_style = et_get_option('header_style', 'left');
    $classes[] = esc_attr("et_header_style_{$header_style}");
    if ('slide' === $header_style || 'fullscreen' === $header_style) {
        $classes[] = esc_attr("et_header_style_left");
        if ('fullscreen' === $header_style && !et_get_option('slide_nav_show_top_bar', true)) {
            // additional class if top bar disabled in Fullscreen menu
//.........这里部分代码省略.........
开发者ID:welearncodes,项目名称:traktern,代码行数:101,代码来源:functions.php

示例3: wp_head

	</script>

	<?php 
wp_head();
?>
</head>
<body <?php 
body_class();
?>
>
	<div id="page-container">
<?php 
if (is_page_template('page-template-blank.php')) {
    return;
}
$et_secondary_nav_items = et_divi_get_top_nav_items();
$et_phone_number = $et_secondary_nav_items->phone_number;
$et_email = $et_secondary_nav_items->email;
$et_contact_info_defined = $et_secondary_nav_items->contact_info_defined;
$show_header_social_icons = $et_secondary_nav_items->show_header_social_icons;
$et_secondary_nav = $et_secondary_nav_items->secondary_nav;
$et_top_info_defined = $et_secondary_nav_items->top_info_defined;
?>

	<?php 
if ($et_top_info_defined) {
    ?>
		<div id="top-header">
			<div class="container clearfix">

			<?php 
开发者ID:kfwebdev,项目名称:wp-atd,代码行数:31,代码来源:header.php

示例4: et_layout_body_class

function et_layout_body_class($classes)
{
    if (true === et_get_option('vertical_nav', false)) {
        $classes[] = 'et_vertical_nav';
    } else {
        if ('on' === et_get_option('divi_fixed_nav', 'on')) {
            $classes[] = 'et_fixed_nav';
        }
    }
    if (true === et_get_option('boxed_layout', false)) {
        $classes[] = 'et_boxed_layout';
    }
    $et_secondary_nav_items = et_divi_get_top_nav_items();
    if ($et_secondary_nav_items->top_info_defined) {
        $classes[] = 'et_secondary_nav_enabled';
    }
    if ($et_secondary_nav_items->two_info_panels) {
        $classes[] = 'et_secondary_nav_two_panels';
    }
    if ($et_secondary_nav_items->secondary_nav && !($et_secondary_nav_items->contact_info_defined || $et_secondary_nav_items->show_header_social_icons)) {
        $classes[] = 'et_secondary_nav_only_menu';
    }
    if ('left' !== ($header_style = et_get_option('header_style', 'left'))) {
        $classes[] = esc_attr("et_header_style_{$header_style}");
    }
    if (stristr($_SERVER['HTTP_USER_AGENT'], "mac")) {
        $classes[] = 'osx';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "linux")) {
        $classes[] = 'linux';
    } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "windows")) {
        $classes[] = 'windows';
    }
    return $classes;
}
开发者ID:jonbolden,项目名称:samsvapes,代码行数:34,代码来源:functions.php


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