Skip to content

Consider a "Start setup" plugin_action_links link after installing and activating the plugin #8679

@jamesozzie

Description

@jamesozzie

Bug Description

Following on from a users support request in the Analytics Help Center, considering adding a "Start setup" or similar option to the available links after the plugin is activated. This could be added via a plugin_action_links hook.

Such a link would only appear after the plugin has been installed and activated, but not set up. Such links are common for some plugins, evidenced by the "Manage" and "Reset" links for the Redirect Redirections plugin in the screenshot below.

image

__
Reasons for adding this feature

  • If you refresh the plugins page after Site Kit has been installed and activated, the banner to "Start setup" no longer appears
  • It would make it easier for users to start the plugin set up
  • It is a relatively straightforward addition

Reasons against adding this feature

  • We already display a large banner to "Start setup" after the plugin is activated
  • It would require a conditional statement to only display when the plugin is activated

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • A new "Start setup" link should be added to the plugin's action links as shown below
    Image
  • This link should only be added so long as the site setup is not completed yet
  • The URL for the link should match the one used in the banner at the top of the page

Implementation Brief

  • Update includes/Core/Admin/Plugin_Action_Links.php
    • Inside the plugin_action_links callback, add a new link to the links
      • It should be added when the current user has the Permissions::SETUP permission but doesn't have the Permissions::VIEW_DASHBOARD yet, which means the setup hasn't been completed yet
      • The link label should be Setup and it should take to the splash screen ($this->context->admin_url())

Test Coverage

  • Add test coverage for the Plugin_Action_Links class to ensure it only displays the Set up link under the right conditions.

QA Brief

  • Install Site Kit but don't set it up yet
  • Ensure that the Site Kit action links in the plugins page only has "Start setup" and "Deactivate"
  • Set up Site Kit
  • Ensure that the Site Kit action links in the plugins page only has "Settings" and "Deactivate"

Changelog entry

  • Add a "Start setup" link for Site Kit in the WordPress plugin screen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Low priorityPHPTeam MIssues for Squad 2Type: EnhancementImprovement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions