【发布时间】:2015-09-29 17:23:26
【问题描述】:
我需要帮助找出这个未定义的函数错误get_custom_column_class()
if( ! function_exists( 'haze_translateColumnWidthToSpan' ) ) :
function haze_translateColumnWidthToSpan($width, $front = true) {
if(preg_match('/^(\d{1,2})\/12$/', $width, $match)) {
$w = "col-md-".$match[1];
} else {
switch ( $width ) {
case "1/6" :
$w = "col-sm-2";
break;
case "1/4" :
$w = "col-sm-3";
break;
case "1/3" :
$w = "col-sm-4";
break;
case "1/2" :
$w = "col-sm-6";
break;
case "2/3" :
$w = "col-sm-8";
break;
case "3/4" :
$w = "col-sm-9";
break;
case "5/6" :
$w = "col-sm-10";
break;
case "1/1" :
$w = "col-sm-12";
break;
case "2/4" :
$w = "col-sm-6";
break;
default :
$w = $width;
}
}
$custom = $front ? get_custom_column_class($w): false;
return $custom ? $custom : $w;
请帮忙。
谢谢,
【问题讨论】:
-
get_custom_column_class()不是 WordPress 功能,也没有被定义……关于它,没有什么可说的了。如果你想使用它,你需要定义那个函数。 -
不熟悉 WP,但在 github 上快速搜索了几个使用此功能的 repo(例如this one)。我的猜测是它是一些 wp 插件的一部分。安装那个
标签: php methods wordpress fatal-error