Recent

Language_Handler class

Language_Handler

Language handler class.

Namespace: WebberZone\Better_Search\Frontend
Since: 3.3.0
Source: includes/frontend/class-language-handler.php line 22

Methods

__construct()

Constructor.

Since: 3.3.0
Line: 29

public function __construct(  );

load_plugin_textdomain() static

Initialises text domain for l10n.

Since: 3.3.0
Line: 41

static public function load_plugin_textdomain(  ): void;

Returns: void

translate_ids() static

Get the ID of a post in the current language. Works with WPML and PolyLang.

Since: 3.3.0
Line: 53

static public function translate_ids( $results ): \WP_Post[];
TypeNameDescription
int[]$resultsArry of Posts.

Returns: \WP_Post[] — Updated array of WP_Post objects.

object_id_cur_lang() static

Returns the object identifier for the current language (WPML).

Since: 3.3.0
Line: 87

static public function object_id_cur_lang( $post ): \WP_Post|array|null;
TypeNameDescription
int|string|\WP_Post$postPost object or Post ID.

Returns: \WP_Post|array|null — Post opbject, updated if needed.