can_operate() || ! $files_db->can_operate() ) { return; } foreach ( $folders_to_sync as $folder_path ) { $folder_path = trailingslashit( $folder_path ); if ( Imagify_Files_Scan::is_path_forbidden( $folder_path ) ) { // This theme or plugin must not be optimized. continue; } // Get the related folder. $placeholder = Imagify_Files_Scan::add_placeholder( $folder_path ); $folder = Imagify_Folders_DB::get_instance()->get_in( 'path', $placeholder ); if ( ! $folder ) { // This theme or plugin is not in the database. continue; } // Sync the folder files. Imagify_Custom_Folders::synchronize_files_from_folders( array( $folder['folder_id'] => array( 'folder_id' => $folder['folder_id'], 'path' => $placeholder, 'active' => $folder['active'], 'folder_path' => $folder_path, ), ) ); } }