本文整理汇总了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;未经允许,请勿转载。 |
请发表评论