Skip to content

Commit 7ae6e93

Browse files
Use prefixes for hooks like WP code reference does
1 parent e440689 commit 7ae6e93

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

generate-hook-docs.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,9 @@ protected static function getJSOutput(array $hook_list): string
294294

295295
foreach ($hook_list as $heading => $hooks) {
296296
foreach ($hooks as $hook => $details) {
297-
$summary = $heading . ' ' . (('filter' === $details['type']) ? 'Filter' : 'Action');
298-
$name = $hook . ' ' . $details['type'];
297+
$type = 'filter' === $details['type'] ? 'Filter' : 'Action';
298+
$summary = $heading . ' ' . $type;
299+
$name = '<strong>' . $type . ' hook: <\/strong>' . $hook;
299300

300301
foreach ($details['files'] as $file) {
301302
$summary .= ' located in ' . str_replace('woocommerce/', '', $file['path']) . ': ' . $file['line'];

0 commit comments

Comments
 (0)