HEX
Server: Apache
System: Linux beta.alfanet.ee 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: busines1 (1252)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home-ssd1/busines1/www/wp-content/plugins/woocommerce-multilingual/classes/PointerUi/Factory.php
<?php

namespace WCML\PointerUi;

use WPML\FP\Obj;
use WCML_Pointer_UI;

class Factory {

	/**
	 * @param array $args
	 *
	 * @return WCML_Pointer_UI
	 */
	public static function create( $args ) {
		$defaultArgs = [
			'anchor'     => __( 'How to translate this?', 'woocommerce-multilingual' ),
			'content'    => '',
			'docLink'    => null,
			'selectorId' => null,
			'method'     => 'after',
		];
		$args        = wp_parse_args( $args, $defaultArgs );

		return new WCML_Pointer_UI(
			Obj::prop( 'content', $args ),
			Obj::prop( 'docLink', $args ),
			Obj::prop( 'selectorId', $args ),
			Obj::prop( 'method', $args ),
			Obj::prop( 'anchor', $args )
		);
	}

}