| Server IP : 69.39.225.240 / Your IP : 216.73.216.138 Web Server : Apache System : Linux bronze7.serverhost.net 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : reademotions ( 1074) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/reademotions/www/wp-content/plugins/wp-smushit/core/modules/helpers/ |
Upload File : |
<?php
/**
* Filters the list of directories, exclude the media subfolders.
*
* @package Smush\Core\Modules\Helpers
*/
namespace Smush\Core\Modules\Helpers;
use RecursiveFilterIterator;
use WP_Smush;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class Iterator extends RecursiveFilterIterator
*/
class Iterator extends RecursiveFilterIterator {
/**
* Accept method.
*
* @return bool
*/
public function accept(): bool {
$path = $this->current()->getPathname();
if ( $this->isDir() && ! WP_Smush::get_instance()->core()->mod->dir->skip_dir( $path ) ) {
return true;
}
if ( ! $this->isDir() ) {
return true;
}
return false;
}
}