Skip to content

6.3.3

Pre-release
Pre-release
Compare
Choose a tag to compare
@michelve michelve released this 06 Dec 21:17
· 7 commits to master since this release

feat: Add custom block category "SLM Plus" and improve shortcode blocks

  • Registered a new block category "SLM Plus" for better organization.
  • Updated "Forgot License" and "List Licenses" blocks to assign them to the custom category.
  • Improved block editor previews for both blocks:
    • "Forgot License" block displays a preview with a form placeholder.
    • "List Licenses" block displays a preview with a sample list of licenses.
  • Fixed issues with blocks appearing under "Uncategorized" by ensuring proper category registration.
  • Ensured unique naming in block scripts to avoid conflicts.
  • Added clear styles for block previews and frontend rendering in slm-blocks.css.
  • Verified shortcode functionality for rendering licenses dynamically.

How to Use the New Shortcodes and Blocks

Shortcodes:

  1. Forgot License: [slm_forgot_license]

    • Displays a form where users can enter their email to retrieve license information.
    • Can be added to any page or post manually.
  2. List Licenses: [slm_list_licenses]

    • Dynamically displays a table of licenses associated with the logged-in user.
    • Useful for pages where users manage their licenses.

Blocks:

  1. Forgot License Block:

    • Found under the "SLM Plus" category in the block editor.
    • Provides an interactive form preview in the editor.
    • On the frontend, renders the [slm_forgot_license] shortcode.
  2. List Licenses Block:

    • Found under the "SLM Plus" category in the block editor.
    • Displays a placeholder list of licenses in the editor.
    • On the frontend, renders the [slm_list_licenses] shortcode dynamically.

Additional Notes

  • Ensure that slm-blocks.js and slm-blocks.css are correctly enqueued for the blocks and styles to work.
  • Blocks and shortcodes are fully compatible with logged-in user sessions for personalized license management.