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

Would you be open to a restructure of the plugin? #14

Open
elskwid opened this issue Mar 13, 2021 · 2 comments
Open

Would you be open to a restructure of the plugin? #14

elskwid opened this issue Mar 13, 2021 · 2 comments

Comments

@elskwid
Copy link
Contributor

elskwid commented Mar 13, 2021

Hello @rburgst,

Thanks for your continuing work on this plugin and merging in my changes from PR #10.

I am working on some changes to add returning translations for taxonomies in the same way we do for posts. While working on this functionality, it struck me that the plugin is getting pretty large. Would you be open to a PR that restructures a bit?

I'm thinking something like this:

  • Class-based with a namespace - wrap all of the functions in a namespaced class, which would shorten the function names considerably
  • Main class as a singleton - use the singleton pattern to initialize the plugin and maintain a single instance
  • Multiple files - break out the functionality related to new types, fields, menus, posts, and taxonomies (and other) into new files - that would help us find and manage the additions and changes a little easier. In other words, organize the plugin code around the core objects being used/impacted.
  • Remove commented code - given that we are using Git we can safely remove commented code
  • Add a little more documentation to functions - I don't have all the information for what the functions do but I can add documentation for those that I understand 😁

Overall, I am getting a strong pull to re organize things and figured I would ask before taking the time to do it.

Thanks again!
Don

@rburgst
Copy link
Owner

rburgst commented Mar 14, 2021

As long as it doesn't break anything I am totally open for making the code better.
As you observed this was initially cobbled together and then grew from there.
My main focus was to solve my problem and I simply didn't have the time to structure the code better.

@rburgst
Copy link
Owner

rburgst commented Jan 25, 2022

@elskwid I am guessing you didnt have time for that, can I close this?

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

2 participants