plugin = $plugin; $this->hooks(); } /** * Initiate our hooks. * * @since 0.0.3 */ public function hooks() { } public static function validate_numeric( $value ) { return ( is_numeric( $value ) || __( 'Expected a numeric value but received ' ) . gettype( $value ) ); } public static function validate_string( $value ) { return ( ( !is_numeric( $value ) && is_string( $value ) ) || __( 'Expected a string value but received ') . gettype( $value ) ); } public static function validate_weekday( $value ) { return ( in_array( $value, array( 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday', ) ) || __( 'Expected English weekday value but received ' ) . $value ); } }