<?php

class Whizzie {

	public function __construct() {
		$this->init();
	}

	public function init()
	{
	
	}
	public static function launch_coming_soon_setup_widgets(){

	/* Create Menu */
	$launch_coming_soon_menuname  = 'Main menu';
	$launch_coming_soon_location  = 'main-menu';

	$launch_coming_soon_menu = wp_get_nav_menu_object( $launch_coming_soon_menuname );

	if ( ! $launch_coming_soon_menu ) {
	$launch_coming_soon_menu_id = wp_create_nav_menu( $launch_coming_soon_menuname );

	// Home Page
		wp_update_nav_menu_item( $launch_coming_soon_menu_id, 0, array(
			'menu-item-title'     => __( 'Home', 'launch-coming-soon' ),
			'menu-item-url'       => home_url( '/' ),
			'menu-item-type'      => 'custom',
			'menu-item-status'    => 'publish',
		) );

		// About Us Page 
		$launch_coming_soon_about_id = wp_insert_post( array(
		'post_type'   => 'page',
		'post_content' => 'We are committed to providing reliable, professional, and result-oriented solutions tailored to meet individual needs. Our goal is to empower people with the right guidance, knowledge, and support to help them make informed decisions for a better future. <br><br> Our mission is to deliver high-quality services with honesty, transparency, and dedication. We focus on understanding client requirements and offering practical solutions that create long-term value. <br><br> With a client-centric approach, experienced professionals, and a commitment to excellence, we ensure every individual receives the attention and guidance they deserve. We believe in building trust through quality service and consistent results.',
		'post_title'  => 'Contact Us',
		'post_status' => 'publish',
		) );

		if ( $launch_coming_soon_about_id ) {
		wp_update_nav_menu_item( $launch_coming_soon_menu_id, 0, array(
		'menu-item-title'     => 'Contact Us',
		'menu-item-object'    => 'page',
		'menu-item-object-id' => $launch_coming_soon_about_id,
		'menu-item-type'      => 'post_type',
		'menu-item-status'    => 'publish',
		) );
		}
		
		/* Assign Menu Location */
		$launch_coming_soon_locations = get_theme_mod( 'nav_menu_locations', array() );
		$launch_coming_soon_locations[ $launch_coming_soon_location ] = $launch_coming_soon_menu_id;
		set_theme_mod( 'nav_menu_locations', $launch_coming_soon_locations );
	}

	}
}
 