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

Complete rewrite of the plugin #31

Open
smileBeda opened this issue Aug 1, 2023 · 1 comment
Open

Complete rewrite of the plugin #31

smileBeda opened this issue Aug 1, 2023 · 1 comment
Milestone

Comments

@smileBeda
Copy link
Member

smileBeda commented Aug 1, 2023

This is just a "catch all" ticket to jot down things that should be added, removed, or changed in the new version.

As folder structure, we are breaking away from the public/admin structure which became pointless (and never really had a point) and instead approach it with the only somewhat globally accepted "standard" in PHP.
This will also allow more freedom in the actual application structure itself.

Full autoloader should be implemented, thus, all classes should likely reside inside one single folder, and access controls should be done on a more granular base and not like in the old approach on a more "global" level

Namespaces should be used

See full list of "no go" here https://github.com/szepeviktor/starter-plugin/blob/wp-63/README.md#what-to-avoid

Potentially it should include more examples for newbies, as it is always easier to remove than to add: so we should add a menu page, shortcode (already there in current version), perhaps some more examples on filters and actions, localised AJAX script, and so on.

Also, a very important point is to NOT abstract the add_action and add_filter (which is currently the case in the plugin boilerplate)
This has not only confused people but also is based on pure "personal opinion" by the original author, and makes no real sense, as it is just adding clutter code and does not really improve anything: filters and actions are not going to change and do not require plugin-side abstraction.

While the concept is a good idea, it is futile in this case and teaches the user nothing useful.
The abstraction can be better brought to example in a admin-side page or menu with settings, or custom /user field implementation

Thinking of which, the plugin should show how to add custom fields of all kinds, custom field tables, taxonomy, post type, settings and options (best exampled on the admin page) as well.

The plugin should and will keep full WPCS compliance, overruling any other PCR rule

@smileBeda smileBeda added this to the 5.0.0 milestone Aug 1, 2023
@smileBeda
Copy link
Member Author

In progress on develop branch as alpha version.

Current known issues:

  • phpUnit workflow does not currently trigger
  • release workflow wont work
    (both due to folder restructuring)

Should work:

  • installable plugin
  • autoloader classmap
  • cpt, ct, custom field registration
  • installation checks and error messages

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

1 participant