Index of /andrejciho/Wordpress MU/Site Admin’s Ability to See Protected Post

Post Title Posted Description
Back Parent Directory
Site Admin’s Ability to See Protected Post 2006-10-27 21:24

In some setting, such as when a university, you need this.


In some setting, such as when a university hosts student blogs / portfolios, it is essential that a site administrator has the ability to see all the posts and pages, even the ones that users set as password-protected. This can be accomplished by modifying a single line of code.

In the file ./wp-includes/post-template.php you’ll have to modify the function get_the_content() so that instead of:

if ( !empty($post->post_password) ) {

it will say

if ( !empty($post->post_password) AND !is_site_admin()) {


This website is powered by Wordpress