2017 © Pedro Peláez
 

wordpress-plugin cmb2-widget

image

nsrosenqvist/cmb2-widget

  • Tuesday, June 19, 2018
  • by nsrosenqvist
  • Repository
  • 1 Watchers
  • 1 Stars
  • 9 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

CMB2 Widget

Lets you use CMB2 in widgets, (*1)

Extend the abstract widget class., (*2)

use NSRosenqvist\CMB2\Widgets\CMB2_Widget;

class MyWidget extends CMB2_Widget
{
    protected $fields = [
        // You can set ID both as the key and in the array
        'title' => [
            'name'             => __('Title', 'theme'),
            'type'             => 'text',
        ],
    ];

    function __construct($id_base, $name, $widget_options = [], $control_options = [])
    {
        parent::__construct(
            // Base ID of widget
            'my_widget'
            // Widget name will appear in UI
            'My Widget',
            // Widget description
            $widget_options,
            // Widget options
            $control_options
        );
    }
}

The Versions

19/06 2018

dev-master

9999999-dev https://github.com/nsrosenqvist/cmb2-widget

  Sources   Download

MIT

The Requires

  • php >=7.0.0
  • cmb2/cmb2 ^2.4.0

 

19/06 2018

1.0.1

1.0.1.0 https://github.com/nsrosenqvist/cmb2-widget

  Sources   Download

MIT

The Requires

  • php >=7.0.0
  • cmb2/cmb2 ^2.4.0

 

18/06 2018

1.0.0

1.0.0.0 https://github.com/nsrosenqvist/cmb2-widget

  Sources   Download

MIT

The Requires

  • php >=7.0.0
  • cmb2/cmb2 ^2.4.0