Example #1
0
// currency converter
if (ya_options()->getCpanelValue('menu_type') == 'mega') {
    function stop_removing_core_classes()
    {
        remove_filter('nav_menu_css_class', 'ya_nav_menu_css_class', 10, 2);
        remove_filter('nav_menu_item_id', '__return_null');
    }
    add_action('init', 'stop_removing_core_classes');
    require_once locate_template('/lib/ubermenu/ubermenu.php');
}
require_once locate_template('/lib/less.php');
// Custom functions
//active revolution slider
$revslider = get_template_directory() . '/lib/revslider/revslider.php';
if (!ya_options()->getCpanelValue('revslide_active')) {
    include $revslider;
    // Activate the plugin if necessary
    if (get_option('ya_revslider_activated', '0') == '0') {
        if (!class_exists('RevSliderAdmin')) {
            $revslider_admin_script = get_template_directory() . '/lib/revslider/revslider_admin.php';
            include $revslider_admin_script;
        }
        // Run activation script
        $revslider_admin = new RevSliderAdmin($revslider);
        $revslider_admin->onActivate();
        // Save a flag that it is activated, so this won't run again
        update_option('ya_revslider_activated', '1');
    }
}
/* Disable WordPress Admin Bar for all users but admins. */
show_admin_bar(false);
 public function setup()
 {
     RevSliderAdmin::onActivate();
 }
Example #3
0
 public function install()
 {
     if (parent::install() && $this->registerHook('displayHeader') && $this->registerHook('displayBackOfficeHeader') && $this->registerHook('displayRevSlider') && $this->moduleControllerRegistration() && $this->uploadControllerRegistration() && $this->registerHook('actionShopDataDuplication')) {
         $gethooks = array();
         require_once ABSPATH . "/hook/hook.php";
         foreach ($gethooks as $hook => $hooks) {
             if ($hook != '') {
                 $this->registerHook($hook);
             }
         }
         require_once ABSPATH . "/revslider_admin.php";
         $res = RevSliderAdmin::onActivate();
         $admin = new RevSliderAdmin(ABSPATH, false);
         RevSliderAdmin::sds_caption_css_init($res);
         $this->installQuickAccess();
         return (bool) $res;
     }
     return false;
 }