• Resolved Jason

    (@zushiba)


    Do you have any plans to support multisite networks? I’d like to be able to enable an alert across an entire network in one location instead of visiting every site on the network and configuring the same message.

Viewing 1 replies (of 1 total)
  • Plugin Author wpexplorer

    (@wpexplorer)

    Hi Jason,

    This is AJ the plugin author. I can look into adding some sort of checkbox to the Network Admin settings page so that the plugin will only display the Customizer settings for the main blog and use those settings for all subsites.

    For the meantime there are 3 ways you can hook into the plugin to alter the message for your needs.

    1. You could use the plugin hooks to filter the message for all sites. Example:

    add_filter( 'easy_notification_bar_message', function( $message ) {
    	$message = 'Your Custom Mesage';
    	return $message;
    } );

    2. You could hook into the default settings to override the default message unless one is set for that specific site. Example:

    add_filter( 'easy_notification_bar_default_settings', function( $settings ) {
    	$settings['message'] = 'Your Default Mesage';
    	return $settings;
    } );

    3. It would also be possible to hook into the settings to use the settings defined on the main site for all sub-sites like this:

    add_filter( 'easy_notification_bar_settings', function( $settings ) {
    	if ( is_multisite() && ! is_main_site() ) {
    		switch_to_blog( 1 );
    		return get_theme_mod( 'easy_nb' );
    		restore_current_blog();
    	}
    	return $settings;
    } );

    The code should be added into a little custom plugin and network activated or added to your child theme if you are using the same child theme across the whole multisite.

    – AJ

Viewing 1 replies (of 1 total)
  • The topic ‘Multisite network support?’ is closed to new replies.