Ejemplo n.º 1
0
function _comicpress_pre_handle_comic_path_results($return, $results, $type, $post_to_use)
{
    global $wpmu_version;
    if (!empty($wpmu_version)) {
        $globals = ComicPressMediaHandling::_bundle_global_variables();
        $comic = $globals[$type] . '/' . basename(reset($results));
        if (($wpmu_path = get_option('upload_path')) !== false) {
            $comic = str_replace($wpmu_path, "files", $comic);
        }
        return $comic;
    }
    return false;
}
Ejemplo n.º 2
0
/**
* Find a comic file in the filesystem.
* @param string $folder The folder name to search.
* @param string $override_post A WP Post object to use in place of global $post.
* @param string $filter The $comic_filename_filters to use.
* @return string The relative path to the comic file, or false if not found.
*/
function get_comic_path($folder = 'comic', $override_post = null, $filter = 'default', $multi = null)
{
    $mh = new ComicPressMediaHandling();
    return $mh->get_comic_path($folder, $override_post, $filter, $multi);
}