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


PHP FusionCore_Plugin::font_awesome_name_handler方法代码示例

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


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

示例1: icon_attr

 function icon_attr()
 {
     $attr = array();
     $attr['class'] = sprintf('section-separator-icon icon fa %s', FusionCore_Plugin::font_awesome_name_handler(self::$args['icon']));
     $attr['style'] = sprintf('color:%s;', self::$args['icon_color']);
     return $attr;
 }
开发者ID:IDOAgency,项目名称:PAHClinic,代码行数:7,代码来源:class-section-separator.php

示例2: icon_attr

 function icon_attr()
 {
     $attr = array();
     $attr['class'] = sprintf('section-separator-icon icon fa %s', FusionCore_Plugin::font_awesome_name_handler(self::$args['icon']));
     $attr['style'] = sprintf('color:%s;', self::$args['icon_color']);
     if (FusionCore_Plugin::strip_unit(self::$args['bordersize']) > 1) {
         $divider_candy = self::$args['divider_candy'];
         if ($divider_candy == 'bottom') {
             $attr['style'] .= sprintf('bottom:-%spx;top:auto;', FusionCore_Plugin::strip_unit(self::$args['bordersize']) + 10);
         } elseif ($divider_candy == 'top') {
             $attr['style'] .= sprintf('top:-%spx;', FusionCore_Plugin::strip_unit(self::$args['bordersize']) + 10);
         }
     }
     return $attr;
 }
开发者ID:universal-youth,项目名称:www.universal-youth.com,代码行数:15,代码来源:class-section-separator.php

示例3: attr

 function attr()
 {
     $attr['class'] = sprintf('fa fontawesome-icon %s circle-%s', FusionCore_Plugin::font_awesome_name_handler(self::$args['icon']), self::$args['circle']);
     $attr['style'] = '';
     if (self::$args['circle'] == 'yes') {
         if (self::$args['circlebordercolor']) {
             $attr['style'] .= sprintf('border-color:%s;', self::$args['circlebordercolor']);
         }
         if (self::$args['circlecolor']) {
             $attr['style'] .= sprintf('background-color:%s;', self::$args['circlecolor']);
         }
         $attr['style'] .= sprintf('font-size:%spx;', self::$args['circle_yes_font_size']);
         $attr['style'] .= sprintf('line-height:%spx;height:%spx;width:%spx;', self::$args['line_height'], self::$args['line_height'], self::$args['line_height']);
     } else {
         $attr['style'] .= sprintf('font-size:%spx;', self::$args['font_size']);
     }
     if ('center' == self::$args['alignment']) {
         $attr['style'] .= 'margin-left:0;margin-right:0;';
     } else {
         $attr['style'] .= sprintf('margin-%s:%spx;', self::$args['icon_margin_position'], self::$args['icon_margin']);
     }
     if (self::$args['iconcolor']) {
         $attr['style'] .= sprintf('color:%s;', self::$args['iconcolor']);
     }
     if (self::$args['rotate']) {
         $attr['class'] .= ' fa-rotate-' . self::$args['rotate'];
     }
     if (self::$args['spin'] == 'yes') {
         $attr['class'] .= ' fa-spin';
     }
     if (self::$args['animation_type']) {
         $animations = FusionCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
         unset($attr['animation_class']);
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
开发者ID:universal-youth,项目名称:www.universal-youth.com,代码行数:44,代码来源:class-fontawesome.php

示例4: attr

 function attr()
 {
     $attr['class'] = sprintf('fa fontawesome-icon %s size-%s %2$s circle-%s', FusionCore_Plugin::font_awesome_name_handler(self::$args['icon']), self::$args['size'], self::$args['circle']);
     $attr['style'] = '';
     if (self::$args['circle'] == 'yes') {
         if (self::$args['circlebordercolor']) {
             $attr['style'] .= sprintf('border-color:%s;', self::$args['circlebordercolor']);
         }
         if (self::$args['circlecolor']) {
             $attr['style'] .= sprintf('background-color:%s;', self::$args['circlecolor']);
         }
     }
     if (self::$args['iconcolor']) {
         $attr['style'] .= sprintf('color:%s;', self::$args['iconcolor']);
     }
     if (self::$args['flip']) {
         $attr['class'] .= ' fa-flip-' . self::$args['flip'];
     }
     if (self::$args['rotate']) {
         $attr['class'] .= ' fa-rotate-' . self::$args['rotate'];
     }
     if (self::$args['spin'] == 'yes') {
         $attr['class'] .= ' fa-spin';
     }
     if (self::$args['animation_type']) {
         $animations = FusionCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
         unset($attr['animation_class']);
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
开发者ID:mathewdenis,项目名称:avada,代码行数:38,代码来源:class-fontawesome.php

示例5: prepare_separator

 /**
  * Assign short-code attributes to builder elements.
  *
  * @since 2.0
  *
  * @param Array $attribs
  * @param Array $element
  *
  * @return Array Element
  */
 public static function prepare_separator($attribs, $element)
 {
     foreach ($attribs as $key => $value) {
         switch ($key) {
             case 'style':
                 $element->config['subElements'][0]['value'] = $attribs[$key];
                 break;
             case 'style_type':
                 $element->config['subElements'][0]['value'] = $attribs[$key];
                 break;
             case 'top_margin':
                 $element->config['subElements'][1]['value'] = $attribs[$key];
                 break;
             case 'top':
                 $element->config['subElements'][1]['value'] = $attribs[$key];
                 break;
             case 'bottom_margin':
                 $element->config['subElements'][2]['value'] = $attribs[$key];
                 break;
             case 'bottom':
                 $element->config['subElements'][2]['value'] = $attribs[$key];
                 break;
             case 'sep_color':
                 $element->config['subElements'][3]['value'] = $attribs[$key];
                 break;
             case 'color':
                 $element->config['subElements'][3]['value'] = $attribs[$key];
                 break;
             case 'border_size':
                 $element->config['subElements'][4]['value'] = $attribs[$key];
                 break;
             case 'icon':
                 $element->config['subElements'][5]['value'] = FusionCore_Plugin::font_awesome_name_handler($attribs[$key]);
                 break;
             case 'icon_circle':
                 $element->config['subElements'][6]['value'] = $attribs[$key];
                 break;
             case 'icon_circle_color':
                 $element->config['subElements'][7]['value'] = $attribs[$key];
                 break;
             case 'width':
                 $element->config['subElements'][8]['value'] = $attribs[$key];
                 break;
             case 'alignment':
                 $element->config['subElements'][9]['value'] = $attribs[$key];
                 break;
             case 'class':
                 $element->config['subElements'][10]['value'] = $attribs[$key];
                 break;
             case 'id':
                 $element->config['subElements'][11]['value'] = $attribs[$key];
                 break;
         }
     }
     if (isset($attribs['top'])) {
         if (!$attribs['bottom'] && $attribs['style'] != 'none') {
             $element->config['subElements'][2]['value'] = $attribs['top'];
         }
     }
     return $element;
 }
开发者ID:agiper,项目名称:wordpress,代码行数:71,代码来源:class-fusion-reversal.php

示例6: icon_attr

 function icon_attr()
 {
     $attr = array();
     $attr['class'] = sprintf('fa %s', FusionCore_Plugin::font_awesome_name_handler(self::$args['icon']));
     if (self::$args['icon_divider'] != 'yes') {
         $attr['class'] .= sprintf(' button-icon-%s', self::$args['icon_position']);
     }
     if (self::$args['icon_color'] != self::$args['accent_color']) {
         $attr['style'] = sprintf('color:%s;', self::$args['icon_color']);
     }
     return $attr;
 }
开发者ID:ftopolovec,项目名称:proart,代码行数:12,代码来源:class-button.php

示例7: icon_attr

 function icon_attr()
 {
     $attr['class'] = sprintf('counter-box-icon fa fontawesome-icon %s', FusionCore_Plugin::font_awesome_name_handler(self::$child_args['icon']));
     $attr['style'] = sprintf('font-size:%spx;', self::$parent_args['icon_size']);
     if (self::$parent_args['icon_top'] == 'yes') {
         $attr['style'] .= 'display:block;';
     }
     return $attr;
 }
开发者ID:agiper,项目名称:wordpress,代码行数:9,代码来源:class-counters-box.php

示例8: icon_attr

 function icon_attr($atts)
 {
     $attr = array();
     $index = $atts['index'];
     $attr['class'] = sprintf('fa fontawesome-icon %s', FusionCore_Plugin::font_awesome_name_handler($this->tabs[$index]['icon']));
     return $attr;
 }
开发者ID:mathewdenis,项目名称:avada,代码行数:7,代码来源:class-tabs.php

示例9: icon_attr

 function icon_attr()
 {
     $attr = array();
     if (!self::$child_args['icon']) {
         $icon = FusionCore_Plugin::font_awesome_name_handler(self::$parent_args['icon']);
     } else {
         $icon = FusionCore_Plugin::font_awesome_name_handler(self::$child_args['icon']);
     }
     if (!self::$child_args['iconcolor']) {
         $iconcolor = self::$parent_args['iconcolor'];
     } else {
         $iconcolor = self::$child_args['iconcolor'];
     }
     $attr['class'] = sprintf('fusion-li-icon fa %s', $icon);
     $attr['style'] = sprintf('color:%s;', $iconcolor);
     return $attr;
 }
开发者ID:universal-youth,项目名称:www.universal-youth.com,代码行数:17,代码来源:class-checklist.php

示例10: icon_attr

 function icon_attr()
 {
     $attr = array();
     $attr['class'] = sprintf('fa fa-lg %s', FusionCore_Plugin::font_awesome_name_handler(self::$args['icon']));
     return $attr;
 }
开发者ID:universal-youth,项目名称:www.universal-youth.com,代码行数:6,代码来源:class-alert.php

示例11: icon_attr

 function icon_attr()
 {
     $attr['style'] = '';
     if (self::$child_args['image']) {
         $attr['class'] = 'image';
         if (self::$parent_args['layout'] == 'icon-boxed' && self::$child_args['image_width'] && self::$child_args['image_height']) {
             $attr['style'] = sprintf('margin-left:-%spx;', self::$child_args['image_width'] / 2);
             $attr['style'] .= sprintf('top:-%spx;', self::$child_args['image_height'] / 2 + 50);
         }
     } else {
         if (self::$child_args['icon']) {
             $attr['class'] = sprintf('fa fontawesome-icon medium %s', FusionCore_Plugin::font_awesome_name_handler(self::$child_args['icon']));
             // set parent values if child values are unset to get downwards compatibility
             if (!self::$child_args['circle']) {
                 self::$child_args['circle'] = self::$parent_args['circle'];
             }
             if (!self::$child_args['circlebordercolor']) {
                 self::$child_args['circlebordercolor'] = self::$parent_args['circlebordercolor'];
             }
             if (!self::$child_args['circlecolor']) {
                 self::$child_args['circlecolor'] = self::$parent_args['circlecolor'];
             }
             if (!self::$child_args['iconcolor']) {
                 self::$child_args['iconcolor'] = self::$parent_args['iconcolor'];
             }
             // ! self::$child_args['circle'] for backwards compatibility
             if (self::$child_args['circle'] == 'yes' || !self::$child_args['circle']) {
                 $attr['class'] .= ' circle-yes';
                 if (self::$child_args['circlebordercolor']) {
                     $attr['style'] .= sprintf('border-color:%s;', self::$child_args['circlebordercolor']);
                 }
                 if (self::$child_args['circlecolor']) {
                     $attr['style'] .= sprintf('background-color:%s;', self::$child_args['circlecolor']);
                 }
             }
             if (self::$child_args['iconcolor']) {
                 $attr['style'] .= sprintf('color:%s;', self::$child_args['iconcolor']);
             }
             if (self::$child_args['iconflip']) {
                 $attr['class'] .= ' fa-flip-' . self::$child_args['iconflip'];
             }
             if (self::$child_args['iconrotate']) {
                 $attr['class'] .= ' fa-rotate-' . self::$child_args['iconrotate'];
             }
             if (self::$child_args['iconspin'] == 'yes') {
                 $attr['class'] .= ' fa-spin';
             }
         }
     }
     if (self::$child_args['animation_type']) {
         $animations = FusionCore_Plugin::animations(array('type' => self::$child_args['animation_type'], 'direction' => self::$child_args['animation_direction'], 'speed' => self::$child_args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     return $attr;
 }
开发者ID:ftopolovec,项目名称:proart,代码行数:56,代码来源:class-content-boxes.php

示例12: icon_attr

 function icon_attr()
 {
     $attr = array();
     if (self::$child_args['image']) {
         $attr['class'] = 'image';
     } else {
         if (self::$child_args['icon']) {
             $attr['class'] = sprintf('fa %s', FusionCore_Plugin::font_awesome_name_handler(self::$child_args['icon']));
         }
     }
     if (self::$child_args['icon_color']) {
         $attr['style'] = sprintf('color:%s;', self::$child_args['icon_color']);
     }
     if (self::$child_args['icon_flip']) {
         $attr['class'] .= ' fa-flip-' . self::$child_args['icon_flip'];
     }
     if (self::$child_args['icon_rotate']) {
         $attr['class'] .= ' fa-rotate-' . self::$child_args['icon_rotate'];
     }
     if (self::$child_args['icon_spin'] == 'yes') {
         $attr['class'] .= ' fa-spin';
     }
     if (self::$child_args['animation_type'] && self::$child_args['icon_spin'] != 'yes') {
         $animations = FusionCore_Plugin::animations(array('type' => self::$child_args['animation_type'], 'direction' => self::$child_args['animation_direction'], 'speed' => self::$child_args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     return $attr;
 }
开发者ID:ftopolovec,项目名称:proart,代码行数:29,代码来源:class-flip-boxes.php

示例13: icon_attr

 function icon_attr()
 {
     $attr['class'] = sprintf('counter-box-icon fa fontawesome-icon %s size-%s', FusionCore_Plugin::font_awesome_name_handler(self::$child_args['icon']), self::$child_args['icon_size']);
     return $attr;
 }
开发者ID:ftopolovec,项目名称:proart,代码行数:5,代码来源:class-counters-box.php

示例14: icon_attr

 function icon_attr()
 {
     $attr['style'] = '';
     if (self::$child_args['image']) {
         $attr['class'] = 'image';
         if (self::$parent_args['layout'] == 'icon-boxed' && self::$child_args['image_width'] && self::$child_args['image_height']) {
             $attr['style'] = sprintf('margin-left:-%spx;', self::$child_args['image_width'] / 2);
             $attr['style'] .= sprintf('top:-%spx;', self::$child_args['image_height'] / 2 + 50);
         }
     } else {
         if (self::$child_args['icon']) {
             $attr['class'] = sprintf('fa fontawesome-icon %s', FusionCore_Plugin::font_awesome_name_handler(self::$child_args['icon']));
             // set parent values if child values are unset to get downwards compatibility
             if (!self::$child_args['circle']) {
                 self::$child_args['circle'] = self::$parent_args['circle'];
             }
             if (self::$parent_args['icon_circle'] == 'yes') {
                 $attr['class'] .= ' circle-yes';
                 if (self::$child_args['circlebordercolor']) {
                     $attr['style'] .= sprintf('border-color:%s;', self::$child_args['circlebordercolor']);
                 }
                 if (self::$child_args['circlebordersize']) {
                     $attr['style'] .= sprintf('border-width:%s;', self::$child_args['circlebordersize']);
                 }
                 if (self::$child_args['circlecolor']) {
                     $attr['style'] .= sprintf('background-color:%s;', self::$child_args['circlecolor']);
                 }
                 $attr['style'] .= sprintf('height:%spx;width:%spx;line-height:%spx;', self::$parent_args['icon_size'] * 2, self::$parent_args['icon_size'] * 2, self::$parent_args['icon_size'] * 2);
                 if (self::$parent_args['layout'] == 'icon-boxed' && !self::$child_args['outercirclebordercolor'] && !self::$child_args['outercirclebordersize']) {
                     $attr['style'] .= sprintf('top:-%spx;margin-left:-%spx;', 50 + self::$parent_args['icon_size'] * 2 / 2, self::$parent_args['icon_size'] * 2 / 2);
                 }
                 if (self::$parent_args['icon_circle_radius'] == 'round') {
                     self::$parent_args['icon_circle_radius'] = '100%';
                 }
                 $attr['style'] .= sprintf('border-radius:%s;', self::$parent_args['icon_circle_radius']);
                 if (self::$child_args['outercirclebordercolor'] && self::$child_args['outercirclebordersize']) {
                     // If there is a thick border, kill border width and make it center aligned positioned
                     $attr['style'] .= sprintf('border-width:%s;', '0');
                     $attr['style'] .= sprintf('position:%s;', 'relative');
                     $attr['style'] .= sprintf('top:%s;', self::$child_args['circlebordersize']);
                     $attr['style'] .= sprintf('left:%s;', self::$child_args['circlebordersize']);
                     $attr['style'] .= 'margin:0;';
                     $attr['style'] .= sprintf('border-radius:%spx;', intval(self::$parent_args['icon_circle_radius']) - intval(self::$child_args['outercirclebordersize']));
                 }
             } else {
                 $attr['class'] .= ' circle-no';
                 $attr['style'] .= sprintf('background-color:%s;border-color:%s;height:%s;width:%spx;line-height:%s;', 'transparent', 'transparent', 'auto', self::$parent_args['icon_size'], 'normal');
                 if (self::$parent_args['layout'] == 'icon-boxed') {
                     $attr['style'] .= sprintf('position:%s;left:%s;right:%s;top:%s;margin-left:%s;margin-right:%s;', 'relative', 'auto', 'auto', 'auto', 'auto', 'auto');
                 }
             }
             if (self::$child_args['iconcolor']) {
                 $attr['style'] .= sprintf('color:%s;', self::$child_args['iconcolor']);
             }
             if (self::$child_args['iconrotate']) {
                 $attr['class'] .= ' fa-rotate-' . self::$child_args['iconrotate'];
             }
             if (self::$child_args['iconspin'] == 'yes') {
                 $attr['class'] .= ' fa-spin';
             }
             $attr['style'] .= sprintf('font-size:%spx;', FusionCore_Plugin::strip_unit(self::$parent_args['icon_size']));
         }
     }
     return $attr;
 }
开发者ID:rvelezc,项目名称:drpelaezgo.com,代码行数:65,代码来源:class-content-boxes.php


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