Skip to content

GP-1026: Make login and registration links dynamic. Small refactor.#1027

Merged
mauteri merged 13 commits intodevelopfrom
GP-1026
Mar 16, 2025
Merged

GP-1026: Make login and registration links dynamic. Small refactor.#1027
mauteri merged 13 commits intodevelopfrom
GP-1026

Conversation

@mauteri
Copy link
Copy Markdown
Contributor

@mauteri mauteri commented Mar 15, 2025

Description of the Change

@stephenerdelyi discovered an issue with the Login/Registration links being hardcoded in the RSVP block, which makes them inflexible moving from one environment to another and possibly other changes to the event. This PR makes those links dynamic within a render_block hook with string replacement of a special URL hash.

Closes #1026

How to test the Change

URLS should be dynamically generated in the Login modal, which appears when you click RSVP while logged out.

Changelog Entry

Added - New feature
Changed - Existing functionality
Deprecated - Soon-to-be removed feature
Removed - Feature
Fixed - Bug fix
Security - Vulnerability

Credits

Props @mauteri @jmarx @stephenerdelyi

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@what-the-diff
Copy link
Copy Markdown

what-the-diff bot commented Mar 15, 2025

PR Summary

  • Updated Version Number

    • The version number documented in the index.asset.php file has been updated. This indicates that the internal files have been modified and the product is, therefore, a new version.
  • Refactoring and Code Improvement in class-general-block.php File

    • The naming of functions controlling login and registration blocks have been improved, making it clearer what their purpose is.
    • The login and registration block processing features are enhanced; they now replace placeholder URLs with actual login and registration URLs dynamically.
  • Code Consolidation in class-assets.php and class-utility.php Files

    • The methods for fetching login and registration URLs have been removed from the class-assets.php file, making the code cleaner and easier to manage.
    • These methods are now located in the class-utility.php file, centralizing their functionality to make the code more efficient and easier to maintain.
  • Change in URL Fetching in no-status.js

    • URL fetching approach has been updated in no-status.js. It has moved from dynamic URL fetching to using static anchors. This simplifies the code and enhances its performance by reducing processing needs.

@mauteri mauteri marked this pull request as ready for review March 16, 2025 16:51
@github-actions
Copy link
Copy Markdown
Contributor

Preview changes with Playground

You can preview the recent changes for PR#1027 with the following PHP versions:

PHP Version 8.3

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

@mauteri mauteri merged commit a8aeb23 into develop Mar 16, 2025
15 checks passed
@mauteri mauteri deleted the GP-1026 branch March 16, 2025 16:54
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.

Fix Login & Registration functionality in RSVP Block

2 participants