The MU forums have moved to WordPress.org

Display archived blogs to admin (4 posts)

  1. adamrbrown
    Member
    Posted 16 years ago #

    When logged in as site admin, I want to be able to view archived blogs and review the content without having to unarchive the blog.

    I'm inclined to open a ticket changing this (wp-settings.php):

    if( $current_blog->archived == '1' )
        graceful_fail(__('This blog has been archived or suspended.'));

    to this:

    if( $current_blog->archived == '1' && !is_site_admin() )
        graceful_fail(__('This blog has been archived or suspended.'));

    But first I'm curious to hear if others have an opinion. Good idea? Bad idea?

    edit: For is_site_admin to work properly, this needs to happen at the end of wp-settings.php rather than its present location in the file.

  2. MrBrian
    Member
    Posted 16 years ago #

    Sounds like a good idea to me.

  3. MrBrian
    Member
    Posted 16 years ago #

    Sounds like a good idea to me.

  4. adamrbrown
    Member
    Posted 16 years ago #

    After some tweaking, this is what I now have near the end of wp-settings.php. It filters the blog name to make it obvious to the admin that the blog is archived, and it sends a 404 header to the search engines.

    if( $current_blog->archived == '1' ){
    	get_currentuserinfo();
    	if (is_site_admin()){
    		add_filter('option_blogname', create_function('$n', 'return "ARCHIVED: $n";'));
    	}else{
    		header("HTTP/1.1 404 Not Found");
    		graceful_fail(__('This blog has been archived or suspended.'));
    	}
    }

About this Topic

  • Started 16 years ago by adamrbrown
  • Latest reply from adamrbrown