Language_Handler
Language handler class.
Namespace: WebberZone\WFP\Frontend
Since: 3.3.3
Source: includes/frontend/class-language-handler.php line 20
Methods
__construct()
Constructor.
Since: 3.3.3
Line: 27
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: 39
static public function translate_ids( $results ): \WP_Post[];
| Type | Name | Description |
|---|---|---|
int[] | $results | Arry 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: 78
static public function object_id_cur_lang( $post ): \WP_Post|array|null;
| Type | Name | Description |
|---|---|---|
int|string|\WP_Post | $post | Post object or Post ID. |
Returns: \WP_Post|array|null — Post opbject, updated if needed.