Changeset 31881


Ignore:
Timestamp:
07/24/17 13:02:43 (2 years ago)
Author:
plg
Message:

automatic disable on theme SmartPocket

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/MenuRandomPhoto/main.inc.php

    r31880 r31881  
    1919add_event_handler('blockmanager_register_blocks', 'MRP_register_menubar_blocks', EVENT_HANDLER_PRIORITY_NEUTRAL-1); 
    2020 
    21 if (defined('IN_ADMIN')) 
    22 { 
    23         add_event_handler('get_admin_plugin_menu_links', 'MRP_admin_menu'); 
    24 } 
    25 else 
    26 { 
    27         add_event_handler('blockmanager_apply', 'MRP_blockmanager_apply'); 
    28         add_event_handler('loc_end_page_header', 'MRP_end_page_header'); 
    29 } 
    30  
    3121function MRP_init() 
    3222{ 
    3323        global $conf, $user; 
    34          
     24 
     25    $conf['MRP'] = unserialize($conf['MRP']); 
     26 
     27    if (defined('IN_ADMIN')) 
     28    { 
     29            add_event_handler('get_admin_plugin_menu_links', 'MRP_admin_menu'); 
     30    } 
     31    else 
     32    { 
     33            if ($user['theme'] != 'smartpocket') 
     34            { 
     35            add_event_handler('blockmanager_apply', 'MRP_blockmanager_apply'); 
     36            add_event_handler('loc_end_page_header', 'MRP_end_page_header'); 
     37        } 
     38    } 
     39 
    3540        load_language('plugin.lang', MRP_PATH); 
    36          
    37         $conf['MRP'] = unserialize($conf['MRP']); 
    3841} 
    3942 
Note: See TracChangeset for help on using the changeset viewer.