我正在获取错误
致命错误:重新定义参数$ post_id in C: Xampp htdocs wp-content themes poufoner functions.php on Line 2533
function coupon_smeta_images( $meta_key, $post_id, $default, $post_id){
if(class_exists('SM_Frontend')){
global $sm;
return $result = $sm->sm_get_meta($meta_key, $post_id);
}
else{
return $default;
}
}
/* check if smeta plugin is installed */
您的功能中有一个重复的$post_id
参数。尝试以这样的方式删除一个:
function coupon_smeta_images( $meta_key, $post_id, $default){
if(class_exists('SM_Frontend')){
global $sm;
return $result = $sm->sm_get_meta($meta_key, $post_id);
}
else{
return $default;
}
}