WPML
SignaturePHP
force_suppress_filters = true

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.

Example Usage

PHP
$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
));