XPressME Integration Kit

Trac

Changeset 179


Ignore:
Timestamp:
Apr 17, 2009, 10:51:31 PM (15 years ago)
Author:
toemon
Message:

#106 有効になっているプラグインはそのままで、XPressMEプラグインを有効にする処理を実装
誤ってXPressMEプラグインを無効にした場合、ページ読み込み時に有効化を行いリロードさせるようにした。

The activation of the XPressME plugin was executed.
Because the XPressME plugin was invalid.
Please do the rereading seeing on the page.
の表示を行い再読み込みを促すようにした。

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/onupdate.php

    r174 r179  
    4848 
    4949        /* activate the xpressme plugin */ 
    50 /* When updating it, it doesn't execute it because other plug-ins are invalidly set.  
    51         $plugin_current = "xpressme/xpressme.php"; 
    52         update_option('active_plugins', array($plugin_current)); 
    53         include_once(dirname(__FILE__) . '/../wp-content/plugins/'.$plugin_current); 
    54         do_action('activate_'.$plugin_current); 
    55         $msgs[] = 'The xpressme plug-in was activated.'; 
    56 */       
     50        require_once dirname( __FILE__ ).'/xpress_active_plugin.php'; 
     51        if (xpress_pulugin_activation('xpressme/xpressme.php')){ 
     52                $msgs[] = 'The xpressme plug-in was activated.'; 
     53        } 
    5754         
    5855//      update_option("blog_charset", wp_blog_charset()); 
  • trunk/wp-config.php

    r173 r179  
    8585        require_once(ABSPATH.'wp-settings.php'); 
    8686        wp(); 
     87         
     88        if (!function_exists('is_wordpress_style')){    // When the XPressME plug-in is invalid 
     89                require_once dirname( __FILE__ ).'/include/xpress_active_plugin.php' ; 
     90                xpress_pulugin_activation('xpressme/xpressme.php'); 
     91                // reloaded  
     92                header('Location: ' . $xoops_config->module_url . '/'); 
     93                 
     94                $err_str = "The activation of the XPressME plugin was executed.<br />\n"; 
     95                $err_str .= "Because the XPressME plugin was invalid.<br />\n"; 
     96                $err_str .= "Please do the rereading seeing on the page.\n";                     
     97                die($err_str); 
     98        } 
     99 
    87100        if (is_wordpress_style()) { 
    88101                require_once( ABSPATH . WPINC . '/template-loader.php' ); 
Note: See TracChangeset for help on using the changeset viewer.