function unpublish_content() { require_once dirname(__FILE__) . '/class-new-project.php'; $new_project = new Anthologize_New_Project(); $projects = get_posts(array('post_type' => 'anth_project', 'nopaging' => true)); foreach ($projects as $project) { $update_project = array('ID' => $project_id->ID, 'post_status' => 'draft'); wp_update_post($update_project); $new_project->change_project_status($project_id->ID, 'draft'); } }
/** * Load the New Project admin panel * * @since 0.7 */ function load_admin_panel_new_project() { require anthologize()->includes_dir . 'class-new-project.php'; $this->panels['new_project'] = Anthologize_New_Project::init(); $this->panels['new_project']->display(); }