Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tommcfarlin/WordPress-Widget-Boilerplate
[WordPress] The WordPress Widget Boilerplate is an organized, maintainable boilerplate for building widgets using WordPress best practices.
https://github.com/tommcfarlin/WordPress-Widget-Boilerplate
php widget-boilerplate wordpress wordpress-widget
Last synced: about 1 month ago
JSON representation
[WordPress] The WordPress Widget Boilerplate is an organized, maintainable boilerplate for building widgets using WordPress best practices.
- Host: GitHub
- URL: https://github.com/tommcfarlin/WordPress-Widget-Boilerplate
- Owner: tommcfarlin
- License: gpl-3.0
- Archived: true
- Created: 2011-07-08T17:08:51.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2019-03-20T17:14:34.000Z (almost 6 years ago)
- Last Synced: 2024-09-26T14:24:25.307Z (3 months ago)
- Topics: php, widget-boilerplate, wordpress, wordpress-widget
- Language: PHP
- Homepage: http://tommcfarlin.com/wordpress-widget-boilerplate/
- Size: 160 KB
- Stars: 1,015
- Watchers: 70
- Forks: 204
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# WordPress Widget Boilerplate
The WordPress Widget Boilerplate serves as a foundation off of which to build your WordPress widgets using modern tools such as [Composer](https://getcomposer.org/) and an object-oriented approach all of which is documented in [this series of posts](https://tommcfarlin.com/tag/wordpress-widgets-api/).
## Features
* The Widget Boilerplate is fully-based on the WordPress [Widget API](http://codex.wordpress.org/Widgets_API)
* Uses [PHPDoc](http://en.wikipedia.org/wiki/PHPDoc) conventions for easily following the code.
* Uses Composer to handle linting and code quality tools before committing it to a repository.
* Uses a strict file organization scheme to make sure the assets are easily maintainable.## Usage
The WordPress Widget Boilerplate is ready to activate as-is (and it includes a sample widget with a title, content, and checkbox).
1. Copy the `wordpress-widget-boilerplate` directory into your `wp-content/plugins` directory
2. Navigate to the "Plugins" dashboard page
3. Locate the menu item that reads "TODO"
4. Click on "Activate"The purpose of having a working widget is to give you an idea as to where certain things belong. Further, the idea is to fork the existing code and make it your own for your own project.
It's organized in such a way that lends itself to unit testing, a higher level of cohesion, a lower level of coupling. It also uses features of the object-oriented paradigm to provide better organization of code base and features of PHP such as namespaces and type hinting.
## Author Information
The WordPress Widget Boilerplate was originally started and is maintained by [Tom McFarlin](https://twitter.com/tommcfarlin/).
The project is open-source and receives contributions from awesome WordPress Developers throughout the world.