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

Fix embed widget documentation and validation #702

Merged
merged 3 commits into from
Jul 30, 2019

Conversation

joshcanhelp
Copy link
Contributor

@joshcanhelp joshcanhelp commented Jul 29, 2019

Changes

  • Update widget form documentation to match settings page
  • Add missing redirect URL validation
  • Add notice that logged-in users will not see the form

Note to reviewers: changes to the PO, MO, and POT files are automated. If the text in the main template file being changed, templates/a0-widget-setup-form.php, looks good, then these will be fine as well. Marking this as "small" as it's mostly verbiage changes.

Testing

  • This change adds unit test coverage
  • This change has been tested on WP 5.2.2

Checklist

  • All existing and new tests complete without errors
  • All code quality tools/guidelines in the Contribution guide have been run/followed
  • All active GitHub CI checks have passed

@joshcanhelp joshcanhelp added this to the 3.11.1 milestone Jul 29, 2019
@@ -32,7 +32,7 @@
"scripts": {
"compat": "\"vendor/bin/phpcs\" --standard=phpcs-compat-ruleset.xml .",
"phpcs": "\"vendor/bin/phpcs\"",
"phpcs-i18n": "\"vendor/bin/phpcs\" --sniffs=WordPress.WP.I18n ./lib/",
"phpcs-i18n": "\"vendor/bin/phpcs\" --sniffs=WordPress.WP.I18n",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing files from the translation check

}

if ( ! empty( $new_instance['redirect_to'] ) ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redirect URL now uses the same validation as the settings page.

</p>

<?php if ( $custom_css ) : ?>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not show the field if empty to avoid new data to be saved (this option is deprecated).

@joshcanhelp joshcanhelp requested a review from a team July 29, 2019 23:40
</p>
<?php endif; ?>

<?php if ( $custom_js ) : ?>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not show the field if empty to avoid new data to be saved (this option is deprecated).

templates/a0-widget-setup-form.php Outdated Show resolved Hide resolved
@joshcanhelp joshcanhelp force-pushed the add-logged-in-notice branch 2 times, most recently from f24c5b7 to 1316c23 Compare July 30, 2019 15:32
@joshcanhelp joshcanhelp merged commit d6caacf into wordpress-org-plugin Jul 30, 2019
@joshcanhelp joshcanhelp deleted the add-logged-in-notice branch July 30, 2019 15:44
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants