Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 870 Bytes

config.md

File metadata and controls

44 lines (36 loc) · 870 Bytes

Config

The config file accepts dot notatation, a standard array, or a combination of these.

Dot notation;

return [
    'wp-admin.$role|$username.common.adminbar.wp',
    'wp-admin.$role|$username.common.adminbar.new',
    'wp-admin.$role|$username.common.adminbar.edit',
    'wp-admin.$role|$username.common.adminbar.view',
];

Standard array;

return [
    'wp-admin' => [
        '$role|$username' => [
            'common' => [
                'adminbar' => [
                    'wp', 'new', 'edit', 'view'
                ],
            ],
        ],
    ],
];

Combination;

Using these approaches interchangeably can help bring readability and structure to the config file.

return [
    'wp-admin.$role|$username' => [
        'common.adminbar', => [
            'wp', 'new', 'edit', 'view'
        ],
    ],
];