Plugin Directory

Changeset 1201365


Ignore:
Timestamp:
07/18/2015 01:53:11 AM (11 years ago)
Author:
scriptrunner
Message:

v1.6.0 - Use admin_init hook for wp_admin_no_show_admin_redirect() to prevent temporary view of admin page on redirect. Added check for DOING_AJAX when checking is_admin() on redirect to prevent conflicts with other plugins.

Location:
wp-admin-no-show/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-admin-no-show/trunk/readme.txt

    r1195229 r1201365  
    55Requires at least: 3.1
    66Tested up to: 4.2.2
    7 Stable tag: 1.5.1
     7Stable tag: 1.6.0
    88License: MIT License
    99License URI: http://www.opensource.org/licenses/mit-license.php
     
    3939
    4040== Changelog ==
     41
     42= 1.6.0 =
     43* Use admin_init hook for wp_admin_no_show_admin_redirect() to prevent temporary view of admin page on redirect.
     44* Added check for 'DOING_AJAX' when checking is_admin() on redirect to prevent conflicts with other plugins.
    4145
    4246= 1.5.1 =
  • wp-admin-no-show/trunk/wp-admin-no-show.php

    r1195229 r1201365  
    44Plugin URI: http://www.dougsparling.org
    55Description: Efectively blocks admin portion of site for selected user roles. Any attempt to manually navigate to wp-admin section of site and user will be redirected to selected site page. Hides admin bar.
    6 Version: 1.5.1
     6Version: 1.6.0
    77Author: Doug Sparling
    88Author URI: http://www.dougsparling.org
     
    8282        }
    8383
    84         if( is_admin() ) {
     84        if( is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
    8585            if ( headers_sent() ) {
    8686                echo '<meta http-equiv="refresh" content="0;url=' . $redirect . '">';
     
    9191            }
    9292        }
    93 
    94     }
    95 }
    96 add_action( 'admin_head', 'wp_admin_no_show_admin_redirect', 0 );
     93    }
     94}
     95add_action( 'admin_init', 'wp_admin_no_show_admin_redirect', 0 );
    9796
    9897/**
Note: See TracChangeset for help on using the changeset viewer.