이것은 일부 배너를 제거하는 함수입니다. if (! in_array ($ current_screen-> post_type, $ post_types)) 그러나 나는 그것을 올바르게 고치는 것을 모른다.이 오류 받기 "함수가 아닌 객체의 속성을 얻으려고 시도하는 중"
function lsx_tec_disable_lsx_banner($disabled) {
global $current_screen;
$post_types = apply_filters('tribe_is_post_type_screen_post_types', Tribe__Main::get_post_types());
if (! in_array($current_screen->post_type, $post_types)) {
$disabled = true;
}
if (is_null($id) && false !== strpos($current_screen->id, 'tribe'))
{
$disabled = true;
}
if (is_single() && tribe_is_event()) {
$disabled = true;
}
return $disabled;
}
문제는이 라인이 "만일 (!와 in_array ($ current_screen-> post_type, $ post_types)) {" – Ranjit
문제는 무엇인가? 몇 가지 시도했지만 오류가있어 – viscosho
$ current_screen-> post_type 및 $ post_types 모두 인쇄 해 볼 수 있습니까? 문제를 볼 수 있습니다. 비 객체에서 데이터를 가져 오려고했습니다. – Ranjit