Astra_Starter_Content::__construct()

Constructor


Description


Source

File: inc/compatibility/class-astra-starter-content.php

	public function __construct() {
		$is_fresh_site = get_option( 'fresh_site' );

		if ( ! $is_fresh_site ) {
			return;
		}
		
		// Adding post meta and inserting post.
		add_action(
			'wp_insert_post',
			array(
				$this,
				'register_listener',
			),
			3,
			99
		);

		// Save astra settings into database.
		add_action(
			'customize_save_after',
			array(
				$this,
				'save_astra_settings',
			),
			10, 
			3 
		);

		if ( ! is_customize_preview() ) {
			return;
		}

		// preview customizer values.
		add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) );

		add_filter( 'astra_global_color_palette', array( $this, 'theme_color_palettes_defaults' ) );

	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.