WordPress.org

Forums

WP Multi Network
Default Clone Network Options? (2 posts)

  1. Curtiss Grymala
    Member
    Posted 4 years ago #

    I am doing some more playing around with the WP Multi Network plug-in, and I've found the sweet spot of options that I need to clone from our original network to any new networks. I'm curious if there is an easy way (without hacking the core of the plug-in) to set those to be turned on by default when I create a new network, or if I have to individually check each of those options when I create a network. Thanks in advance for any advice.

  2. Curtiss Grymala
    Member
    Posted 4 years ago #

    Not necessarily ideal, but I think I figured it out.

    The key is to hook into the admin_menu action, and add to the $options_to_copy array. An example looks like:

    <?php
    add_action( 'admin_menu', 'adjust_wpmn_options_to_copy' );
    
    function adjust_wpmn_options_to_copy() {
    	global $options_to_copy;
    
    	if( is_array( $options_to_copy ) ) {
    		$options_to_copy['active_sitewide_plugins'] = __( 'Plugins that are network activated' );
    	}
    }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Multi Network
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic