PluginProbe
FileBird – WordPress Media Library Folders & File Manager / 6.3.4
FileBird – WordPress Media Library Folders & File Manager v6.3.4
6.5.8 6.5.7 6.5.5 6.5.4 trunk 4.3.1 5.1.6 5.3 5.3.2 5.4.3 5.4.4 5.4.5 5.5 5.5.3 5.5.5 5.5.8 5.5.8.1 5.6 5.6.1 5.6.2 5.6.3 5.6.4 6.2.3 6.2.5 6.3 All 36 releases
filebird / includes / Classes / Modules / ModuleExclude.php

ModuleExclude.php in FileBird – WordPress Media Library Folders & File Manager 6.3.4, at includes/Classes/Modules/ModuleExclude.php

39 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace FileBird\Classes\Modules;
3
4 class ModuleExclude {
5 public function __construct() {
6 add_filter( 'fbv_get_count_where_query', array( $this, 'exclude_get_count_where_query' ), 10, 1 );
7 }
8
9 public function exclude_get_count_where_query( $where ) {
10 global $wpdb;
11 if ( function_exists( '_is_elementor_installed' ) ) {
12 $where[] = " posts.ID NOT IN (SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = '_elementor_is_screenshot') ";
13 }
14
15 if ( function_exists( 'picu_exclude_collection_images_from_library' ) ) {
16 $where[] = " posts.post_parent NOT IN (SELECT {$wpdb->posts}.ID FROM {$wpdb->posts} WHERE {$wpdb->posts}.post_type = 'picu_collection') ";
17 }
18
19 if ( function_exists( 'uncode_get_gallery_attachment_ids' ) ) {
20 $media_attachments_ids = implode( ',', uncode_get_gallery_attachment_ids() );
21 $where[] = "posts.ID NOT IN ($media_attachments_ids)";
22 }
23
24 // Compatible https://wordpress.org/plugins/pdf-image-generator/
25 if ( class_exists( 'PIGEN' ) ) {
26 $opt = get_option( 'pigen_options' );
27 if ( isset( $opt['hidethumb'] ) && $opt['hidethumb'] !== '' ) {
28 $where[] = " posts.ID NOT IN (SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = '_thumbnail_id') ";
29 }
30 }
31
32 // Compatible https://wordpress.org/plugins/w3-total-cache/
33 if ( defined( 'W3TC_VERSION' ) ) {
34 $where[] = " posts.ID NOT IN (SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = 'w3tc_imageservice_file') ";
35 }
36
37 return $where;
38 }
39 }