<?php
/**
 * Testimonials module bootstrap.
 *
 * @package Rsmspark_Content_Widgets
 */

defined( 'ABSPATH' ) || exit;

/**
 * Rsmspark_Testimonials
 */
class Rsmspark_Testimonials {

	/**
	 * @return void
	 */
	public static function init() {
		require_once RSMSPARK_CONTENT_WIDGETS_PATH . 'includes/testimonials/class-rsmspark-testimonials-cpt.php';
		require_once RSMSPARK_CONTENT_WIDGETS_PATH . 'includes/testimonials/class-rsmspark-testimonials-library.php';
		require_once RSMSPARK_CONTENT_WIDGETS_PATH . 'includes/testimonials/class-rsmspark-testimonials-meta.php';
		require_once RSMSPARK_CONTENT_WIDGETS_PATH . 'includes/testimonials/class-rsmspark-testimonials-admin.php';

		add_action( 'init', array( 'Rsmspark_Testimonials_CPT', 'register' ), 5 );
		Rsmspark_Testimonials_Meta::init();
		Rsmspark_Testimonials_Admin::init();
	}

	/**
	 * @return void
	 */
	public static function activate() {
		self::init();
		Rsmspark_Testimonials_CPT::register();
		flush_rewrite_rules();
	}
}
