Replace each_connected() with something less confusing#348
Replace each_connected() with something less confusing#348
Conversation
|
Right, can't use |
|
If you do use it to return something, perfect filter to use is |
|
Been thinking about this all week and to me, a good alternative to I think that this is a more organic way of including connected posts vs. using a separate function. Adding it would add all connected objects to every |
|
And of course, after posting my last comment, I noticed you posted something similar to my first suggestion last year. I think the second one would work well for the main loop |
each_connected()is confusing because it doesn't return anything; instead, it produces side-effects on the $wp_query object.It would be better if it returned something which the user could explicitly manipulate.
Proposed syntax:
cc: @markjaquith, @aaroncampbell
History
Initially, all the querying was done through WP_Query query vars (including 'each_connected').
Then, the idea of explicit connection types came along and the query vars were replaced with
P2P_Connection_Type->get_connected().Then, the preference went back to query vars (#61).