WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WordPress Mobile Edition] WP3.0 MS mode Network activate fix proposal

[Plugin: WordPress Mobile Edition] WP3.0 MS mode Network activate fix proposal

  • Hi Crowd,

    This plugin is so remarkably easy and useful, it should be already in the WP core… but until then, I would like to propose a small alteration to make it suitable for WP3.0 in Multi Site mode with WPME activated Network wide.

    You see, WPME uses register_activation_hook to load the default options into the DB. Downside of this is that it will only do this for the site from where the activation took place. In WP3.0 in MS mode (and one Network wide activation of WPME) this results in all the other sites having no default settings for WPME.

    A way around that would be to call to cfmobi_install() from within cfmobi_init() by inserting on line 122 :

    if ( !get_option('cfmobi_mobile_browsers') || !get_option('cfmobi_touch_browsers') )
    		cfmobi_install();

    After that, the whole part from line 36 to 43 :

    if (is_file(trailingslashit(ABSPATH.PLUGINDIR).'wp-mobile.php')) {
    	define('CFMOBI_FILE', trailingslashit(ABSPATH.PLUGINDIR).'wp-mobile.php');
    }
    else if (is_file(trailingslashit(ABSPATH.PLUGINDIR).'wordpress-mobile-edition/wp-mobile.php')) {
    	define('CFMOBI_FILE', trailingslashit(ABSPATH.PLUGINDIR).'wordpress-mobile-edition/wp-mobile.php');
    }
    
    register_activation_hook(CFMOBI_FILE, 'cfmobi_install');

    could be removed…

    Hope this ( or a similar solution ) will be incorporated into the next release 🙂

    Thanks !

    http://wordpress.org/extend/plugins/wordpress-mobile-edition/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WordPress Mobile Edition] WP3.0 MS mode Network activate fix proposal’ is closed to new replies.