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

Non-destructive localize #1

Open
Camwyn opened this issue Aug 28, 2023 · 1 comment
Open

Non-destructive localize #1

Camwyn opened this issue Aug 28, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Camwyn
Copy link

Camwyn commented Aug 28, 2023

https://github.com/stellarwp/assets/blob/8b9776d2eddef9b84d699859f613c44ca4ec0148/src/Assets/Asset.php#L391C1-L391C1

Can we either use a filter or a merge function here so we can add to an object without having to completely overwrite it?

@Camwyn Camwyn added the enhancement New feature or request label Aug 28, 2023
@Camwyn
Copy link
Author

Camwyn commented Aug 28, 2023

To be clear: the use-case I am thinking of is if we have two plugins(/themes/etc) say TEC and ECP. The parent plugin adds a new object to the localize and ECP wants to add new data (or overrides some old data) without having to recreate the entire object or do any juggling itself.

A slightly more concrete example might be a localized ticket object from ET that has a provider added via ET+ 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant