boonebgorges/buddypress-docs — pull request #379 by dcavins (2014-02-21 02:36:12+00:00)
Title: Add usermeta 'bp_docs_terms' and other tag problems

This piece of meta hasn’t been being added, due to an always-false conditional. Doc editing doesn’t take place in the ‘bp_is_user()’ context anymore, so the sanity check was failing.

I noticed this because the "tag" search wasn't working on the user library and the cause was that there was no usermeta `bp_docs_terms`, so the tag box wasn't populated. (I also added a message in the case of no tags to prevent the filter from seeming broken.)

I don't think that this system is working, though. It seems like usermeta can't ever be kept in sync when multiple users can edit docs (and it currently isn't--each time a user edits a doc, his meta is updated to that doc's tags; groupmeta has a similar problem). I'm adding another commit that uses `bp_docs_has_docs` to populate the tags list. This is not an efficient approach, but it seems to be accurate.

I don't know how to reset the `bp_docs_has_docs` loop, so the argument I'm setting is messing up the main loop's pagination. Is there something like `wp_reset_query()` or another method?

Thanks,

-David