You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 2, 2022. It is now read-only.
Is your enhancement related to a problem? Please describe.
Yes. Basically, right now, if you go to /includes/core.php, we use a helper function to make calling hooks easier. i.e.
The point here, it seems, is to allow an easy reference function for namespace-scoped functions. However, in IDE's like PhpStorm, you cannot click-jump to its declaration like you would a normal function.
Describe the solution you'd like
Moving to a class-based setup would allow for namespace usability with a similar signature, but keep the indexing capabilities of modern IDE's intact:
class Setup {
publicfunction__contstruct() {
add_action( 'after_setup_theme', [ $this, 'example_function_name'] );
}
publicstaticfunctionexample_function_name() {
// do something
}
}
Then, it's a minor change do the initial function call:
newTenUpScaffold\Core\Setup();
Additional context
Jumping around the codebase via click-jumping is super efficient, and the disconnect between the main entry-point of the theme code and other areas that utilize this pattern is a bit disjointed.
The text was updated successfully, but these errors were encountered:
Is your enhancement related to a problem? Please describe.
Yes. Basically, right now, if you go to
/includes/core.php
, we use a helper function to make calling hooks easier. i.e.The point here, it seems, is to allow an easy reference function for namespace-scoped functions. However, in IDE's like PhpStorm, you cannot click-jump to its declaration like you would a normal function.
Describe the solution you'd like
Moving to a class-based setup would allow for namespace usability with a similar signature, but keep the indexing capabilities of modern IDE's intact:
Then, it's a minor change do the initial function call:
Additional context
Jumping around the codebase via click-jumping is super efficient, and the disconnect between the main entry-point of the theme code and other areas that utilize this pattern is a bit disjointed.
The text was updated successfully, but these errors were encountered: