function pg_affected_pt() { return pc_affected_pt(); }
function pc_query_filter_post_array() { if (!is_admin() && !is_single() && !is_page()) { $exclude_array = array(); $args = array('post_type' => pc_affected_pt(), 'posts_per_page' => -1, 'post_status' => 'publish'); $posts = get_posts($args); foreach ($posts as $post) { if (!pc_redirect_check('page', $post)) { $exclude_array[] = $post->ID; } } $GLOBALS['pc_query_filter_post_array'] = $exclude_array; } }
function pc_custom_cols_init() { include_once PC_DIR . '/functions.php'; foreach (pc_affected_pt() as $type) { add_filter('manage_edit-' . $type . '_columns', 'pc_redirect_table_col', 999); add_action('manage_' . $type . '_posts_custom_column', 'show_pc_redirect_table_col', 10, 2); } }