{"id":49086,"date":"2016-06-17T15:45:54","date_gmt":"2016-06-17T15:45:54","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/pym-shortcode\/"},"modified":"2020-03-26T18:09:16","modified_gmt":"2020-03-26T18:09:16","slug":"pym-shortcode","status":"publish","type":"plugin","link":"https:\/\/tah.wordpress.org\/plugins\/pym-shortcode\/","author":5279457,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.3.2.4","stable_tag":"1.3.2.4","tested":"5.4.19","requires":"3.0.1","requires_php":"5.3","requires_plugins":null,"header_name":"Pym.js Embeds","header_author":"INN Labs","header_description":"","assets_banners_color":"27c2f2","last_updated":"2020-03-26 18:09:16","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/inn.org\/donate","header_plugin_uri":"https:\/\/github.com\/INN\/pym-shortcode","header_author_uri":"https:\/\/labs.inn.org\/","rating":0,"author_block_rating":0,"active_installs":90,"downloads":4500,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.1":{"tag":"0.1","author":"inn_nerds","date":"2016-06-17 15:46:38"},"1.1.2":{"tag":"1.1.2","author":"inn_nerds","date":"2017-03-03 13:41:02"},"1.2.0":{"tag":"1.2.0","author":"inn_nerds","date":"2017-03-15 21:31:42"},"1.2.0.1":{"tag":"1.2.0.1","author":"inn_nerds","date":"2017-03-15 21:55:50"},"1.2.0.2":{"tag":"1.2.0.2","author":"inn_nerds","date":"2017-03-16 20:39:05"},"1.3.1":{"tag":"1.3.1","author":"inn_nerds","date":"2017-07-28 16:54:57"},"1.3.2":{"tag":"1.3.2","author":"inn_nerds","date":"2018-02-13 20:37:38"},"1.3.2.1":{"tag":"1.3.2.1","author":"innlabs","date":"2018-09-28 23:39:25"},"1.3.2.2":{"tag":"1.3.2.2","author":"innlabs","date":"2018-11-07 16:30:20"},"1.3.2.3":{"tag":"1.3.2.3","author":"innlabs","date":"2020-03-03 15:40:50"},"1.3.2.4":{"tag":"1.3.2.4","author":"innlabs","date":"2020-03-26 18:09:11"},"1.3.2.5":{"tag":"1.3.2.5","author":"newspack","date":"2025-06-04 15:30:08"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":1944461,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":1438598,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":1438598,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":{"pym-shortcode\/pym":{"name":"pym-shortcode\/pym","title":"Pym.js Embed"}},"tagged_versions":["0.1","1.1.2","1.2.0","1.2.0.1","1.2.0.2","1.3.1","1.3.2","1.3.2.1","1.3.2.2","1.3.2.3","1.3.2.4","1.3.2.5"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[17024,1860,229,606,80],"plugin_category":[43,59],"plugin_contributors":[142963],"plugin_business_model":[],"class_list":["post-49086","plugin","type-plugin","status-publish","hentry","plugin_tags-embeds","plugin_tags-iframe","plugin_tags-javascript","plugin_tags-responsive","plugin_tags-shortcode","plugin_category-customization","plugin_category-utilities-and-tools","plugin_contributors-innlabs","plugin_committers-automattic","plugin_committers-jboydston","plugin_committers-newspack","plugin_support_reps-jboydston"],"banners":{"banner":"https:\/\/ps.w.org\/pym-shortcode\/assets\/banner-772x250.jpg?rev=1438598","banner_2x":"https:\/\/ps.w.org\/pym-shortcode\/assets\/banner-1544x500.jpg?rev=1438598","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/pym-shortcode\/assets\/icon.svg?rev=1944461","icon":"https:\/\/ps.w.org\/pym-shortcode\/assets\/icon.svg?rev=1944461","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Pym.js Embeds provides shortcode and Gutenberg block wrappers for embedding responsive iframes using <a href=\"http:\/\/blog.apps.npr.org\/pym.js\/\">Pym.js<\/a>, developed by the NPR Visuals Team. Embedded content resizes vertically to match its container's width.<\/p>\n\n<p>AMP compatibility is provided by the <a href=\"https:\/\/wordpress.org\/plugins\/amp\/\">official AMP plugin<\/a>.<\/p>\n\n<h3>Pym.js Resources from NPR<\/h3>\n\n<p>You may also want to look at NPR's Pym.js resources:<\/p>\n\n<ul>\n<li><a href=\"http:\/\/blog.apps.npr.org\/pym.js\/\">Pym.js homepage<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/nprapps\/pym.js\/\">Pym.js repo on GutHub\/nprapps<\/a><\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>In the WordPress Dashboard go to <strong>Plugins<\/strong>, then click the <strong>Add Plugins<\/strong> button and search the WordPress Plugins Directory for Pym.js Embeds. Alternatively, you can download the zip file from this Github repo and upload it manually to your WordPress site.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress<\/li>\n<li>In <strong>Settings &gt; Pym.js Embed Settings<\/strong>, decide whether you'd like to change the plugin's behavior to use a non-default source URL for <code>Pym.js<\/code>, and whether you'd like to prevent post authors from setting embed-specific URLs for <code>Pym.js<\/code><\/li>\n<li>Begin embedding content!<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>For answers to frequently asked questions, <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/tree\/master\/docs\">see this plugin's documentation on GitHub<\/a>.<\/p>\n\n<p>For support resources, <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/tree\/master\/docs\">see this plugin's documentation on GitHub<\/a>.<\/p>\n\n<!--section=changelog-->\n<h4>1.3.2.4<\/h4>\n\n<ul>\n<li>Now tested up to WordPress 5.4 and Gutenberg 7.8.<\/li>\n<li>Fixes a presentational error in the Pym.js Embeds Block's block inspector control within the editor. PR <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/74\">#74<\/a> for issue <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/72\">#72<\/a>.<\/li>\n<\/ul>\n\n<h4>1.3.2.3<\/h4>\n\n<p>New features:<\/p>\n\n<ul>\n<li>Adds compatibility with <a href=\"https:\/\/wordpress.org\/plugins\/amp\/\">the official WordPress AMP Plugin<\/a>. On AMP endpoints, markup for Pym.js-based embeds is converted to <code>amp-iframe<\/code> tags. If you're not using the AMP Plugin, your site won't be affected. And if you're not viewing a page on an AMP endpoint, the page won't be affected. PR <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/62\">#62<\/a> by Claudiu Lodromanean, <a href=\"https:\/\/github.com\/Automattic\/newspack-plugin\/pull\/276\">originally for Automattic's Newspack<\/a>.<\/li>\n<\/ul>\n\n<p>Other updates:<\/p>\n\n<ul>\n<li>Adds credit to GitHub user <a href=\"https:\/\/github.com\/eidietrich\">eidietrich<\/a> for <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/55\">PR #55<\/a> in the 1.3.2.2 release notes.<\/li>\n<li>Fixes a 'nwesroom' typo. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/66\">PR #66<\/a> for issue <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/65\">#65<\/a>.<\/li>\n<\/ul>\n\n<h4>1.3.2.2<\/h4>\n\n<ul>\n<li>Plugin is now tested against WordPress 5.0 beta 3.<\/li>\n<li>Adds support for WordPress 5.0.<\/li>\n<li>Fixes bug where the Pym.js Embeds block did not work in WordPress 5.0. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pulls\/58\">PR #58<\/a> for <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/57\">issue #57<\/a>.<\/li>\n<li>Adds advice for where to host graphics files. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/55\">PR #55<\/a> from Github user <a href=\"https:\/\/github.com\/eidietrich\">eidietrich<\/a>.<\/li>\n<\/ul>\n\n<h4>1.3.2.1<\/h4>\n\n<p><strong>This is a major update! Please read the release notes.<\/strong><\/p>\n\n<p>Following the practice begun at plugin version 1.1.2 of <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/blob\/master\/docs\/maintainer-notes.md\">having the plugin version number match the version number of the bundled copy of <code>Pym.js<\/code><\/a>, the first three numbers in this plugin's version do not change with this release because the <code>Pym.js<\/code> version has not changed. We've tacked a <code>.1<\/code> on to the end to denote this release. Please read the release notes and test your site as appropriate before upgrading in production.<\/p>\n\n<p>We wish to thank all who helped us test <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/releases\/tag\/v1.3.2.1-rc1\">the release candidate<\/a> for this version, including Mike Janssen at <a href=\"https:\/\/current.org\/\">Current.org<\/a> and Alyson Hurt at the NPR Visuals Team.<\/p>\n\n<p>New features:<\/p>\n\n<ul>\n<li>Plugin renamed from \"Pym Shortcode\" to \"Pym.js Embeds\".<\/li>\n<li>Adds a \"Pym.js Embed\" block for use in Gutenberg. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/34\">PR #34<\/a> for issue <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/28\">#28<\/a>.\n\n<ul>\n<li>If a block is created using this plugin and Gutenberg, and Gutenberg is then disabled, the block will show a link to the embedded graphic.<\/li>\n<\/ul><\/li>\n<li>Through the settings page, you can now serve Pym.js using your newsroom's CDN or NPR's CDN! <a href=\"\">PR #45<\/a> for <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/31\">issue #31<\/a>.<\/li>\n<li>Adds a settings page, available to <a href=\"https:\/\/codex.wordpress.org\/Roles_and_Capabilities#Capability_vs._Role_Table\">those users with the <code>manage_options<\/code> capability<\/a>, with the following options:\n\n<ul>\n<li>Change the default pymsrc URL. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/45\">PR #45<\/a> for <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/8\">issue #8<\/a>.<\/li>\n<li>Override block and shortcode pymsrc URLs with the default pymsrc URL. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/45\">PR #45<\/a> for <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/8\">issue #8<\/a>.<\/li>\n<\/ul><\/li>\n<li>Adds an informational page, available to all who can make posts, that lists the plugin's default source URL for <code>Pym.js<\/code>. This is to make the process of building new interactives easier.<\/li>\n<li>Shortcode now gains an explicit <code>align=\"\"<\/code> parameter, so that WordPress's generated <a href=\"https:\/\/codex.wordpress.org\/CSS#WordPress_Generated_Classes\">alignment CSS classes<\/a> can be used on embeds. By enabling this in the shortcode, the Gutenberg Block also gains support for alignment. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/34\">PR #34<\/a>. Prior to this release, the alignment classes could be added via the <code>class=\"\"<\/code> parameter.<\/li>\n<li>Script tags for embeds are no longer output by <code>the_content()<\/code>, instead being output during <code>wp_footer()<\/code> by <a href=\"https:\/\/secure.php.net\/manual\/en\/functions.anonymous.php\">closures<\/a> hooked on the <code>'wp_footer'<\/code> action. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/34\">PR #34<\/a> for issues <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/33\">#33<\/a> and <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/35\">#35<\/a>.<\/li>\n<li>The script tag used to run <code>new pym.Parent<\/code> is now configurable. By replacing the <a href=\"https:\/\/codex.wordpress.org\/Pluggable_Functions\">pluggable function<\/a> <code>pym_shortcode_script_footer_enqueue()<\/code> with your own function, you can now use alternate forms of embed code that may be required for PJAX sites or custom versions of Pym.js. This resolves issue <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/19\">#19<\/a>.<\/li>\n<li>Adds \"Requires PHP: 5.3\" metadata to the plugin's <code>readme.txt<\/code>, since we're now using PHP namespaces for some code.<\/li>\n<li>Adds documentation for how to test the plugin:\n\n<ul>\n<li>tests to run before enabling the \"override pymsrc\" option in production<\/li>\n<li>tests to run for site compatibility with Gutenberg<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<p>Changes:<\/p>\n\n<ul>\n<li>The source URL for <code>pymjs<\/code>, known as the pymsrc URL, is now passed through <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/wp_http_validate_url\/\">wp_http_validate_url<\/a>. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/45\">PR #45<\/a> for <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/8\">issue #8<\/a>.<\/li>\n<li>The source URL for <code>pym.js<\/code> is no longer output by <code>the_content()<\/code>, instead being output during <code>wp_footer<\/code> by an action dedicated to the task. If different shortcodes and\/or blocks on the page specify different source URLs for Pym.js, all are output (after removing duplicates), but a message is logged in the browser console. If <code>WP_DEBUG<\/code> is set, this message is also logged to the server log, with the post ID specified. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/34\">PR #34<\/a> for issues <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/33\">#33<\/a> and <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/35\">#35<\/a>. See https:\/\/github.com\/INN\/pym-shortcode\/tree\/master\/docs#ive-set-a-different-pymsrc-option-but-now-im-seeing-a-message-in-the-console<\/li>\n<li><code>docs\/updating-pym.md<\/code> becomes <code>docs\/maintainer-notes.md<\/code><\/li>\n<li>Script tags for embeds are no longer output by <code>the_content()<\/code>, instead being output during <code>wp_footer()<\/code> by <a href=\"https:\/\/secure.php.net\/manual\/en\/functions.anonymous.php\">closures<\/a> hooked on the <code>'wp_footer'<\/code> action. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/34\">PR #34<\/a> for issues <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/33\">#33<\/a> and <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/35\">#35<\/a>.<\/li>\n<\/ul>\n\n<p>Removed:<\/p>\n\n<ul>\n<li>Script tags for embeds are no longer output by <code>the_content()<\/code>, instead being output during <code>wp_footer()<\/code> by <a href=\"https:\/\/secure.php.net\/manual\/en\/functions.anonymous.php\">closures<\/a> hooked on the <code>'wp_footer'<\/code> action. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/34\">PR #34<\/a> for issues <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/33\">#33<\/a> and <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/35\">#35<\/a>.<\/li>\n<\/ul>\n\n<h4>1.3.2<\/h4>\n\n<ul>\n<li><em>RECOMMENDED UPDATE<\/em> : Pym.js users, NPR has released an update that closes a potential security hole. We recommend everyone update to 1.3.2.<\/li>\n<li>Update to Pym.js version 1.3.2: https:\/\/github.com\/nprapps\/pym.js\/releases\/tag\/v1.3.2 (Changelog at https:\/\/github.com\/nprapps\/pym.js\/blob\/v1.3.2\/CHANGELOG)<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Update to Pym.js version 1.3.1: https:\/\/github.com\/nprapps\/pym.js\/releases\/tag\/v1.3.1 (Changelog at https:\/\/github.com\/nprapps\/pym.js\/blob\/v1.3.1\/CHANGELOG)<\/li>\n<li>(we skipped pym.js version 1.3.0: https:\/\/github.com\/nprapps\/pym.js\/releases\/tag\/v1.3.0)<\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>Update to Pym.js version 1.2.2: https:\/\/github.com\/nprapps\/pym.js\/releases\/tag\/v1.2.2 (Changelog at https:\/\/github.com\/nprapps\/pym.js\/blob\/master\/CHANGELOG )<\/li>\n<li>(we skipped Pym.js version 1.2.1: https:\/\/github.com\/nprapps\/pym.js\/releases\/tag\/v1.2.1 )<\/li>\n<li>Add <code>id=\"\"<\/code> attribute to allow setting custom IDs on embeds. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/21\">#21<\/a><\/li>\n<li>Add <code>class=\"\"<\/code> attribute to allow setting custom classes on embeds. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/22\">#22<\/a> and <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/issues\/23\">#23<\/a>.<\/li>\n<li>Add a default class name <code>pym<\/code> to all embed-containing div elements output by this plugin, and a filter 'pym_shortcode_default_class' to allow changing it.<\/li>\n<\/ul>\n\n<h4>1.2.0.2<\/h4>\n\n<ul>\n<li>Fix encoding error on pym.v1.min.js, <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/18\">thanks to lchheng<\/a><\/li>\n<\/ul>\n\n<h4>1.2.0.1<\/h4>\n\n<ul>\n<li>Add attribution for lchheng's <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/17\">pymsrc fix<\/a>.<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Update to Pym.js version 1.2.0: https:\/\/github.com\/nprapps\/pym.js\/releases\/tag\/v1.2.0 (Changelog at https:\/\/github.com\/nprapps\/pym.js\/blob\/v1.2.0\/CHANGELOG )<\/li>\n<li>Fixes a bug where the <code>pymsrc<\/code> attribute might have been ignored, for real this time. <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/pull\/17\">Thanks, lchheng!<\/a><\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Update to Pym.js version 1.1.2: https:\/\/github.com\/nprapps\/pym.js\/releases\/tag\/v1.1.2<\/li>\n<li>Switch the new default url of <code>Pym.js<\/code> in this plugin to <code>js\/pym.v1.min.js<\/code>, leaving the existing <code>js\/pym.js<\/code> where it is.<\/li>\n<li>Provide additional notes in <a href=\"https:\/\/github.com\/INN\/pym-shortcode\/tree\/master\/docs\">the documentation<\/a> for maintainers on updating <code>Pym.js<\/code> in this plugin<\/li>\n<li>Fixes a bug where the <code>pymsrc<\/code> attribute might have been ignored<\/li>\n<li>Fixes and corrections to documentation.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>First release of the plugin<\/li>\n<\/ul>","raw_excerpt":"A WordPress block and shortcode for embedding iframes that are responsive horizontally and vertically, using the NPR Visuals Team&#039;s Pym.js.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/49086","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=49086"}],"author":[{"embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/automattic"}],"wp:attachment":[{"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=49086"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=49086"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=49086"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=49086"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=49086"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tah.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=49086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}