This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
/** | |
* Create a new MediaLibraryTaxonomyFilter we later will instantiate | |
*/ | |
var MediaLibraryTaxonomyFilter = wp.media.view.AttachmentFilters.extend({ | |
id: 'media-attachment-taxonomy-filter', | |
createFilters: function() { | |
var filters = {}; | |
// Formats the 'terms' we've included via wp_localize_script() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Save PDF from HTML Microservice | |
https://addaptive-microservices.herokuapp.com/api/html-to-pdf | |
const puppeteer = require('puppeteer'); | |
class Webpage { | |
static async generatePDF(html) { | |
const browser = await puppeteer.launch({ headless: true }); // Puppeteer can only generate pdf in headless mode. | |
const page = await browser.newPage(); | |