rcp_access_levels

Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.

If you need assistance with this, please reach out to our list of consultants for further assistance:
https://codeable.io/developers/restrict-content-pro/

Filters the available access levels.

Parameters:

  • $levels (array) - Array of numerical access levels. The key and value should both be the same number.

Example:

This increases the available access levels to 20.

function ag_rcp_access_levels( $levels ) {
	for ( $i = 11; $i <= 20; $i++ ) {
		$levels[ $i ] = $i;
	}

	return $levels;
}
add_filter( 'rcp_access_levels', 'ag_rcp_access_levels' );
Powered by Zendesk