Recent

Language_Handler class

Language_Handler

Language handler class.

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

Methods

__construct()

Constructor.

Since: 3.3.3
Line: 29

public function __construct(  );

translate_ids() static

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

Since: 3.3.3
Line: 42

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.3
Line: 81

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.