/** * fallback_shortcode_processor - create instance and call process_shortcode * NOTE: shortcode may not function perfectly dues to missing assets, but it's better than not having things work at all * * @access public * @param $attributes * @return mixed */ public static final function fallback_shortcode_processor($attributes) { if (EE_Maintenance_Mode::disable_frontend_for_maintenance()) { return null; } // what shortcode was actually parsed ? $shortcode_class = get_called_class(); // notify rest of system that fallback processor was triggered add_filter('FHEE__fallback_shortcode_processor__' . $shortcode_class, '__return_true'); // get instance of actual shortcode $shortcode_obj = self::instance($shortcode_class); // verify class if ($shortcode_obj instanceof EES_Shortcode) { global $wp; $shortcode_obj->run($wp); // set attributes and run the shortcode $shortcode_obj->_attributes = (array) $attributes; return $shortcode_obj->process_shortcode($shortcode_obj->_attributes); } else { return NULL; } }
/** * widgets_init * * @access private * @return void */ public function widgets_init() { if (EE_Maintenance_Mode::disable_frontend_for_maintenance()) { return; } //only init widgets on admin pages when not in complete maintenance, and //on frontend when not in any maintenance mode if (is_admin() && EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance || !EE_Maintenance_Mode::instance()->level()) { // grab list of installed widgets $widgets_to_register = glob(EE_WIDGETS . '*', GLOB_ONLYDIR); // filter list of modules to register $widgets_to_register = apply_filters('FHEE__EE_Config__register_widgets__widgets_to_register', $widgets_to_register); if (!empty($widgets_to_register)) { // cycle thru widget folders foreach ($widgets_to_register as $widget_path) { // add to list of installed widget modules EE_Config::register_ee_widget($widget_path); } } // filter list of installed modules EE_Registry::instance()->widgets = apply_filters('FHEE__EE_Config__register_widgets__installed_widgets', EE_Registry::instance()->widgets); } }