Recent

wpml_object_id filter

wpml_object_id

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

Type: filter
Since: 3.5.0
Source: includes/frontend/class-language-handler.php line 114

Parameters

TypeNameDescription
int|string|\WP_Post$postPost object or Post ID.

Usage

add_filter( 'wpml_object_id', function($post) {
    // ...
    return $post;
} );