- availability:
-
WPML Version: 4.7.2
- description:
-
By default, the WPML Media Translation plugin filters attachment queries by language. This is done by setting suppress_filters=false for built-in get_posts functions. The force_suppress_filters action overrides this setting to allow you to retrieve all attachments in all languages at once.
- type:
- action
- category:
- Retrieving Localized Content
- parameters:
-
force_suppress_filters = true
- hook example usage:
-
Example
$posts = get_posts( array( 'post_type' => 'attachment', 'numberposts' => -1, 'force_suppress_filters' => true, // Argument to allow get_posts ignore WPML action that makes suppres_filter=false and query all attachments ));