Open
Description
Implement hook discovery into QM (as discussed on Twitter).
Thinking something like the following:
do_action( 'qm/listen/start', 'label' );
...
do_action( 'foobar' );
...
$foo = apply_filters( 'bar', 0 );
...
do_action( 'qm/listen/stop', 'label' );
The above would result in display of both the foobar
action and the bar
filter in QM, with some display of the second parameter of the QM action hook (in this example, label
).
The purpose of label
would be to serve in identification when multiple bounds have been set.
Metadata
Metadata
Assignees
Labels
No labels
Activity
crstauf commentedon Feb 18, 2019
As I see it, there are two approaches:
hooks
collector and outputI'm personally favoring the second option, as it could introduce a pretty nice interface and contextualize the discovery. It's likely more work than option one, but ultimately I think a more cohesive experience.
With option two though, need to also consider that would add additional complexity to a relatively straight forward collector.
@johnbillion I may start on a PR for option one, but definitely interested in your thoughts before I get too far in.
crstauf commentedon Feb 18, 2019
Hmm, given that the Hooks panel can be filtered, I'm now thinking of a different option:
init implementation of johnbillion#405 (third option)
crstauf commentedon Feb 19, 2019
Submitted PR (#410).
crstauf commentedon Feb 19, 2019
Instead of a column for counting successive uses, I think I'll change to display like the Template Parts section:
crstauf commentedon Feb 21, 2019
Discovered Hooks sub-panel now looks like this:
crstauf commentedon Feb 21, 2019
Planning on adding additional info to the notice that shows when using the
all
hook.crstauf commentedon Feb 22, 2019
do_action()
fire(s) to Label column as.qm-info.qm-supplemental
all
hook performance noticecrstauf commentedon Feb 22, 2019
Added trace info for the start and stop bounds, but I don't like how it displays:
Any suggestions?
crstauf commentedon Feb 23, 2019
I'm not satisfied with the current integration. Going to rebuild as a separate collector.
crstauf commentedon Feb 23, 2019
Rebuilt using separate collector and output. 😄
crstauf commentedon Sep 13, 2019
Man, forgot about this; so cool. 😂
crstauf commentedon Jul 3, 2023
Still so cool.