Property | Type | Description | |
---|---|---|---|
$currentVersion | integer | The value for option: pressbooks_metadata_version | |
$upgradeCheckboxes | array | We need to upgrade these for compatibility with custom_metdata(). |
Method | Description | |
---|---|---|
__construct ( ) | ||
changeDefaultBookCover ( ) | Change default book cover from PNG to JPG | |
fixDoubleSlashBug ( ) | Fix a double slash bug by reactivating theme with new settings. | |
getDeprecatedComparisonTable ( string $table, boolean $new_as_keys = false ) : array | ||
getLicenseXml ( string $type, string $copyright_holder, string $src_url, string $title, $lang = '' ) : string | Takes a known string from metadata, builds a url to hit an api which returns an xml response | |
getMetaPost ( ) : WP_Post | boolean | Returns the latest "metadata" post. There should be only one per book. | |
getMetaPostMetadata ( ) : array | Return metadata attached to the latest "metadata" post. | |
getMicrodataElements ( ) : string | Returns an html blob of microdata elements based on what is set in 'Book Information' | |
getMidByKey ( integer $post_id, string $meta_key ) : integer | boolean | Return a database ID for a given meta key. | |
getSeoMetaElements ( ) : string | Returns an html blob of meta elements based on what is set in 'Book Information' | |
getWebLicenseHtml ( SimpleXMLElement $response ) : string | Returns an HTML blob if given an XML object | |
makeThumbnailsForBookCover ( ) | Generate thumbnails for a user uploaded cover | |
resetLandingPage ( ) | Fix broken landing page | |
upgrade ( integer $version ) | Upgrade metadata. | |
upgradeBook ( ) | Upgrade book metadata. | |
upgradeBookInformation ( ) | Upgrade book information. | |
upgradeCustomCss ( ) | Upgrade Custom CSS types. | |
upgradeEcommerce ( ) | Upgrade Ecommerce metadata |
public changeDefaultBookCover ( ) |
public fixDoubleSlashBug ( ) |
public getMetaPost ( ) : WP_Post | boolean | ||
return | WP_Post | boolean |
public getMetaPostMetadata ( ) : array | ||
return | array |
static public getMicrodataElements ( ) : string | ||
return | string |
static public getSeoMetaElements ( ) : string | ||
return | string |
static public getWebLicenseHtml ( SimpleXMLElement $response ) : string | ||
$response | SimpleXMLElement | |
return | string | $html blob of copyright information |
public makeThumbnailsForBookCover ( ) |
static public int $currentVersion | ||
return | integer |
public array $upgradeCheckboxes | ||
return | array |