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

PHP get_custom_column_class函数代码示例

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

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



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

示例1: spanClass

 protected function spanClass($grid_columns_count)
 {
     $teaser_width = '';
     switch ($grid_columns_count) {
         case '1':
             $teaser_width = 'vc_span12';
             break;
         case '2':
             $teaser_width = 'vc_span6';
             break;
         case '3':
             $teaser_width = 'vc_span4';
             break;
         case '4':
             $teaser_width = 'vc_span3';
             break;
         case '5':
             $teaser_width = 'vc_span10';
             break;
         case '6':
             $teaser_width = 'vc_span2';
             break;
     }
     //return $teaser_width;
     $custom = get_custom_column_class($teaser_width);
     return $custom ? $custom : $teaser_width;
 }
开发者ID:hoonio,项目名称:PhoneAfrika,代码行数:27,代码来源:posts_grid.php


示例2: wpb_translateColumnWidthToSpan

function wpb_translateColumnWidthToSpan( $width, $front = true ) {
	if ( preg_match( '/^(\d{1,2})\/12$/', $width, $match ) ) {
		$w = "span" . $match[1];
	} else {
		switch ( $width ) {
			case "1/6" :
				$w = "span2";
				break;
			case "1/4" :
				$w = "span3";
				break;
			case "1/3" :
				$w = "span4";
				break;
			case "1/2" :
				$w = "span6";
				break;
			case "2/3" :
				$w = "span8";
				break;
			case "3/4" :
				$w = "span9";
				break;
			case "5/6" :
				$w = "span10";
				break;
			case "1/1" :
				$w = "span12";
				break;
			default :
				$w = $width;
		}
	}
	$custom = $front ? get_custom_column_class( $w ) : false;
	return $custom ? $custom : 'vc_' . $w;
}
开发者ID:verbazend,项目名称:AWFA,代码行数:36,代码来源:helpers.php


示例3: wpb_translateColumnWidthToSpan

function wpb_translateColumnWidthToSpan($width, $front = true)
{
    if (preg_match('/^(\\d{1,2})\\/12$/', $width, $match)) {
        $w = 'vc_col-sm-' . $match[1];
    } else {
        $w = 'vc_col-sm-';
        switch ($width) {
            case "1/6":
                $w .= '2';
                break;
            case "1/4":
                $w .= '3';
                break;
            case "1/3":
                $w .= '4';
                break;
            case "1/2":
                $w .= '6';
                break;
            case "2/3":
                $w .= '8';
                break;
            case "3/4":
                $w .= '9';
                break;
            case "5/6":
                $w .= '10';
                break;
            case "1/1":
                $w .= '12';
                break;
            default:
                $w = $width;
        }
    }
    $custom = $front ? get_custom_column_class($w) : false;
    return $custom ? $custom : $w;
}
开发者ID:kevalbaxi,项目名称:dosomething-blog,代码行数:38,代码来源:helpers.php


示例4: wpb_translateColumnWidthToSpan

function wpb_translateColumnWidthToSpan($width, $front = true)
{
    switch ($width) {
        case "1/12":
            $w = "span1";
            break;
        case "1/6":
            $w = "span2";
            break;
        case "1/4":
            $w = "span3";
            break;
        case "1/3":
            $w = "span4";
            break;
        case "5/12":
            $w = "span5";
            break;
        case "1/2":
            $w = "span6";
            break;
        case "7/12":
            $w = "span7";
            break;
        case "2/3":
            $w = "span8";
            break;
        case "3/4":
            $w = "span9";
            break;
        case "5/6":
            $w = "span10";
            break;
        case "11/12":
            $w = "span11";
            break;
        case "1/1":
            $w = "span12";
            break;
        default:
            $w = $width;
    }
    $custom = $front ? get_custom_column_class($w) : false;
    return $custom ? $custom : 'vc_' . $w;
}
开发者ID:sniezekjp,项目名称:staging-fs,代码行数:45,代码来源:helpers.php


示例5: wpb_translateColumnWidthToSpan

/**
 * @param $width
 * @param bool $front
 *
 * @since 4.2
 * @return bool|string
 */
function wpb_translateColumnWidthToSpan($width, $front = true)
{
    preg_match('/(\\d+)\\/(\\d+)/', $width, $matches);
    $w = $width;
    if (!empty($matches)) {
        $part_x = (int) $matches[1];
        $part_y = (int) $matches[2];
        if ($part_x > 0 && $part_y > 0) {
            $value = ceil($part_x / $part_y * 12);
            if ($value > 0 && $value <= 12) {
                $w = 'vc_col-sm-' . $value;
            }
        }
    }
    $custom = $front ? get_custom_column_class($w) : false;
    return $custom ? $custom : $w;
}
开发者ID:lokenxo,项目名称:familygenerator,代码行数:24,代码来源:helpers.php


示例6: et_translateColumnsCountToSpanClass

 function et_translateColumnsCountToSpanClass($grid_columns_count)
 {
     $teaser_width = '';
     switch ($grid_columns_count) {
         case '1':
             $teaser_width = 'et_col12';
             break;
         case '2':
             $teaser_width = 'et_col6';
             break;
         case '3':
             $teaser_width = 'et_col4';
             break;
         case '4':
             $teaser_width = 'et_col3';
             break;
         case '6':
             $teaser_width = 'et_col2';
             break;
     }
     //return $teaser_width;
     $custom = get_custom_column_class($teaser_width);
     return $custom ? $custom : $teaser_width;
 }
开发者ID:MrMuzik,项目名称:ar4tupgrade,代码行数:24,代码来源:vc.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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