Soft Reject, need help: Shortcodes still need moving to a plugin although is used in the context of using Visual Composer plugin?

I got another “Soft Reject” fo using add_shortcode() function for a WordPress theme:

Shortcodes still need moving to a plugin:

But the add_shortcode() warning occur via Theme Check in the context of using Visual Composer plugin. We use add_shortcode() function to create custom Visual Composer content modules that are part of the theme design.

We built this theme design using Visual Composer and his vc_map() function. We know that shortcodes are plugin-territory functionality but we can not move the design of our theme in a plugin.

Visual Composer vc_map() function: And here are our theme modules:

f you have a good method to achieve this, please help me.

Thank you

Well to be honest you just should move it into a plugin. It’s actually really simple.

add_action( 'plugins_loaded', 'your_prefix_function' );
function your_prefix_function(){
     if( defined( 'WPB_VC_VERSION' ) && version_compare( WPB_VC_VERSION, '4.9.2', '>=' ) ){
		add_action( 'init', 'your_prefix_add_params', 999 );
		add_action( 'init', 'your_prefix_add_components', 999 );


This is a really simple thing I striped from my way of doing it, it’s a more complex OOP approach that I came up, also you can specify the ‘category’ key which will be your Jumbo Modules in a group.

Hope it helps you.

LE: this code goes into your plugins main file.
LE2: your_prefix_add_params will have the vc_map functions and your_prefix_add_components will have your vc_add_shortcode_param functions.

1 Like

Thanks for you help. Really much appreciated.
I also sent you a message for a little more help, please.

Brilliant! Thank you very much! Works like a charm.
I hope I;ll be approved now.

Have a nice day!

You’re welcome. Good luck :slight_smile: