WpWodify\Settings
Settings Class
- Author: Cory Collier <corycollier@corycollier.com>
Synopsis
class Settings
{
- // methods
- public void __construct()
- public Settings add_section()
- public Settings add_field()
- public Settings register()
- protected string humanize()
- protected string machinify()
- protected string get_slug()
Coverage
Methods | 100% | 7 / 7 |
Lines | 100% | 28 / 28 |
Members
protected
- $name
—
string
Stores the name of the section. - $prefix
—
string
Stores the plugin specific prefix for names in the settings.
Methods
protected
- get_slug() — Gets the slug for the settings section.
- humanize() — Takes a machine string, and makes it more human friendly.
- machinify() — Takes a human string, and makes it more machine friendly.
public
- __construct() — Constructor.
- add_field() — Adds a field to the settings section.
- add_section() — Adds a section to the settings instance.
- register() — Register's a setting.
History
-
2016-01-09T13:06:33-05:00 (commit #af9535b)
Author: Cory Collier (corycollier@corycollier.com) / Commiter: Cory Collier (corycollier@corycollier.com)
PHPCS cleanup, Adding enqueue script hook implementations, Adding admin_settings page to the pages class, requiring new classes in the main plugin file, Stubbing out base Wordpress function definitions for unit testing, Adding fields class and associated unit test case, Adding settings class and associated unit test case.