• Resolved bfsworks

    (@bfsworks)


    Hello,

    Would it be fairly easy to provide an option to disable this plugin’s functions if a user is logged into WordPress? We have run into a couple of back-end plugin compatibility issues and they can easily be resolved if we could disable for logged in users only.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author launchinteractive

    (@launchinteractive)

    MMR is designed to only work on the frontend so it shouldn’t affect your backend plugins. What are the plugins that your having trouble with?

    Thread Starter bfsworks

    (@bfsworks)

    Our users use a Visual Content Editor plugin called MotoPress. Also, when previewing a page or post while logged in show MMR in action. We do not cache any pages for logged in users and we have verified the pages we are looking at are not cached.

    Maybe instead of front-end/back-end checking if option could exist where (if user/admin logged in then disable rewrite). Sometimes plugins operate on pages as they are meant to be rendered.

    	public function disable_mmr() {
    	    // DISABLE MMR FOR LOGGED IN ADMIN USERS
    	    if ( current_user_can( 'administrator' ) ) {
    	        define( 'DONOTMMR', true );
    	    }
    	}
    
    Plugin Author launchinteractive

    (@launchinteractive)

    Ahh, I see your point. Are you able to try the following code in merge-minify-refresh.php:

    if(is_admin() || current_user_can( 'administrator' )) {

    on line 86

    I wonder if there is a way to detect if motopress is in edit mode. If so we could just disable MMR in that case.

    Plugin Author launchinteractive

    (@launchinteractive)

    Maybe we could check for the existence of the motopress-ce-auto-open=true parameter?

    Thread Starter bfsworks

    (@bfsworks)

    I tried both suggestions by adding to the if on line 86 without resolve. It’s strange because even just viewing a page while logged in we see the mmr generated files, however, none of them have the “min” in the filename.

    When browsing the same page while not logged in we see the “min” in the filename. It’s as though the plugin disables some of the functions (if admin is detected) of mmr not but all of them.

    Hello @launchinteractive and @bfsworks
    We’d rather recommend to check for the following parameter ‘motopress-ce=1’. It is sent when user launches visual builder to edit the post type.

    Plugin Author launchinteractive

    (@launchinteractive)

    Hi @bfsworks & @motopress,

    We’ve just released version 1.8 of MMR that should now fix this issue. We discovered that MotoPress was enqueuing php files and we now check for this. No need to use the motopress-ce parameter.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disable when users logged in’ is closed to new replies.