wp-posts-to-posts icon indicating copy to clipboard operation
wp-posts-to-posts copied to clipboard

initial draft of adding buddypress support

Open clariner opened this issue 11 years ago • 12 comments

i have created the required files to support buddpress groups. I think the only thing remaining that i would need some pointers with is the converting the the posts 2 posts query arguments to one supported by BP_Groups_Group::get()

clariner avatar Sep 07 '14 21:09 clariner

After only a quick look, the code looks alright. I will do some actual testing when you say it's ready.

Due to #449, in order to be able to merge this, you will have to submit all the files from the core/ directory in a separate pull request to https://github.com/scribu/wp-lib-posts-to-posts.

scribu avatar Sep 08 '14 05:09 scribu

I will double check but I had issues with using an version above V1.6.3.

AFAIK it was down to missing files / unable to file certain files. I will merge in #449 to my version and review.

If I find anything I will posts on #449

clariner avatar Sep 08 '14 08:09 clariner

AFAIK it was down to missing files / unable to file certain files.

You need to install the Composer dependencies. See the updated CONTRIBUTING.md.

scribu avatar Sep 08 '14 09:09 scribu

I will be able to issue a complete pull request against the other repository once i have resolved the final issue which is how to modify the do_query, capture_query and get_list functions.

As WP_Query and WP_User_Query can't be used is it possible to convert these function to use $wpdb? It doesn't seem like $wpdb->get_results() is available ($wpdb is null, i have use global) within these functions. If they can be modified how can the arguments be passed along?

clariner avatar Sep 08 '14 23:09 clariner

As WP_Query and WP_User_Query can't be used is it possible to convert these function to use $wpdb?

If BuddyPress doesn't have an equivalent class, like BP_Group_Query, then yeah, using $wpdb is fine.

($wpdb is null, i have use global)

That's not possible, since WordPress can't load plugins without having first set up $wpdb.

scribu avatar Sep 09 '14 05:09 scribu

If they can be modified how can the arguments be passed along?

If there is no BP_Group_Query class to hook into, you will still be able to use p2p_type( 'some_connection_type' )->get_connected( $some_group ).

scribu avatar Sep 09 '14 05:09 scribu

It looks like BP_Group_Query and BP_User_Query will be available in Buddypress 2.2.

clariner avatar Sep 09 '14 10:09 clariner

I have update the pull request to support changes in #449.

clariner avatar Sep 09 '14 23:09 clariner

Cool, but if you look at the changed files you'll see that there are 4 that need to be deleted from this PR:

  • bin/install-wp-tests
  • core/item-bpgroup.php
  • core/query-bpgroup.php
  • core/side-bpgroup.php

scribu avatar Sep 10 '14 05:09 scribu

I have updated the pull request following your comments.

clariner avatar Sep 10 '14 07:09 clariner

BuddyPress support is a great addition! Thank you!

solhuebner avatar Sep 11 '14 12:09 solhuebner

Any news for this?

solhuebner avatar Mar 07 '15 20:03 solhuebner