Skip to content

Conversation

@EugeneKyale
Copy link
Contributor

This PR adds a lightweight, dependency-free flow in the Kindling theme that prompts admins to install and activate Kindling Blocks. The notice persists until the plugin is active and supports a one-click install from a private ZIP endpoint with automatic activation.

What changed

  • Added an admin notice rendered on admin_notices for users who can install plugins

  • If the plugin is missing, the primary action routes to an admin-post handler that downloads the private ZIP and runs Plugin_Upgrader then activates the plugin

  • If the plugin is installed but inactive, the primary action activates it directly

  • Added success and error result notices after redirects

  • Introduced two filters for URLs:

    • kindling_blocks_package_url to override the ZIP location (supports signed links)
    • kindling_blocks_learn_more_url for a secondary link to marketing or docs

How to test

  1. Activate Kindling on a site without Kindling Blocks.

  2. Confirm the notice appears on any admin screen.

  3. Click Install Kindling Blocks.

    • If file system creds are needed, enter them.
    • On success, confirm a success notice and that the plugin is active.
  4. Deactivate the plugin and refresh.

    • Notice should reappear with Activate button.
    • Click Activate and confirm activation succeeds.
  5. Override the package URL using:

    add_filter( 'kindling_blocks_package_url', function( $url ) {
      return 'https://kindlingwp.com/plugins/kindling-blocks/signed-link.zip';
    } );

    Confirm the installer uses the new URL.

Acceptance Criteria

  • Notice persists until the plugin is active
  • Install path downloads and activates from private ZIP
  • Activation path works when the plugin is installed but inactive
  • Errors are surfaced in admin notices
  • URLs are filterable
  • Code follows WP standards and respects capabilities

Security and privacy

  • Nonces on all actions
  • install_plugins capability required
  • Inputs sanitized and outputs escaped
  • No tokens or secrets in code. Use filters for signed links

Screenshots

  • Notice with Install button
image
  • Notice with Activate button
image
  • Success
image
  • Error
image

Related

@EugeneKyale EugeneKyale self-assigned this Oct 9, 2025
@EugeneKyale EugeneKyale requested a review from unscripted October 9, 2025 14:22
Base automatically changed from 4.0.0-alpha to main October 13, 2025 15:04
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.

Add persistent admin notice to install/activate Kindling Blocks from private ZIP

1 participant