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

✨ No profiles template if no plugin #277

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

aremery
Copy link
Collaborator

@aremery aremery commented Sep 17, 2021

Fixes #266

Changes proposed in this pull request

This pull request unregisteres the profiles template if BU Profiles is not activated.

Copy link
Contributor

@hirozed hirozed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, my dude.

🐼

inc/profiles.php Outdated Show resolved Hide resolved
* @param array $page_templates list of registered page templates.
* @return array $page_templates list of registered page templates.
*/
function remove_profile_template( $page_templates ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it is legal to define a function inside an IF statement, I'd recommend moving the function declaration outside of the IF statement for clarity and consistency.

@ashleykolodziej ashleykolodziej self-requested a review September 24, 2021 21:29
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

Successfully merging this pull request may close these issues.

Hide Profiles.php Unless BU Profiles Plugin is Activated
5 participants