Install::create_pages()

Create Default pages


Description

Example usage:

create_pages();

See also


Source

File: classes/Install.php

	public function create_pages() {
		$dashboard_args    = array(
			'post_title'   => __( 'Dashboard', 'dozent' ),
			'post_content' => '',
			'post_type'    => 'page',
			'post_status'  => 'publish',
		);
		$dashboard_page_id = wp_insert_post( $dashboard_args );
		dozent_update_option( 'dozent_dashboard_page_id', $dashboard_page_id );

		$user_signup_page_args = array(
			'post_title'   => __( 'User Signup', 'dozent' ),
			'post_content' => '',
			'post_type'    => 'page',
			'post_status'  => 'publish',
		);
		$user_signup_page_id   = wp_insert_post( $user_signup_page_args );
		dozent_update_option( 'dozent_user_signup_page_id', $user_signup_page_id );
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.