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

Add is_active to link spec #26255

Merged
merged 1 commit into from May 18, 2023
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

In the process of adding weights to the links it
occurred to me that it might be cleaner in some cases for hooks to fiddle with 'is_active' rather than setting & unsetting.

An example would be that instead of excluding
a link that our core code thinks should not be available we could include it with is_active = FALSE &
a hook could enable it.

I figured if it I add it now then while adding weights I could add it in too

In the process of adding weights to the links it
occurred to me that it might be cleaner in some cases for
hooks to fiddle with 'is_active' rather than setting &
unsetting.

An example would be that instead of excluding
a link that our core code thinks should not be available
we could include it with is_active = FALSE &
a hook could enable it.

I figured if it I add it now then while adding weights I could
bank it in too
@civibot
Copy link

civibot bot commented May 17, 2023

(Standard links)

@civibot civibot bot added the master label May 17, 2023
@eileenmcnaughton
Copy link
Contributor Author

@colemanw thoughts? It's not a big thing - but I figured it adding weight it made sense to add this too. Might simplify some code around the adding & removing link elements

@colemanw colemanw merged commit 2427998 into civicrm:master May 18, 2023
3 checks passed
@colemanw colemanw deleted the weight_links branch May 18, 2023 02:15
@colemanw
Copy link
Member

Seems like a cheap and useful thing to do, and it's an existing pattern 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants