Critique on my minor ‘Private posts’ hack, pleas
I noticed that if I make a private post, the post would not show on the publicly accessible pages, even if I was logged in.
There seemed to be no solution in the forums, so I scratched around and made a minor change to wp-blog-header.php, to include the wp-includes/functions.php file.
This allows wp-blog-header.php to call the get_currentuserinfo() function, which in turn sets the
$user_ID variable which was not being set otherwise.
The result is that wp-blog-header.php now correctly allows private entries to be shown, if the private posts author is logged in.
I’m a total WordPress (& php) newbie, so I’d appreciate any feedback on whether including functions.php was actually a good idea… I’d hate to compromise my site by including a file I shouldn’t have.
(I downloaded and installed the 2004-11-23.tgz wordpress tarball just to check whether this issue was resolved, but it appears not to be).
Any thoughts or comments gratefully received.
- The topic ‘Critique on my minor ‘Private posts’ hack, pleas’ is closed to new replies.