Where Has All The Content Gone?

I would like to apologise to all of you who came here looking for documentation, plugins, or just a read. It seems that I screwed up when trying to add, what I call, “quick admin links” to posts. It’s just some links that allow you to delete/edit comments and/or posts. Unfortunately I did the following with the “the_content” filter:

if (!current_user_can('edit_post', $post->ID)) {

Of course, that meant that all of you who were not logged in to my site, could not see any post nor comment contents, while I could see them just fine. And this brings up a good point. When using filters, remember to return the original content passed to your function, or you’ll end up like me, contentless. ;)

Here’s what I should have done and now have done:

if (!current_user_can('edit_post', $post->ID)) {
    return $content;

Again, sorry to all who came looking for content. hahahah

Where Has All The Content Gone? was written by


The opinions expressed in comments are entirely the responsibility of the various contributors. While I will do everything within reason to ensure that they are not defamatory, I accept no liability for them or the content of links included in them.



I have done that a few times. lol Even worse, I deleted all members once, simply because I screwed up the where clause of an sql statement. he-he Thankfully I love backups. :mrgreen:

Take Care,



You need an RSS feed! And if you have one, I need it more visible!

Great work m8, helping me through college.


Thanks for posting the mistake that you made, now I will have a better chance of not doing that myself. Thanks for the information!!

Related Posts