WordPress Mobile Edition
WP3.0 MS mode + Network activate fix proposal (2 posts)

  1. RavanH
    Posted 6 years ago #

    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') )

    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 !


  2. RavanH
    Posted 6 years ago #

    I created a WPMU / WPMS compatible fork with the latest Carrington theme on http://wordpress.org/extend/plugins/wpms-mobile-edition/

    No offence meant :)

    It will be maintained only until the main version gets compatible with WP3.0 in MS mode and Network Activate.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Mobile Edition
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic