Свойство | Тип | Описание | |
---|---|---|---|
$authors | string | String for authors, contributors | |
$basedir | string | OPF Basedir | |
$isPbEpub | boolean | If Pressbooks generated the epub file | |
$zip | ZipArchive | Reference to the object that represents the Epub zip folder |
Метод | Описание | |
---|---|---|
__construct ( ) | ||
import ( array $current_import ) : boolean | ||
setCurrentImportOption ( array $upload ) : boolean |
Метод | Описание | |
---|---|---|
fetchAndSaveUniqueImage ( $url, string $href ) : string | Extract url from zip and load into WP using media_handle_sideload() Will return an empty string if something went wrong. | |
getOpf ( ) : SimpleXMLElement | Return book.opf as a SimpleXML object | |
getZipContent ( $file, boolean $as_xml = true ) : string | SimpleXMLElement | Locates an entry using its name, returns the entry contents | |
kneadAndInsert ( string $href, string $post_type, integer $chapter_parent ) | Pummel then insert HTML into our database | |
kneadHref ( DOMDocument $doc, string $type, string $href ) : DOMDocument | Change hrefs | |
kneadHtml ( string $html, string $type, string $href ) : string | Pummel the HTML into WordPress compatible dough. | |
parseManifest ( SimpleXMLElement $xml, array $match_ids, $chapter_parent ) | Parse OPF manifest nodes | |
parseMetadata ( SimpleXMLElement $xml ) | Parse OPF metadata nodes | |
pbCheck ( string $copyrightFile ) : boolean | Is it an EPUB generated by PB? | |
regexSearchReplace ( string $html ) : string | Cleans imported html of unwanted tags | |
scrapeAndKneadImages ( DOMDocument $doc, string $href ) : DOMDocument | Parse HTML snippet, save all found tags using media_handle_sideload(), return the HTML with changed paths. | |
setCurrentZip ( string $fullpath ) | Opens a new Epub for reading, writing or modifying | |
tidy ( string $html ) : string |
protected fetchAndSaveUniqueImage ( $url, string $href ) : string | ||
$url | string | |
$href | string | original filename, with (relative) path |
Результат | string | filename |
protected getOpf ( ) : SimpleXMLElement | ||
Результат | SimpleXMLElement |
protected getZipContent ( $file, boolean $as_xml = true ) : string | SimpleXMLElement | ||
$file | ||
$as_xml | boolean | |
Результат | string | SimpleXMLElement |
protected parseManifest ( SimpleXMLElement $xml, array $match_ids, $chapter_parent ) | ||
$xml | SimpleXMLElement | |
$match_ids | array | |
$chapter_parent |
protected parseMetadata ( SimpleXMLElement $xml ) | ||
$xml | SimpleXMLElement |
protected regexSearchReplace ( string $html ) : string | ||
$html | string | |
Результат | string |
protected scrapeAndKneadImages ( DOMDocument $doc, string $href ) : DOMDocument | ||
$doc | DOMDocument | |
$href | string | original filename, with (relative) path |
Результат | DOMDocument |
public setCurrentImportOption ( array $upload ) : boolean | ||
$upload | array | |
Результат | boolean |
protected setCurrentZip ( string $fullpath ) | ||
$fullpath | string |
protected string $authors | ||
Результат | string |
protected bool $isPbEpub | ||
Результат | boolean |