[wp-meta] [Making WordPress.org] #5942: DevHub: Support viewing source on GitHub mirror

Making WordPress.org noreply at wordpress.org
Thu Nov 4 08:57:55 UTC 2021


#5942: DevHub: Support viewing source on GitHub mirror
---------------------------+-----------------------
 Reporter:  netweb         |       Owner:  dd32
     Type:  enhancement    |      Status:  reopened
 Priority:  normal         |   Milestone:
Component:  Developer Hub  |  Resolution:
 Keywords:  needs-patch    |
---------------------------+-----------------------

Comment (by coffee2code):

 Replying to [comment:6 dd32]:
 > The above hook also shows a parser bug, as it's unable to extract the
 PHP for the hook, this affects a number of hooks and functions that I've
 seen over the last few months.

 Hooks are (and have always been) explicitly excluded**^*^** from having
 their PHP source shown since doing so is not meaningful (it'd just be a
 duplicate of the hook definition at the top of the page), so it merely
 links to the source.

 Functions should always show their source code though, so I'd be happy to
 look into any that are failing to do so.

 > This only applied to functions and not other locations, like hooks:

 Following on from my explanation above, the change made by the patch to
 `reference/template-source.php` needs to also be applied in the nearby
 `else`.

 -----

 ''**^*^** In the template
 [https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html
 /wp-content/themes/pub/wporg-developer/reference/template-source.php#L23
 reference/template-source.php], which uses
 [https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html
 /wp-content/themes/pub/wporg-developer/inc/template-tags.php#L1354
 post_type_has_source_code()] which uses
 [https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html
 /wp-content/themes/pub/wporg-developer/inc/template-tags.php#L1343
 get_post_types_with_source_code()].''

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/5942#comment:7>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list