There is a wordpress
website with a WPBakery Visual Composer constructor module embedded in the theme. The problem is that on the updated engine some of the designer’s elements are worked out (because the mod itself is outdated). Here is the code to call the constructor in the theme's functions.php
:
if (!class_exists('WPBakeryVisualComposerAbstract')) { $dir = dirname(__FILE__) . '/wpbakery/'; $composer_settings = Array( 'APP_ROOT' => $dir . '/js_composer', 'WP_ROOT' => dirname( dirname( dirname( dirname($dir ) ) ) ). '/', 'APP_DIR' => basename( $dir ) . '/js_composer/', 'CONFIG' => $dir . '/js_composer/config/', 'ASSETS_DIR' => 'assets/', 'COMPOSER' => $dir . '/js_composer/composer/', 'COMPOSER_LIB' => $dir . '/js_composer/composer/lib/', 'SHORTCODES_LIB' => $dir . '/js_composer/composer/lib/shortcodes/', 'USER_DIR_NAME' => 'extendvc/vc_templates', /* Path relative to your current theme, where VC should look for new shortcode templates */ //for which content types Visual Composer should be enabled by default 'default_post_types' => Array('page','post','portfolio_page') ); require_once locate_template('/wpbakery/js_composer/js_composer.php'); $wpVC_setup->init($composer_settings); } // Initialising Shortcodes if (class_exists('WPBakeryVisualComposerAbstract')) { require_once locate_template('/extendvc/extend-vc.php'); }
If I comment on it and install the Visual Composer plugin, I get the following error:
`Fatal error: Cannot redeclare wpb_getImageBySize() (previously declared in /home/likemedi/public_html/wp-content/themes/subway/wpbakery/js_composer/composer/lib/helpers.php:15) in /home/likemedi/public_html/wp-content/plugins/js_composer/include/helpers/helpers.php on line 114`