Restrict “Custom Code Snippets” extension per user role

In case that you wish to restrict the usage of the Custom Code Snippets extension per user role, this handy PHP filter should be able to help.

add_filter(
	'blocksy:capabilities:wp_capability',
	function ($capability, $scope, $scope_details) {
		if ($scope === 'ext_code_snippets_fields') {
			return 'manage_options';
		}

		return $capability;
	},
	10,
	3
);
Not the solution you are looking for?

Please check other articles or open a support ticket.