# filebird/5.3.2/includes/Controller/Exclude.php

FileBird – WordPress Media Library Folders &amp; File Manager, version 5.3.2. 26 lines.

- Page: https://pluginprobe.com/plugins/filebird/5.3.2/code/includes/Controller/Exclude.php
- Raw: https://pluginprobe.com/plugins/filebird/5.3.2/raw/includes/Controller/Exclude.php
- Modified: 2023-06-27T08:08:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/filebird/5.3.2/code/includes/Controller/Exclude.php#L10-L20`.

```php
<?php
namespace FileBird\Controller;

class Exclude {
	public function __construct() {
		add_filter( 'fbv_get_count_where_query', array( $this, 'exclude_get_count_where_query' ), 10, 1 );
	}

	public function exclude_get_count_where_query( $where ) {
		global $wpdb;
		if ( function_exists( '_is_elementor_installed' ) ) {
			$where[] = " posts.ID NOT IN (SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = '_elementor_is_screenshot') ";
		}

		if ( function_exists( 'picu_exclude_collection_images_from_library' ) ) {
			$where[] = " posts.post_parent NOT IN (SELECT {$wpdb->posts}.ID FROM {$wpdb->posts} WHERE {$wpdb->posts}.post_type = 'picu_collection') ";
		}

		if ( function_exists( 'uncode_get_gallery_attachment_ids' ) ) {
			$media_attachments_ids = implode( ',', uncode_get_gallery_attachment_ids() );
			$where[]               = "posts.ID NOT IN ($media_attachments_ids)";
		}

		return $where;
	}
}
```
