<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
/**
 * Init filter hooks
 *
 * @package TutorPro\Filter
 *
 * @since v2.0.9
 */

namespace TUTOR_PRO;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Contains filter hooks
 */
class Filters {

	/**
	 * Register hooks
	 */
	public function __construct() {
		// @TODO will be implemented later.
		//add_filter( 'tutor_qna_text_editor', __CLASS__ . '::filter_text_editor' );
	}

	/**
	 * For pro user show wp_editor
	 *
	 * @param string $editor  editor to filter.
	 *
	 * @return string  wp_editor
	 */
	public static function filter_text_editor( string $editor ) {
		ob_start();
		wp_editor( '', 'tutor_qna_text_editor', tutor_utils()->text_editor_config() );
		return ob_get_clean();
	}
}
