wordpress-tools
  
  
  
  
  
  
  
    
  
    Tools
  
  
  
  
  
  
  
  
  
  
  
  
    
  
    Open Source
  
  
  
  
    
  
    PHP
  
  
  
  
    
  
    WordPress
  
  
  
  
  
  
    Bright Oak WordPress Tools
This is a tool for doing things in WordPress that are often verbose and should be easier.
Installation
You can install the package via composer:
composer require brightoak/wordpress-tools
Usage
Custom Post Types:
Simple example:
add_action('init', function(){
    CustomPostType::init('example')->setSupports('title', 'editor')->register();
});
Elaborate example from https://codex.wordpress.org/Function_Reference/register_post_type
add_action('init', function(){
    CustomPostType::init('book')
    ->setOptions('description' => 'Description', 'has_archive' => true])
    ->setSupports('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments')
    ->register();
});
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email rory@brightoak.com instead of using the issue tracker.
Credits
- Rory McDaniel
 - All Contributors
 
License
The MIT License (MIT). Please see License File for more information.
PHP Package Boilerplate
This package was generated using the PHP Package Boilerplate.