https://github.com/schlessera/broken-settings-v2
Example Code: Settings Page - Broken Implementation v2
https://github.com/schlessera/broken-settings-v2
hacktoberfest
Last synced: about 1 year ago
JSON representation
Example Code: Settings Page - Broken Implementation v2
- Host: GitHub
- URL: https://github.com/schlessera/broken-settings-v2
- Owner: schlessera
- Created: 2016-08-30T14:04:26.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-30T14:33:17.000Z (almost 10 years ago)
- Last Synced: 2025-02-22T00:41:21.414Z (over 1 year ago)
- Topics: hacktoberfest
- Language: PHP
- Homepage: https://www.alainschlesser.com/config-files-for-reusable-code/
- Size: 87.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example Code: Settings Page - Broken Implementation v2
*__This example code is part of the article: [Using A Config To Write Reusable Code](https://www.alainschlesser.com/config-files-for-reusable-code/)__*
This is an improved "OOP" implementation of a settings page using the WordPress Settings API. It uses separate views to extract (some of) the business logic out of the core `SettingsPage` class.
To test this plugin yourself, clone the repository into a `wp-content/plugins` folder of a WordPress installation, and run the command `composer install` from within the plugin's folder to generate the autoloader. You should then be able to activate the plugin and get access to the generated settings page via `Settings` → `as-settings-broken-v2`.

Clicking on this menu entry will bring you to the generated Settings page, which allows you to save two useless settings.
