[wp-hackers] Creating an "Author Cafe"
William Canino
william.canino at googlemail.com
Thu Oct 1 20:58:27 UTC 2009
> Has anybody looked at correcting this?
Ah, I found them: trac tickets #9211 and #9144.
I will have to ban these two core widgets from my blog in the meantime.
Almost there, almost done.
2009/10/1 William Canino <william.canino at googlemail.com>:
> Thanks for the replies! I've begun using the suggestions.
>
> During testing, I am finding that many "recent comment" widgets and
> dashboard widgets, such as the ones built in the core, do not check
> whether its associated post or page is actually published and is not
> private.
>
> Meanwhile, the comments_array filter hook is only applied inside the
> comments_template() function.
>
> Has anybody looked at correcting this?
>
> 2009/10/1 Dion Hulse (dd32) <wordpress at dd32.id.au>:
>> How about, instead of excluding, you include specifically?
>>
>> Create a new post, Set its post_status to 'private-author-cafe' or similar
>> filter the WHERE clause if the current user is an editor or admin, of
>> "($old_where) OR post_status == 'private-author-cafe'
>>
>> Seems like a possibility..
>>
>> On Thu, 01 Oct 2009 19:50:18 +1000, Austin Matzko <if.website at gmail.com>
>> wrote:
>>
>>> On Thu, Oct 1, 2009 at 12:32 AM, William Canino
>>> <william.canino at googlemail.com> wrote:
>>>>
>>>> I'm thinking of creating one post, comments enabled, say post_id =
>>>> 100, that is visible only to authors and editors. This post mustn't
>>>> appear in feeds or to non-authors, and its comments mustn't appear in
>>>> the comments feed.
>>>>
>>>> All the plugins I've seen that offer to do this seem to use a WP_Query
>>>> filter callback. It seems a big waste for the blog to scan each and
>>>> every query post array and take out this one post for 99% of the
>>>> world. Is there a better way? Do you have a better suggestion?
>>>
>>> You could use the posts_where filter, and append a WHERE clause to
>>> every non-relevant query:
>>>
>>> " AND {$wpdb->posts}.ID != 100"
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>
>>
>>
>> --
>> --
>> Dion Hulse
>> e: contact at dd32.id.au
>> w: http://dd32.id.au/
>> m: 04 6621 9112 (+614 6621 9112)
>> WordPressQI: http://wordpressqi.com/
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>
More information about the wp-hackers
mailing list