/** no direct access **/ defined('_MECEXEC_') or die('Restricted access'); /** * Webnus MEC VC addon class * @author Webnus */ class MEC_addon_VC extends MEC_base { /** * Constructor method * @author Webnus */ public function __construct() { // MEC Factory class $this->factory = $this->getFactory(); // MEC Main class $this->main = $this->getMain(); } /** * Initialize the VC addon * @author Webnus */ public function init() { // Visual Composer is not installed if(!function_exists('vc_map')) return false; $this->factory->action('vc_before_init', array($this, 'map')); } /** * Register the addon in VC * @author Webnus */ public function map() { $calendar_posts = get_posts(array('post_type'=>'mec_calendars', 'posts_per_page'=>'-1')); $calendars = array(); foreach($calendar_posts as $calendar_post) $calendars[$calendar_post->post_title] = $calendar_post->ID; vc_map(array( 'name'=>esc_html__('Modern Events Calendar', 'mec'), 'base'=>'MEC', 'class'=>'', 'controls'=>'full', 'icon'=>$this->main->asset('img/ico-mec-vc.png'), 'category'=>esc_html__('Content', 'mec'), 'params'=>array( array( 'type'=>'dropdown', 'holder'=>'div', 'class'=>'', 'heading'=>esc_html__('Shortcode', 'mec'), 'param_name'=>'id', 'value'=>$calendars, 'description'=>esc_html__('Select from predefined shortcodes', 'mec') ) ) )); } }
Fatal error: Uncaught Error: Class 'MEC_addon_VC' not found in /home/dh_z8civ7/pastureexperience.com/wp-content/plugins/modern-events-calendar/app/libraries/factory.php:362 Stack trace: #0 /home/dh_z8civ7/pastureexperience.com/wp-content/plugins/modern-events-calendar/mec-init.php(80): MEC_factory->load_addons() #1 /home/dh_z8civ7/pastureexperience.com/wp-content/plugins/modern-events-calendar/mec.php(36): MEC->init() #2 /home/dh_z8civ7/pastureexperience.com/wp-settings.php(305): include_once('/home/dh_z8civ7...') #3 /home/dh_z8civ7/pastureexperience.com/wp-config.php(103): require_once('/home/dh_z8civ7...') #4 /home/dh_z8civ7/pastureexperience.com/wp-load.php(37): require_once('/home/dh_z8civ7...') #5 /home/dh_z8civ7/pastureexperience.com/wp-blog-header.php(13): require_once('/home/dh_z8civ7...') #6 /home/dh_z8civ7/pastureexperience.com/index.php(18): require('/home/dh_z8civ7...') #7 {main} thrown in /home/dh_z8civ7/pastureexperience.com/wp-content/plugins/modern-events-calendar/app/libraries/factory.php on line 362