Skip to content

Add namespace. WPCS Cleanup Part 1.#77

Merged
mtoensing merged 6 commits intomtoensing:masterfrom
DLXPlugins:fix/phpcs-namespaces
Dec 12, 2025
Merged

Add namespace. WPCS Cleanup Part 1.#77
mtoensing merged 6 commits intomtoensing:masterfrom
DLXPlugins:fix/phpcs-namespaces

Conversation

@ronalfy
Copy link
Copy Markdown

@ronalfy ronalfy commented Dec 12, 2025

Resolves #76

This PR adds namespacing to the plugin, and does some initial WPCS cleanup (Part 1). This is Part 1 as I left most of the core code of the plugin intact and just did some whitespace formatting using WP Coding Standards. There is still much left, but for the sake of this PR and your sanity, I've left that for a Part 2, which will require more intense testing.

  1. Namespace for the plugin as proposed: MToensing\SimpleTOC
  2. Package for the plugin: simpletoc
  3. Namespace and do WPCS cleanup for file: simpletoc-admin-settings.php
  4. Moving ID class to file: simpletoc-class-headline-ids.php
  5. Plugin file plugin.php has been namespaced, with some initial WPCS formatting.
  6. File phpcs.xml.dist added to enforce coding standards in IDE.

Since the plugin is namespaced, you can now worry less about possible naming collisions with other plugins. The structure has been kept simple as to not re-architect the plugin or mess with build steps.

@mtoensing mtoensing merged commit 26d44db into mtoensing:master Dec 12, 2025
2 checks passed
@mtoensing
Copy link
Copy Markdown
Owner

Thank you very much!

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.

Request to Add Namespace and/or Function prefixing

3 participants