Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-Project Tracking: function_exists() Checks #185

Open
justintadlock opened this issue Jun 23, 2021 · 0 comments
Open

Cross-Project Tracking: function_exists() Checks #185

justintadlock opened this issue Jun 23, 2021 · 0 comments
Milestone

Comments

@justintadlock
Copy link
Member

Because we intend to allow HC and its sub-projects to be bundled with multiple projects (see: #183), we need to account for the repos with functions (not just classes). The easiest way to do this is to wrap each function with a function_exists() check like so:

if ( ! function_exists( __NAMESPACE__ . '\\func_name' ) ) {
// Function
}

Long term, we might consider phasing out functions with a static helper class instead. That way, the class autoloader bypasses the issue (file autoloading doesn't).

@justintadlock justintadlock added this to the 6.0.0 milestone Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant