HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/mobilech/alliancelaptoptraining.com.np/wp-content/plugins/tutor/classes/Custom_Validation.php
<?php
/**
 * Reuseable custom validation trait
 *
 * @package Tutor
 * @author Themeum <support@themeum.com>
 * @link https://themeum.com
 * @since 2.0.0
 */

namespace TUTOR;

/**
 * Custom Validation Trait
 *
 * @since 2.0.0
 */
trait Custom_Validation {

	/**
	 * Check whether order value is asc or desc
	 *
	 * @since 2.0.0
	 *
	 * @param string $order sorting order.
	 * @return bool
	 */
	public function validate_order( $order ) {
		return in_array( strtolower( $order ), array( 'asc', 'desc' ), true );
	}
}