Skip to content

Developer API

Nashwan Doaqan edited this page Jul 21, 2019 · 1 revision

bbResolutions comes with various API and different hooks to provide a level of flexibility and sustainability. You can use the following API to extend the plugin's functionality and fulfill your needs.

Resolutions Management

Register New Resolutions

You can add new resolutions by using bbResolutions\Manager::register() method as the following example:

add_action('plugins_loaded', function() {
        bbResolutions\Manager::register('urgent', array(
            'label'     =>  'Urgent',
            'sticker'   => '[Urgent]',
            'value'     => '11',
        ));
});

Unregister Resolutions

You can also un-register resolutions by using bbResolutions\Manager::unregister() method as the following example:

add_action('plugins_loaded', function() {
        bbResolutions\Manager::unregister('urgent');
});
Clone this wiki locally