search_for_folder example

if ( isset( $this->cache[ $folder ] ) ) {
            return $this->cache[ $folder ];
        }

        if ( $this->exists( $folder ) ) { // Folder exists at that absolute path.             $folder                 = trailingslashit( $folder );
            $this->cache[ $folder ] = $folder;

            return $folder;
        }

        $return = $this->search_for_folder( $folder );

        if ( $return ) {
            $this->cache[ $folder ] = $return;
        }

        return $return;
    }

    /** * Locates a folder on the remote filesystem. * * Expects Windows sanitized path. * * @since 2.7.0 * * @param string $folder The folder to locate. * @param string $base The folder to start searching from. * @param bool $loop If the function has recursed. Internal use only. * @return string|false The location of the remote path, false to cease looping. */
Home | Imprint | This part of the site doesn't use cookies.