Release candidate: 1.3.2.1 rc 1
Pre-releaseThis is the first release candidate for release 1.3.2.1 of the Pym.js Embeds WordPress plugin.
This is a major update! Please read the release notes.
Following the practice begun at plugin version 1.1.2 of having the plugin version number match the version number of the bundled copy of Pym.js
, the first three numbers in this plugin's version do not change with this release because the Pym.js
version has not changed. We'll add a .1
on to the end of the prior release, 1.3.2
, to denote this plugin release, with the version number of the production-ready plugin being 1.3.2.1
.
Don't run this in production quite yet; do run this in a staging environment. This should be a drop-in replacement for the copy of Pym Shortcode on your site, but let us know if you find problems. 1.3.2.1
will be ready for use in production environments. Advice on testing this updated version of the plugin can be found at https://github.com/INN/pym-shortcode/blob/master/docs/upgrade-testing.md
New features:
- Plugin renamed from "Pym Shortcode" to "Pym.js Embeds".
- Adds a "Pym.js Embed" block for use in Gutenberg. PR #34 for issue #28.
- 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.
- Through the settings page, you can now serve pym.js using your newsroom's CDN or NPR's CDN! PR #45 for issue #31.
- Adds a settings page, available to those users with the
manage_options
capability, with the following options: - Adds an informational page, available to all who can make posts, that lists the plugin's default source URL for
Pym.js
. This is to make the process of building new interactives easier. - Shortcode now gains an explicit
align=""
parameter, so that WordPress's generated alignment CSS classes can be used on embeds. By enabling this in the shortcode, the Gutenberg Block also gains support for alignment. PR #34. Prior to this release, the alignment classes could be added via theclass=""
parameter. - Script tags for embeds are no longer output by
the_content()
, instead being output duringwp_footer()
by closures hooked on the'wp_footer'
action. PR #34 for issues #33 and #35. - The script tag used to run
new pym.Parent
is now configurable. By replacing the pluggable functionpym_shortcode_script_footer_enqueue()
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 #19. - Adds "Requires PHP: 5.3" metadata to the plugin's
readme.txt
, since we're now using PHP namespaces for some code. - Adds documentation for how to test the plugin:
- tests to run before enabling the "override pymsrc" option in production
- tests to run for site compatibility with Gutenberg
Changes:
- The source URL for
pymjs
, known as the pymsrc URL, is now passed through wp_http_validate_url. PR #45 for issue #8. - The source URL for
pym.js
is no longer output bythe_content()
, instead being output duringwp_footer
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. IfWP_DEBUG
is set, this message is also logged to the server log, with the post ID specified. PR #34 for issues #33 and #35. 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 docs/updating-pym.md
becomesdocs/maintainer-notes.md
- Script tags for embeds are no longer output by
the_content()
, instead being output duringwp_footer()
by closures hooked on the'wp_footer'
action. PR #34 for issues #33 and #35.