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


PHP FusionCore_Plugin::c_pageID方法代码示例

本文整理汇总了PHP中FusionCore_Plugin::c_pageID方法的典型用法代码示例。如果您正苦于以下问题:PHP FusionCore_Plugin::c_pageID方法的具体用法?PHP FusionCore_Plugin::c_pageID怎么用?PHP FusionCore_Plugin::c_pageID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FusionCore_Plugin的用法示例。


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

示例1: attr

 function attr()
 {
     global $smof_data;
     if (strpos($smof_data['site_width'], '%') === false && strpos($smof_data['site_width'], 'px') === false) {
         $smof_data['site_width'] = $smof_data['site_width'] . 'px';
     }
     $site_width = (int) $smof_data['site_width'];
     $site_width_percent = false;
     if (strpos($smof_data['site_width'], '%') !== false) {
         $site_width_percent = true;
     }
     $int_left_padding = (int) self::$args['padding_left'];
     $int_right_padding = (int) self::$args['padding_right'];
     $object_id = get_queried_object_id();
     $c_pageID = FusionCore_Plugin::c_pageID();
     $width_100 = false;
     $page_template = '';
     if (function_exists('is_woocommerce')) {
         if (is_woocommerce()) {
             $custom_fields = get_post_custom_values('_wp_page_template', $c_pageID);
             $page_template = is_array($custom_fields) && !empty($custom_fields) ? $custom_fields[0] : '';
         }
     }
     if (is_page_template('100-width.php') || is_page_template('blank.php') || ('1' == fusion_get_option('portfolio_width_100', 'portfolio_width_100', $c_pageID) || 'yes' == fusion_get_option('portfolio_width_100', 'portfolio_width_100', $c_pageID) && 'avada_portfolio' == get_post_type($c_pageID)) || avada_is_portfolio_template() && 'yes' == get_post_meta($c_pageID, 'pyre_portfolio_width_100', true) || '100-width.php' == $page_template) {
         $width_100 = true;
     }
     $attr['class'] = 'fusion-fullwidth fullwidth-box fusion-fullwidth-' . $this->fwc_counter . ' ';
     $attr['style'] = '';
     $attr['class'] .= sprintf(' fusion-parallax-%s', self::$args['background_parallax']);
     if (self::$args['hundred_percent'] == 'yes') {
         $attr['class'] .= ' hundred-percent-fullwidth';
         if ((int) self::$args['padding_left'] > 0 || (int) self::$args['padding_right'] > 0) {
             $attr['class'] .= ' fusion-nonzero-padding';
         }
     } else {
         $attr['class'] .= ' nonhundred-percent-fullwidth';
     }
     if (self::$bg_type == 'video') {
         $attr['class'] .= ' video-background';
     } else {
         if (self::$bg_type == 'faded') {
             $attr['class'] .= ' faded-background';
         }
     }
     if (self::$args['equal_height_columns'] == 'yes') {
         $attr['class'] .= ' fusion-equal-height-columns';
     }
     if (self::$args['border_color']) {
         $attr['style'] .= sprintf('border-color:%s;', self::$args['border_color']);
     }
     if (self::$args['border_size']) {
         $attr['style'] .= sprintf('border-bottom-width: %s;border-top-width: %s;', self::$args['border_size'], self::$args['border_size']);
     }
     if (self::$args['border_style']) {
         $attr['style'] .= sprintf('border-bottom-style: %s;border-top-style: %s;', self::$args['border_style'], self::$args['border_style']);
     }
     if (self::$args['padding_bottom']) {
         $attr['style'] .= sprintf('padding-bottom:%s;', self::$args['padding_bottom']);
     }
     if (self::$args['padding_top']) {
         $attr['style'] .= sprintf('padding-top:%s;', self::$args['padding_top']);
     }
     if (self::$args['padding_left']) {
         $attr['style'] .= sprintf('padding-left:%s;', self::$args['padding_left']);
     }
     if (self::$args['padding_right']) {
         $attr['style'] .= sprintf('padding-right:%s;', self::$args['padding_right']);
     }
     if (self::$args['hundred_percent'] == 'no' && (int) self::$args['padding_left'] > 0 && $width_100 == true) {
         $attr['style'] .= sprintf('padding-left:%s !important;', self::$args['padding_left']);
     }
     if (self::$args['hundred_percent'] == 'no' && (int) self::$args['padding_right'] > 0 && $width_100 == true) {
         $attr['style'] .= sprintf('padding-right:%s !important;', self::$args['padding_right']);
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['background_image'] && self::$args['background_parallax'] == 'fixed') {
         $attr['style'] .= 'background-attachment:fixed;';
     }
     if (self::$args['background_parallax'] == "none" || self::$args['background_parallax'] == "fixed") {
         if (self::$args['background_color']) {
             $attr['style'] .= sprintf('background-color:%s;', self::$args['background_color']);
         }
         if (self::$args['background_image'] && self::$args['background_position']) {
             $attr['style'] .= sprintf('background-position:%s;', self::$args['background_position']);
         }
         if (self::$args['background_image'] && self::$args['background_repeat']) {
             $attr['style'] .= sprintf('background-repeat:%s;', self::$args['background_repeat']);
         }
         if (self::$args['background_image'] && self::$args['background_repeat'] == 'no-repeat') {
             $attr['style'] .= '-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;';
             // IE 8 background-size: cover filter
             if (self::$args['background_image']) {
                 $attr['style'] .= sprintf('-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'%s\', sizingMethod=\'scale\')";', self::$args['background_image']);
             }
         }
//.........这里部分代码省略.........
开发者ID:kevinaxu,项目名称:99boulders,代码行数:101,代码来源:class-fullwidth.php


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