HM\BackUpWordPress\CleanUpIterator::accept PHP Метод

accept() публичный Метод

Don't match index.html, files with zip extension or status logfiles.
public accept ( )
    public function accept()
    {
        // Don't remove existing backups
        if ('zip' === pathinfo($this->current()->getFilename(), PATHINFO_EXTENSION)) {
            return false;
        }
        // Don't remove the index.html file
        if ('index.html' === $this->current()->getBasename()) {
            return false;
        }
        // Don't remove the file manifest
        if ('.files' === $this->current()->getBasename()) {
            return false;
        }
        // Don't cleanup the backup running file
        return !preg_match('/(.*-running)/', $this->current());
    }
CleanUpIterator