__('Users', 'admin-column-custom'), ); $list = array_merge($list, wp_filter_object_list($wp_post_types, ['public' => true], 'AND', 'label')); unset($list['attachment']); if($field == 'key') { $list = array_keys($list); } return $list; } /* * Since 1.0.10 * * @param string $type * * @return string; */ function ad_column_get_option($type = '') { return get_option('ad_column_' . $type); } /* * Since 1.0.15 * * @param integer $post_id * * @return string; */ function ad_column_get_page_path($post_id = 0) { if($post_id == 0) return ''; $p = get_post($post_id); $path = $p->post_name; while($p->post_parent > 0) { $p = get_post($p->post_parent); $path = $p->post_name . '/' . $path; } return $path; }