Plugin Directory

Changeset 1238230


Ignore:
Timestamp:
09/04/2015 06:43:49 PM (10 years ago)
Author:
scriptrunner
Message:

Add filter to allow hooking into the value

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

Legend:

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

    r1201365 r1238230  
    44Tags: admin bar, admin menu, dashboard, disable, remove, hide
    55Requires at least: 3.1
    6 Tested up to: 4.2.2
    7 Stable tag: 1.6.0
     6Tested up to: 4.3
     7Stable tag: 1.6.1
    88License: MIT License
    99License URI: http://www.opensource.org/licenses/mit-license.php
     
    3939
    4040== Changelog ==
     41
     42= 1.6.1 =
     43* Add filter to allow hooking into the $redirect value. (Thanks @cloughit!)
    4144
    4245= 1.6.0 =
  • wp-admin-no-show/trunk/wp-admin-no-show.php

    r1201365 r1238230  
    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.6.0
     6Version: 1.6.1
    77Author: Doug Sparling
    88Author URI: http://www.dougsparling.org
     
    4646function wp_admin_no_show_admin_redirect() {
    4747    // Whitelist multisite super admin
    48     if(function_exists('is_multisite')) {
    49         if( is_multisite() && is_super_admin() ) {
     48    if (function_exists('is_multisite')) {
     49        if ( is_multisite() && is_super_admin() ) {
    5050            return;
    5151        }
     
    8282        }
    8383
    84         if( is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
     84        $redirect = apply_filters( 'wp_ans_redirect', $redirect );
     85
     86        if ( is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
    8587            if ( headers_sent() ) {
    8688                echo '<meta http-equiv="refresh" content="0;url=' . $redirect . '">';
     
    103105
    104106    // Whitelist multisite super admin
    105     if(function_exists('is_multisite')) {
    106         if( is_multisite() && is_super_admin() ) {
     107    if (function_exists('is_multisite')) {
     108        if ( is_multisite() && is_super_admin() ) {
    107109            return;
    108110        }
Note: See TracChangeset for help on using the changeset viewer.