Skip to content

✨ No profiles template if no plugin#277

Open
aremery wants to merge 2 commits into
developfrom
feature/hide-profiles-template-if-no-plugin
Open

✨ No profiles template if no plugin#277
aremery wants to merge 2 commits into
developfrom
feature/hide-profiles-template-if-no-plugin

Conversation

@aremery
Copy link
Copy Markdown
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
Copy Markdown
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.

🐼

Comment thread inc/profiles.php Outdated
Comment thread inc/profiles.php
* @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
Copy Markdown
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