Skip to content

Add --search option to wp profile hook to filter results by callback name#211

Merged
swissspidy merged 9 commits intomainfrom
copilot/add-callback-name-search
Mar 11, 2026
Merged

Add --search option to wp profile hook to filter results by callback name#211
swissspidy merged 9 commits intomainfrom
copilot/add-callback-name-search

Conversation

Copy link
Contributor

Copilot AI commented Mar 2, 2026

  • Explore codebase and understand the structure
  • Add --search=<pattern> option to wp profile hook command documentation
  • Implement filter_by_callback() private static method in Command.php (case-insensitive substring match)
  • Apply search filter in the hook() method after spotlight filtering
  • Add Behat tests: search on a specific hook, search across all hooks with --all
  • Refactor filter_by_callback() to use array_filter for idiomatic PHP
  • Validate with linting, code style, and static analysis
Original prompt

This section details on the original issue you should resolve

<issue_title>Search by specific callback names</issue_title>
<issue_description>> Ability to search by specific callback names. For example: show all FacetWP-related callbacks by searching for FWP().*

Among other things, it'd give a better picture of a plugin's impact on the site.</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@swissspidy swissspidy added the command:profile-hook Related to 'profile hook' command label Mar 2, 2026
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot AI changed the title [WIP] Add ability to search by specific callback names Add --search option to wp profile hook to filter results by callback name Mar 2, 2026
@swissspidy swissspidy marked this pull request as ready for review March 10, 2026 21:11
@swissspidy swissspidy requested a review from a team as a code owner March 10, 2026 21:11
Copilot AI review requested due to automatic review settings March 10, 2026 21:11
@swissspidy swissspidy added this to the 2.1.6 milestone Mar 10, 2026

This comment was marked as resolved.

swissspidy and others added 3 commits March 10, 2026 22:17
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@swissspidy

This comment was marked as resolved.

gemini-code-assist[bot]

This comment was marked as resolved.

@swissspidy

This comment was marked as resolved.

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>

This comment was marked as resolved.

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/Command.php 90.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy changed the title Add --search option to wp profile hook to filter results by callback name Add --search option to wp profile hook to filter results by callback name Mar 11, 2026
@swissspidy swissspidy merged commit 63f513c into main Mar 11, 2026
60 checks passed
@swissspidy swissspidy deleted the copilot/add-callback-name-search branch March 11, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:profile-hook Related to 'profile hook' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search by specific callback names

3 participants