Uname: Linux webm012.cluster130.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 8.0.30 [ PHP INFO ] PHP os: Linux
Server Ip: 145.239.37.162
Your Ip: 216.73.216.190
User: dreampi (1009562) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : BaseMetaModule.php
<?php
/**
 * Base class for the meta fields
 *
 * @package ThemeREX Addons
 * @since v2.30.0
 */

namespace TrxAddons\ElementorWidgets;

use TrxAddons\ElementorWidgets\BaseTypeModule;

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class BaseMetaModule extends BaseTypeModule {

	/**
	 * Returns array of component field types organized based on categories
	 *
	 * @return array  Field types.
	 */
	public function get_field_types() {
		return array();
	}

	/**
	 * Checks if given control field types match component field types
	 *
	 * @param  array $valid_types 	Sets of valid control field types
	 * @param  array $types 		Component field type to check against
	 * 
	 * @return bool  True if the field type is valid, false otherwise.
	 */
	protected function is_valid_field_type( $valid_types, $type ) {
		if ( ! $valid_types || ! $type ) {
			return false;
		}

		$field_types = $this->get_field_types();

		if ( is_array( $valid_types ) ) {
			foreach ( $valid_types as $valid_type ) {

				if ( is_array( $field_types[ $valid_type ] ) ) {
					if ( in_array( $type, $field_types[ $valid_type ] ) ) {
						return true;
					}
				} else {
					if ( $type === $field_types[ $valid_type ] ) {
						return true;
					}
				}
			}
		} else if ( in_array( $type, $field_types[ $valid_types ] ) ) {
			return true;
		}

		return false;
	}
}
© 2026 GrazzMean-Shell