function wpt_category_limit($post_type, $post_info, $post_ID) { $post_type_cats = get_object_taxonomies($post_type); $continue = true; if (in_array('category', $post_type_cats)) { // 'category' is assigned to this post type, so apply filters. if (get_option('jd_twit_cats') == '1') { $continue = !wpt_in_allowed_category($post_info['categoryIds']) ? true : false; } else { $continue = wpt_in_allowed_category($post_info['categoryIds']) ? true : false; } } if (WPT_DEBUG && function_exists('wpt_pro_exists') && !$continue) { wpt_mail("3b: Category limits applied #{$post_ID}", print_r($post_info['categoryIds'], 1)); } $continue = get_option('limit_categories') == '0' ? true : $continue; $args = array('type' => $post_type, 'info' => $post_info, 'id' => $post_ID); return apply_filters('wpt_filter_terms', $continue, $args); }
/** * @deprecated */ function wpt_category_limit($post_type, $post_info, $post_ID) { $post_type_cats = get_object_taxonomies($post_type); $continue = true; if (in_array('category', $post_type_cats)) { // 'category' is assigned to this post type, so apply filters. if (get_option('jd_twit_cats') == '1') { $continue = !wpt_in_allowed_category($post_info['categoryIds']) ? true : false; } else { $continue = wpt_in_allowed_category($post_info['categoryIds']) ? true : false; } } $continue = get_option('limit_categories') == '0' ? true : $continue; $args = array('type' => $post_type, 'info' => $post_info, 'id' => $post_ID); return apply_filters('wpt_filter_terms', $continue, $args); }