Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Options page and settings #45

Merged
merged 17 commits into from
Sep 6, 2018
Merged

Options page and settings #45

merged 17 commits into from
Sep 6, 2018

Conversation

benlk
Copy link
Collaborator

@benlk benlk commented Sep 6, 2018

Changes

The next release of the plugin will be 1.3.2.1.

  • Adds a settings page, available to those with the manage_options capability, with the following options:
    • Change the default pymsrc URL. PR #45 for issue #8.
    • Override block and shortcode pymsrc URLs with the default pymsrc URL. PR #45 for issue #8.
  • 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 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.
  • 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
  • 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 by the_content(), instead being output during wp_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. If WP_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 becomes docs/maintainer-notes.md

screen shot 2018-09-06 at 12 56 58 pm

screen shot 2018-09-06 at 12 57 01 pm

screen shot 2018-09-06 at 12 57 18 pm

screen shot 2018-09-06 at 12 57 30 pm

To do:

- INN\PymShortcode is now INN\PymEmbeds
- Adds settings page
	- addresses #32
	- helper function INN\PymEmbeds\Settings\option_group() to get the option group name
	- helper function INN\PymEmbeds\Settings\option_key() to get the option_key for wp_options
	- helper function INN\PymEmbeds\Settings\settings_section() to get the settings section ID for the settings page
	- helper function INN\PymEmbeds\Settings\settings_page() to get the settings page ID
	- option default_pymsrc to change away from that provided by pym_pymsrc_local_url(), which is run through wp_http_validate_url to address #8 (comment)
	- option override_pymsrc to force use of default_pymsrc in embed output, addressing #8
…w to test your site for the upgrade checkbox.
@benlk benlk added this to the 1.3.2.1: Gutenberg Support milestone Sep 6, 2018
@benlk benlk merged commit 8193da2 into master Sep 6, 2018
benlk added a commit that referenced this pull request Sep 21, 2018
benlk added a commit that referenced this pull request Sep 21, 2018
@benlk benlk deleted the 32-settings-options branch November 10, 2018 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant