Метод |
Описание |
|
fetchAndSaveUniqueImage ( string $href ) : string |
Extract url from zip and load into WP using media_handle_sideload()
Will return an empty string if something went wrong. |
|
findTheNode ( DOMNode $node, string $chapter_name ) : DOMNode |
Recursive iterator to locate and return a specific node, targeting child nodes |
|
getChapter ( DOMNodeList $dom_list, integer $index, string $chapter_title ) : string |
Find where to start, iterate through a list, add elements to a
new DomDocument, return resulting xhtml |
|
getFuzzyChapterTitles ( ) : array |
Returns an array of available chapters, or 'unknown' if none |
|
getZipContent ( string $file, boolean $as_xml = true ) : boolean | DOMDocument |
Locates an entry using its name, returns the entry contents |
|
isValidZip ( string $fullpath ) |
Checks for standard ODT file structure |
|
kneadAndInsert ( string $html, string $title, string $post_type, integer $chapter_parent ) |
Pummel then insert HTML into our database |
|
kneadHTML ( string $body ) : string |
Pummel the HTML into WordPress compatible dough. |
|
parseContent ( DomDocument $xml, string $chapter_title ) : string |
Find and return the identified chapter |
|
parseMetaData ( DOMDocument $meta ) |
Sets an instance variable with value(s) from metadata |
|
scrapeAndKneadImages ( DOMDocument $doc ) : DOMDocument |
Parse HTML snippet, save all found tags using media_handle_sideload(), return the HTML with changed paths. |
|
tidy ( string $html ) : string |
Compliance with XTHML standards, rid cruft generated by word processors |
|