su_current_user_can_insert

The shortcodes-ultimate su current user can insert function.

Published Date - February 15, 2021

Description

Conditional check if current user can use the plugin.

su_current_user_can_insert();

Usage

The following example is for adding a hook callback.

if ( !function_exists( 'su_current_user_can_insert' ) ) {
    require_once ABSPATH . PLUGINDIR . 'shortcodes-ultimateshortcodes-ultimate/includes/functions-helpers.php';
}



// NOTICE! Understand what this does before running.
$result = su_current_user_can_insert();
            

Defined

The function is defined in the following location(s).

shortcodes-ultimate/includes/functions-helpers.php

function su_current_user_can_insert() {

	$required_capability = (string) get_option(
		'su_option_generator_access',
		'manage_options'
	);

	return current_user_can( $required_capability );

}