• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wpex_global_obj函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: localize

 /**
  * Localize scripts
  *
  * @since 2.1.0
  */
 public function localize($array)
 {
     // Add lightbox settings to array
     $array['iLightbox'] = array('skin' => wpex_global_obj('lightbox_skin'), 'path' => 'horizontal', 'controls' => array('arrows' => wpex_get_mod('lightbox_arrows', true), 'thumbnail' => wpex_get_mod('lightbox_thumbnails', true), 'fullscreen' => wpex_get_mod('lightbox_fullscreen', true), 'mousewheel' => wpex_get_mod('lightbox_mousewheel', false)), 'effects' => array('loadedFadeSpeed' => 50, 'fadeSpeed' => 500), 'show' => array('title' => wpex_get_mod('lightbox_titles', true), 'speed' => 200), 'hide' => array('speed' => 200), 'overlay' => array('blur' => true, 'opacity' => 0.9), 'social' => array('start' => true, 'show' => 'mouseenter', 'hide' => 'mouseleave', 'buttons' => false));
     // Return array
     return $array;
 }
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:12,代码来源:ilightbox.php


示例2: generate

 /**
  * Generates the CSS output
  *
  * @since 2.0.0
  */
 public static function generate($output)
 {
     // Define main variables
     $css = '';
     // Fix for Fonts In the Visual Composer
     if (wpex_global_obj('vc_is_inline')) {
         $css .= '.wpb_row .fa:before { box-sizing:content-box!important; -moz-box-sizing:content-box!important; -webkit-box-sizing:content-box!important; }';
     }
     // Fixes for full-width layout when custom background is added
     if ('full-width' == wpex_global_obj('main_layout') && (wpex_get_mod('background_color') || wpex_get_mod('background_image'))) {
         $css .= '.wpex-sticky-header-holder{background:none;}';
     }
     // Remove header border if custom color is set
     if (wpex_get_mod('header_background')) {
         $css .= '.is-sticky #site-header{border-color:transparent;}';
     }
     // Overlay Header font size
     if (wpex_global_obj('has_overlay_header') && ($font_size = get_post_meta(wpex_global_obj('post_id'), 'wpex_overlay_header_font_size', true))) {
         $css .= '#site-navigation, #site-navigation .dropdown-menu a{font-size:' . intval($font_size) . 'px;}';
     }
     /*-----------------------------------------------------------------------------------*/
     /*  - Return CSS
     			/*-----------------------------------------------------------------------------------*/
     if (!empty($css)) {
         $output .= '/*ADVANCED STYLING CSS*/' . $css;
     }
     // Return output css
     return $output;
 }
开发者ID:iq007,项目名称:MadScape,代码行数:34,代码来源:advanced-styling.php


示例3: display_element

 function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output)
 {
     // Define vars
     $id_field = $this->db_fields['id'];
     $header_style = wpex_global_obj('header_style');
     // Down Arrows
     if (!empty($children_elements[$element->{$id_field}]) && $depth == 0) {
         $element->classes[] = 'dropdown';
         if (wpex_get_mod('menu_arrow_down')) {
             $arrow_class = 'six' == $header_style ? 'fa-chevron-right' : 'fa-angle-down';
             $element->title .= ' <span class="nav-arrow top-level fa ' . $arrow_class . '"></span>';
         }
     }
     // Right/Left Arrows
     if (!empty($children_elements[$element->{$id_field}]) && $depth > 0) {
         $element->classes[] = 'dropdown';
         if (wpex_get_mod('menu_arrow_side', true)) {
             if (is_rtl()) {
                 $element->title .= '<span class="nav-arrow second-level fa fa-angle-left"></span>';
             } else {
                 $element->title .= '<span class="nav-arrow second-level fa fa-angle-right"></span>';
             }
         }
     }
     // Remove current menu item when using local-scroll class
     if (in_array('local-scroll', $element->classes) && in_array('current-menu-item', $element->classes)) {
         $key = array_search('current-menu-item', $element->classes);
         unset($element->classes[$key]);
     }
     // Define walker
     Walker_Nav_Menu::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
 }
开发者ID:iq007,项目名称:MadScape,代码行数:32,代码来源:menu-functions.php


示例4: generate

        /**
         * Generates the CSS output
         *
         * @since 2.0.0
         */
        public static function generate($output)
        {
            // Define main variables
            $css = '';
            /*-----------------------------------------------------------------------------------*/
            /*  - Logo Max Widths
            			/*-----------------------------------------------------------------------------------*/
            // Desktop
            if ($width = wpex_get_mod('logo_max_width')) {
                $css .= '@media only screen and (min-width: 960px) {
							#site-logo img {
								max-width: ' . wpex_sanitize_data($width, 'px_pct') . ';
							}
						}';
            }
            // Tablet Portrait
            if ($width = wpex_get_mod('logo_max_width_tablet_portrait')) {
                $css .= '@media only screen and (min-width: 768px) and (max-width: 959px) {
							#site-logo img {
								max-width: ' . wpex_sanitize_data($width, 'px_pct') . ';
							}
						}';
            }
            // Phone
            if ($width = wpex_get_mod('logo_max_width_phone')) {
                $css .= '@media only screen and (max-width: 767px) {
							#site-logo img {
								max-width: ' . wpex_sanitize_data($width, 'px_pct') . ';
							}
						}';
            }
            /*-----------------------------------------------------------------------------------*/
            /*  - Other
            			/*-----------------------------------------------------------------------------------*/
            // Fixes for full-width layout when custom background is added
            if ('full-width' == wpex_global_obj('main_layout') && (wpex_get_mod('background_color') || wpex_get_mod('background_image'))) {
                $css .= '.wpex-sticky-header-holder{background:none;}';
            }
            // Fix for Fonts In the Visual Composer
            if (wpex_global_obj('vc_is_inline')) {
                $css .= '.wpb_row .fa:before { box-sizing:content-box!important; -moz-box-sizing:content-box!important; -webkit-box-sizing:content-box!important; }';
            }
            // Remove header border if custom color is set
            if (wpex_get_mod('header_background')) {
                $css .= '.is-sticky #site-header{border-color:transparent;}';
            }
            // Overlay Header font size
            if (wpex_global_obj('has_overlay_header') && ($font_size = get_post_meta(wpex_global_obj('post_id'), 'wpex_overlay_header_font_size', true))) {
                $css .= '#site-navigation, #site-navigation .dropdown-menu a{font-size:' . intval($font_size) . 'px;}';
            }
            /*-----------------------------------------------------------------------------------*/
            /*  - Return CSS
            			/*-----------------------------------------------------------------------------------*/
            if (!empty($css)) {
                $output .= '/*ADVANCED STYLING CSS*/' . $css;
            }
            // Return output css
            return $output;
        }
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:64,代码来源:advanced-styling.php


示例5: parse_center_row

 /**
  * Convert center row into bool
  *
  * @since 2.0.2
  */
 private function parse_center_row($value)
 {
     if (!empty($this->atts['full_width'])) {
         $this->atts['center_row'] = false;
     } elseif ('yes' == $value && 'full-screen' == wpex_global_obj('post_layout')) {
         $this->atts['center_row'] = true;
     } else {
         $this->atts['center_row'] = false;
     }
 }
开发者ID:iq007,项目名称:MadScape,代码行数:15,代码来源:parse-row-atts.php


示例6: wpex_get_post_layout

/**
 * Returns defined post layout for curent post
 *
 * @since 2.0.0
 */
function wpex_get_post_layout()
{
    // Get global object
    $obj = wpex_global_obj();
    // Return post layout if defined
    if (!empty($obj->post_layout)) {
        return $obj->post_layout;
    } else {
        return wpex_post_layout();
    }
}
开发者ID:iq007,项目名称:MadScape,代码行数:16,代码来源:post-layout.php


示例7: wpex_wcmenucart_menu_item

    function wpex_wcmenucart_menu_item()
    {
        // Vars
        global $woocommerce;
        $icon_style = wpex_get_mod('woo_menu_icon_style', 'drop-down');
        $custom_link = wpex_get_mod('woo_menu_icon_custom_link');
        $header_style = wpex_global_obj('header_style');
        // URL
        if ('custom-link' == $icon_style && $custom_link) {
            $url = esc_url($custom_link);
        } else {
            $cart_id = woocommerce_get_page_id('cart');
            if (function_exists('icl_object_id')) {
                $cart_id = icl_object_id($cart_id, 'page');
            }
            $url = get_permalink($cart_id);
        }
        // Cart total
        $display = wpex_get_mod('woo_menu_icon_display', 'icon_count');
        if ('icon_total' == $display) {
            $cart_extra = WC()->cart->get_cart_total();
            $cart_extra = str_replace('amount', 'wcmenucart-details', $cart_extra);
        } elseif ('icon_count' == $display) {
            $cart_extra = '<span class="wcmenucart-details count">' . WC()->cart->cart_contents_count . '</span>';
        } else {
            $cart_extra = '';
        }
        // Cart Icon
        $cart_icon = '<span class="fa fa-shopping-cart"></span><span class="wcmenucart-text">' . _x('Shop', 'Navbar Cart Text For Vertical Nav', 'wpex') . '</span>';
        $cart_icon = apply_filters('wpex_menu_cart_icon_html', $cart_icon);
        ob_start();
        ?>

			<a href="<?php 
        echo $url;
        ?>
" class="wcmenucart" title="<?php 
        _e('Your Cart', 'wpex');
        ?>
">
				<span class="link-inner">
					<span class="wcmenucart-count"><?php 
        echo $cart_icon;
        echo $cart_extra;
        ?>
</span>
				</span>
			</a>
			
		<?php 
        return ob_get_clean();
    }
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:52,代码来源:woocommerce-helpers.php


示例8: gaps_menu_two_three

 /**
  * Custom function for displaying menu styles 2 and 3 required for this skin
  *
  * @since 2.0.2
  */
 public function gaps_menu_two_three()
 {
     // Get current filter
     $filter = current_filter();
     // Set bool variable
     $get = false;
     // Check current filter against header style
     if (in_array(wpex_global_obj('header_style'), array('two', 'three')) && 'wpex_hook_main_before' == $filter) {
         $get = true;
     }
     // Get menu template part
     if ($get) {
         get_template_part('partials/header/header-menu');
     }
 }
开发者ID:iq007,项目名称:MadScape,代码行数:20,代码来源:gaps-skin.php


示例9: wpex_has_menu_search

/**
 * Check if search icon should be in the nav
 *
 * @since 1.0.0
 */
function wpex_has_menu_search()
{
    // Return false by default
    $return = false;
    // Get header style
    $header_style = wpex_global_obj('header_style');
    // Always return true for the header style 2, we can hide via CSS
    if ('two' == $header_style) {
        $return = true;
    } elseif (wpex_get_mod('main_search', true)) {
        $return = true;
    }
    // Apply filters
    $return = apply_filters('wpex_has_menu_search', $return);
    // Return
    return $return;
}
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:22,代码来源:conditionals.php


示例10: wpex_add_search_to_menu

/**
 * Adds the search icon to the menu items
 *
 * @since 1.0.0
 */
function wpex_add_search_to_menu($items, $args)
{
    // Only used on main menu
    if ('main_menu' != $args->theme_location) {
        return $items;
    }
    // Get search style
    $search_style = wpex_global_obj('menu_search_style');
    // Return if disabled
    if (!$search_style || 'disabled' == $search_style) {
        return $items;
    }
    // Get header style
    $header_style = wpex_global_obj('header_style');
    // Get correct search icon class
    if ('overlay' == $search_style) {
        $class = ' search-overlay-toggle';
    } elseif ('drop_down' == $search_style) {
        $class = ' search-dropdown-toggle';
    } elseif ('header_replace' == $search_style) {
        $class = ' search-header-replace-toggle';
    } else {
        $class = '';
    }
    // Add search item to menu
    $items .= '<li class="search-toggle-li wpex-menu-extra">';
    $items .= '<a href="#" class="site-search-toggle' . $class . '">';
    $items .= '<span class="link-inner">';
    $items .= '<span class="fa fa-search"></span>';
    if ('six' == $header_style) {
        $items .= '<span class="wpex-menu-search-text">' . _x('Search', 'Navbar Search Text For Vertical Nav', 'wpex') . '</span>';
    }
    $items .= '</span>';
    $items .= '</a>';
    $items .= '</li>';
    // Return nav $items
    return $items;
}
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:43,代码来源:search-functions.php


示例11: get_css

        /**
         * Retrieves cached CSS or generates the responsive CSS
         *
         * @since 1.6.3
         */
        public static function get_css($output)
        {
            // Define vars
            $css = $add_css = '';
            $main_layout = wpex_global_obj('main_layout');
            $active_skin = wpex_global_obj('skin');
            /*-----------------------------------------------------------------------------------*/
            /*  - Max Width
            			/*-----------------------------------------------------------------------------------*/
            // Max Width
            if ($max_width = wpex_get_mod('container_max_width', false)) {
                $css .= 'body.wpex-responsive .container,
						 body.wpex-responsive .vc_row-fluid.container {
							max-width:' . $max_width . ';
						}';
            }
            /*-----------------------------------------------------------------------------------*/
            /*  - Desktop Width
            			/*-----------------------------------------------------------------------------------*/
            // Main Container With
            if ($width = wpex_get_mod('main_container_width', false)) {
                if ('boxed' == $main_layout || 'gaps' == $active_skin) {
                    $add_css .= '.boxed-main-layout #wrap { width:' . $width . '; }';
                } else {
                    $add_css .= '.container,
								.vc_row-fluid.container {
									width: ' . $width . ' !important;
									max-width:none;
								}';
                }
            }
            // Left container width
            if ($width = wpex_get_mod('left_container_width', false)) {
                $add_css .= '.content-area{
								width:' . $width . ';
								max-width:none;
							}';
            }
            // Sidebar width
            if ($width = wpex_get_mod('sidebar_width', false)) {
                $add_css .= '#sidebar{
								width: ' . $width . ';
								max-width:none;
							}';
            }
            // Add to $css var
            if ($add_css) {
                $css .= $add_css;
                $add_css = '';
            }
            /*-----------------------------------------------------------------------------------*/
            /*  - Tablet Landscape & Small Screen Widths
            			/*-----------------------------------------------------------------------------------*/
            // Main Container With
            if ($width = wpex_get_mod('tablet_landscape_main_container_width', false)) {
                if ('boxed' == $main_layout || 'gaps' == $active_skin) {
                    $add_css .= '.boxed-main-layout #wrap{
									width:' . $width . ';
									max-width:none;
								}';
                } else {
                    $add_css .= '.container,
								.vc_row-fluid.container {
									width: ' . $width . ' !important;
									max-width:none;
								}';
                }
            }
            // Left container width
            if ($width = wpex_get_mod('tablet_landscape_left_container_width', false)) {
                $add_css .= '.content-area{
								width:' . $width . ';
								max-width:none;
							}';
            }
            // Sidebar width
            if ($width = wpex_get_mod('tablet_landscape_sidebar_width', false)) {
                $add_css .= '#sidebar{
								width: ' . $width . ';
								max-width:none;
							}';
            }
            // Add to $css var
            if ($add_css) {
                $css .= '@media only screen and (min-width: 960px) and (max-width: 1280px) {
							' . $add_css . '
						}';
                $add_css = '';
            }
            /*-----------------------------------------------------------------------------------*/
            /*  - Tablet Widths
            			/*-----------------------------------------------------------------------------------*/
            // Main Container With
            if ($width = wpex_get_mod('tablet_main_container_width', false)) {
                if ('boxed' == $main_layout || 'gaps' == $active_skin) {
//.........这里部分代码省略.........
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:101,代码来源:site-layouts.php


示例12: apply_filters

 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
// Menu Location
$menu_location = apply_filters('wpex_main_menu_location', 'main_menu');
// Multisite global menu
$ms_global_menu = apply_filters('wpex_ms_global_menu', false);
// Display if menu is defined
if (has_nav_menu($menu_location) || $ms_global_menu) {
    ?>

	<?php 
    // Closing toggle for the sidr mobile menu style
    if ('sidr' == wpex_global_obj('mobile_menu_style')) {
        ?>

		<div id="sidr-close"><a href="#sidr-close" class="toggle-sidr-close"></a></div>

	<?php 
    }
    ?>

	<div id="wpex-mobile-menu-fixed-top" class="clr wpex-hidden">
		<div class="container clr">
			<a href="#mobile-menu" class="mobile-menu-toggle"><?php 
    echo apply_filters('wpex_mobile_menu_open_button_text', '<span class="fa fa-navicon"></span>');
    echo wpex_get_mod('mobile_menu_toggle_text', _x('Menu', 'Mobile Menu Toggle Button Text', 'wpex'));
    ?>
</a>
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:31,代码来源:header-menu-mobile-fixed-top.php


示例13: wpex_header_logo_url

<?php

/**
 * Header Logo
 *
 * @package Total WordPress Theme
 * @subpackage Partials
 * @version 3.0.0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
// Define variables
$logo_url = wpex_header_logo_url();
$logo_img = wpex_global_obj('header_logo');
$overlay_logo = wpex_header_overlay_logo();
$logo_icon = wpex_header_logo_icon();
$logo_title = wpex_header_logo_title();
?>

<div id="site-logo" class="<?php 
echo wpex_header_logo_classes();
?>
">

	<div id="site-logo-inner" class="clr">

		<?php 
if ($logo_img || $overlay_logo) {
    ?>
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:31,代码来源:header-logo.php


示例14: vc_css_ids

 /**
  * Load VC CSS
  *
  * @since 2.0.0
  */
 public static function vc_css_ids($css)
 {
     $ids = wpex_global_obj('vc_css_ids');
     if (!$ids) {
         return $css;
     }
     foreach ($ids as $id) {
         if ($id != wpex_global_obj('post_id') && ($vc_css = get_post_meta($id, '_wpb_shortcodes_custom_css', true))) {
             $css .= '/*VC META CSS*/' . $vc_css;
         }
     }
     return $css;
 }
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:18,代码来源:vc-config.php


示例15: wpex_retina_logo

/**
 * Adds js for the retina logo
 *
 * @since 1.1.0
 */
function wpex_retina_logo()
{
    // Get theme options
    $logo_url = wpex_get_mod('retina_logo');
    $logo_height = wpex_get_mod('retina_logo_height');
    // Translate theme mods
    $logo_url = wpex_translate_theme_mod('retina_logo', $logo_url);
    $logo_height = wpex_translate_theme_mod('retina_logo_height', $logo_height);
    // Header overlay Retina logo
    if (wpex_header_overlay_logo() && wpex_global_obj('has_overlay_header')) {
        $post_id = wpex_global_obj('post_id');
        $overlay_retina_logo = get_post_meta($post_id, 'wpex_overlay_header_logo_retina', true);
        $overlay_retina_logo_height = get_post_meta($post_id, 'wpex_overlay_header_logo_retina_height', true);
        if ($overlay_retina_logo && $overlay_retina_logo_height) {
            if (is_numeric($overlay_retina_logo)) {
                $overlay_retina_logo = wp_get_attachment_image_src($overlay_retina_logo, 'full');
                $overlay_retina_logo = $overlay_retina_logo[0];
            } else {
                $overlay_retina_logo = esc_url($overlay_retina_logo);
            }
            if ($overlay_retina_logo) {
                $logo_url = $overlay_retina_logo;
                $logo_height = $overlay_retina_logo_height;
            }
        }
    }
    // Apply filters
    $logo_url = apply_filters('wpex_retina_logo_url', $logo_url);
    $logo_height = apply_filters('wpex_retina_logo_height', $logo_height);
    // Output JS for retina logo
    if ($logo_url && $logo_height) {
        $output = '<!-- Retina Logo -->
					<script type="text/javascript">
						var $wpexRetinaLogo = "' . $logo_url . '",
							$wpexRetinaLogoHeight = "' . intval($logo_height) . '";
						jQuery(function($){
							if ( window.devicePixelRatio >= 2 ) {
								$("#site-logo img").attr("src", "' . $logo_url . '");
								$("#site-logo img").css("max-height", "' . intval($logo_height) . 'px");
							}
						});
					</script>';
        echo $output;
    }
}
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:50,代码来源:header-functions.php


示例16: wpex_title

/**
 * Returns the correct title to display for any post/page/archive
 *
 * @package Total WordPress Theme
 * @subpackage Framework
 * @version 3.3.0
 */
function wpex_title()
{
    // Default title is null
    $title = NULL;
    // Get post ID from global object
    $post_id = wpex_global_obj('post_id');
    // Homepage - display blog description if not a static page
    if (is_front_page() && !is_singular('page')) {
        if (get_bloginfo('description')) {
            $title = get_bloginfo('description');
        } else {
            return esc_html__('Recent Posts', 'total');
        }
        // Homepage posts page
    } elseif (is_home() && !is_singular('page')) {
        $title = get_the_title(get_option('page_for_posts', true));
    } elseif (is_search()) {
        global $wp_query;
        $title = '<span id="search-results-count">' . $wp_query->found_posts . '</span> ' . esc_html__('Search Results Found', 'total');
    } elseif (is_archive()) {
        // Author
        if (is_author()) {
            /*$title = sprintf(
            			esc_html__( 'All posts by%s', 'total' ),': <span class="vcard">' . get_the_author() . '</span>'
            		);*/
            $title = get_the_archive_title();
        } elseif (is_post_type_archive()) {
            $title = post_type_archive_title('', false);
        } elseif (is_day()) {
            $title = sprintf(esc_html__('Daily Archives: %s', 'total'), get_the_date());
        } elseif (is_month()) {
            $title = sprintf(esc_html__('Monthly Archives: %s', 'total'), get_the_date(esc_html_x('F Y', 'Page title monthly archives date format', 'total')));
        } elseif (is_year()) {
            $title = sprintf(esc_html__('Yearly Archives: %s', 'total'), get_the_date(esc_html_x('Y', 'Page title yearly archives date format', 'total')));
        } else {
            // Get term title
            $title = single_term_title('', false);
            // Fix for bbPress and other plugins that are archives but use pages
            if (!$title) {
                global $post;
                $title = get_the_title($post_id);
            }
        }
    } elseif (is_404()) {
        $title = wpex_get_translated_theme_mod('error_page_title');
        $title = $title ? $title : esc_html__('404: Page Not Found', 'total');
    } elseif ($post_id) {
        // Single Pages
        if (is_singular('page') || is_singular('attachment')) {
            $title = get_the_title($post_id);
        } elseif (is_singular('post')) {
            $display = wpex_get_mod('blog_single_header');
            $display = $display ? $display : 'custom_text';
            if ('custom_text' == $display) {
                $title = wpex_get_mod('blog_single_header_custom_text');
                $title = $title ? $title : esc_html__('Blog', 'total');
            } elseif ('first_category' == $display) {
                $title = wpex_get_first_term_name();
            } else {
                $title = get_the_title($post_id);
            }
        } else {
            $obj = get_post_type_object(get_post_type());
            if (is_object($obj)) {
                $title = $obj->labels->name;
            }
        }
    }
    // Last check if title is empty
    $title = $title ? $title : get_the_title();
    // Apply filters and return title
    return apply_filters('wpex_title', $title);
}
开发者ID:iq007,项目名称:MadScape,代码行数:80,代码来源:title.php


示例17: wpex_get_mod

// Return if $social_options array is empty
if (empty($social_options)) {
    return;
}
// Add classes based on topbar style
$classes = '';
$topbar_style = wpex_get_mod('top_bar_style', 'one');
if ('one' == $topbar_style) {
    $classes = 'top-bar-right';
} elseif ('two' == $topbar_style) {
    $classes = 'top-bar-left';
} elseif ('three' == $topbar_style) {
    $classes = 'top-bar-centered';
}
// Display Social alternative
if ($social_alt = wpex_global_obj('top_bar_social_alt')) {
    ?>

	<div id="top-bar-social-alt" class="clr <?php 
    echo $classes;
    ?>
">
		<?php 
    echo do_shortcode($social_alt);
    ?>
	</div><!-- #top-bar-social-alt -->

<?php 
    return;
}
?>
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:31,代码来源:topbar-social.php


示例18: wpex_page_header_css

/**
 * Outputs Custom CSS for the page title
 *
 * @since 1.5.3
 */
function wpex_page_header_css($output)
{
    // Get global object
    $obj = wpex_global_obj();
    // Return output if page header is disabled
    if (!isset($obj->has_page_header) || !$obj->has_page_header) {
        return $output;
    }
    // Return if there isn't a page header style defined
    if (!$obj->page_header_style) {
        return $output;
    }
    // Define var
    $css = '';
    // Check if a header style is defined and make header style dependent tweaks
    if ($obj->page_header_style) {
        // Customize background color
        if ($obj->page_header_style == 'solid-color' || $obj->page_header_style == 'background-image') {
            $bg_color = get_post_meta($obj->post_id, 'wpex_post_title_background_color', true);
            if ($bg_color) {
                $css .= 'background-color: ' . $bg_color . ' !important;';
            }
        }
        // Background image Style
        if ($obj->page_header_style == 'background-image') {
            // Add background image
            $bg_img = wpex_page_header_background_image($obj->post_id);
            if ($bg_img) {
                // Add css for background image
                $css .= 'background-image: url(' . $bg_img . ' ) !important;
						background-position: 50% 0;
						-webkit-background-size: cover;
						-moz-background-size: cover;
						-o-background-size: cover;
						background-size: cover;';
                // Custom height
                $title_height = get_post_meta($obj->post_id, 'wpex_post_title_height', true);
                $title_height = $title_height ? $title_height : '400';
                $title_height = apply_filters('wpex_post_title_height', $title_height);
                if ($title_height) {
                    $css .= 'height:' . wpex_sanitize_data($title_height, 'px') . ' !important;';
                }
            }
        }
    }
    // Apply all css to the page-header class
    if (!empty($css)) {
        $css = '.page-header { ' . $css . ' }';
    }
    // Overlay Color
    if (!empty($bg_img)) {
        $overlay_color = get_post_meta($obj->post_id, 'wpex_post_title_background_overlay', true);
        if ('bg_color' == $overlay_color && $obj->page_header_style == 'background-image' && isset($bg_color)) {
            $css .= '.background-image-page-header-overlay { background-color: ' . $bg_color . ' !important; }';
        }
    }
    // If css var isn't empty add to custom css output
    if (!empty($css)) {
        $output .= $css;
    }
    // Return output
    return $output;
}
开发者ID:iq007,项目名称:MadScape,代码行数:68,代码来源:page-header.php


示例19: wpex_top_bar_classes

/**
 * Topbar classes
 *
 * @since 2.0.0
 */
function wpex_top_bar_classes()
{
    // Define classes
    $classes = array('wpex-clr');
    // Check for content
    if (wpex_global_obj('top_bar_content')) {
        $classes[] = 'has-content';
    }
    // Get topbar style
    $style = wpex_top_bar_style();
    // Add classes based on top bar style
    if ('one' == $style) {
        $classes[] = 'top-bar-left';
    } elseif ('two' == $style) {
        $classes[] = 'top-bar-right';
    } elseif ('three' == $style) {
        $classes[] = 'top-bar-centered';
    }
    // Apply filters for child theming
    $classes = apply_filters('wpex_top_bar_classes', $classes);
    // Turn classes array into space seperated string
    $classes = implode(' ', $classes);
    // Return classes
    return esc_attr($classes);
}
开发者ID:iq007,项目名称:MadScape,代码行数:30,代码来源:core-functions.php


示例20: wpex_get_page_subheading

function wpex_get_page_subheading()
{
    return wpex_global_obj('get_page_subheading');
}
开发者ID:iq007,项目名称:MadScape,代码行数:4,代码来源:deprecated.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wpex_hook_content_after函数代码示例发布时间:2022-05-23
下一篇:
PHP wpex_get_theme_branding函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap