Add support for embedding PDFs #6083
Labels
Enhancement
New feature or improvement of an existing one
Integration: Gutenberg
P2
Low priority
Sanitizers
Milestone
Feature description
Gutenberg 10.5 adds support for embedding PDFs in the File block: WordPress/gutenberg#30857.
It does so by adding an
object
element to the page:We need to add an
AMP_Object_Sanitizer
which automatically convertsobject[type=application/pdf]
intoamp-google-document-embed
.We also need to dequeue the new
wp-block-library-file
script which is getting enqueued in therender_callback
, so dequeuing will need to be done at thewp_print_footer_scripts
action. Or otherwise, we can just unset therender_callback
entirely so that the$content
is just passed through as-is.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: