[buddypress-trac] [BuddyPress] #5021: Shortcode contents don't display in non-standard BP 1.7 themes
buddypress-trac
noreply at wordpress.org
Thu May 30 01:51:59 UTC 2013
#5021: Shortcode contents don't display in non-standard BP 1.7 themes
------------------------------------+------------------
Reporter: sensibleplugins | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 1.8
Component: Core | Version: 1.7
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+------------------
Comment (by boonebgorges):
Hey r-a-y - 5021.06.patch looks mostly good to me. I agree that we don't
need the `loop_end` stuff with the new technique.
I'm still not totally what the `$wp_query->post_count` check is intended
to prevent. Can you give a specific example of what kind of thing it would
prevent? I'm not sure I understand what `query_posts()` has to do with it
- the truth is that (unless I'm missing something) we're not really doing
any "is this the main loop" checks. `if ( in_the_loop() )` will return
true whenever we're inside of any `WP_Query` object, which we will always
necessarily be at `loop_start`, even if it's not the *main* query.
What we're really doing with all of our logic is ensuring that only the
_first_ WP_Query object constructed on a page load will trigger theme
compat. 99.9% of the time, this will be the main query, and in those
cases, the post count will always be 1 on a BP page (as long as we're
using bp-pages). In the rare case where a plugin fires a WP_Query object
_before_ the main query has been built (which is problematic in its own
way - see https://core.trac.wordpress.org/ticket/20904), your post_count
check will prevent theme compat from kicking in as long as that query
returns more than one post. Is that what it's intended to do, or am I
missing the larger picture? (Just to be clear - I don't think the
post_count stuff is hurting anything, I just want to understand its
purpose a bit better.)
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5021#comment:14>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list