Skip to main content

vc_show_user_templates

Filters whether the "My Templates" category is shown in the templates panel.

Parameters

ParameterTypeDescription
$showboolWhether to show user templates. Default true.

Usage

<?php
add_filter( 'vc_show_user_templates', 'my_hide_user_templates' );

function my_hide_user_templates( $show ) {
// Hide the "My Templates" category for non-admin users.
if ( ! current_user_can( 'manage_options' ) ) {
return false;
}

return $show;
}

Source

File: include/classes/editors/popups/class-vc-templates-panel-editor.php