rights.config

Allows to add custom items to access rights setup screen.

Shop-Script

Input (passed by reference)

$config waRightConfig Instance of access rights management class.
… your plugin code …

Output

Shop-Script

Plugin code example

PHP

public function rightsConfig(waRightConfig $config)
{
    //custom settings header
    $config->addItem('myplugin_custom_header', _wp('My custom settings header'), 'header');

    //single checkbox setting
    $config->addItem('myplugin_custom_checkbox_setting', _wp('Can do something'));

    //multi-checkbox setting
    $config->addItem('myplugin_custom_checkbox_group_setting', _wp('Can do the following:'), 'list', array(
        'items' => array(
            'id1' => 'option 1',
            'id2' => 'option 2',
        ),
    ));

    //complex setting allowing user to set up different access levels to several similar items (assets)
    $config->addItem('myplugin_custom_list_setting', _wp('Can do anything of the following:'), 'selectlist', array(
        'items' => array(
            'value1' => _wp('asset 1'),
            'value2' => _wp('asset 2'),
            'value3' => _wp('asset 3'),
        ),
        'options' => array(
            '0' => _wp('access level'),
            '1' => _wp('another access level'),
            '2' => _wp('one more access level'),
        ),
    ));
}