Skip to content

Improper usage of add_action to update plugin action links #646

@kt-12

Description

@kt-12

Bug Description

This bug was spotted while doing static test for issue #622.

add_action( 'plugin_action_links_' . plugin_basename( PERFLAB_MAIN_FILE ), 'perflab_plugin_action_links_add_settings' );
used within function perflab_add_modules_page() inside admin/load.php ( line ), calls perflab_plugin_action_links_add_settings which only add a new link to existing links.

The code currently works because of the usage of array_unshift which updates reference array.

Steps to reproduce

  1. Go to 'admin/load.php'
  2. Scroll down to 'function perflab_add_modules_page()'
  3. See error in the add_action( 'plugin_action_links_...

Screenshots

Additional Context

  • PHP Version:
  • OS: [e.g. iOS]
  • Browser: [e.g. chrome, safari]
  • Plugin Version: [e.g. 22]
  • Device: [e.g. iPhone6]

Metadata

Metadata

Assignees

No one assigned

    Labels

    InfrastructureIssues for the overall performance plugin infrastructure[Plugin] Performance LabIssue relates to work in the Performance Lab Plugin only[Type] BugAn existing feature is broken

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions