• Resolved Vladislav Malienkov

    (@vlad00777)


    Hi. That is a great idea to have a plugin like that.

    I’ve checked that plugin on my Multisite website, and it seems to have a bug.

    The cron job (get_data) updates the options on the main website but the Elementor.php file is loaded on each website. So the get_single_block_list method tries to find the asef_remote_block_list option in his DB table, not on the main website DB table. In that case the blacklist always be empty.

    The fix:

        public function get_single_block_list( string $option_name ): array {

            if ( is_multisite() ) {

                switch_to_blog( get_main_site_id() );

            }

            $raw = get_option( $option_name, '' );

            if ( is_multisite() ) {

                restore_current_blog();

            }

            return array_unique( array_filter( array_map( 'trim', explode( "\n", $raw ) ) ) );

        }

    Just always get the options from the main website is that is a multisite instance.

Viewing 1 replies (of 1 total)
  • Plugin Author Greyhound Studio

    (@madebygreyhound)

    This should be fixed in v2.3.0 – I’ve made it so you can set custom block/allow phrases per each site, so you can block words on the main site, but then allow them on others.

Viewing 1 replies (of 1 total)

The topic ‘Add support for Multisite’ is closed to new replies.