WPBP / WordPress-Plugin-Boilerplate-Powered

Wordpress Plugin Boilerplate but Powered with examples and a generator!
https://wpbp.github.io/
GNU General Public License v3.0
789 stars 114 forks source link

Insert Post 2 post #14

Closed Mte90 closed 8 years ago

Mte90 commented 9 years ago

Or something similar

Mte90 commented 9 years ago

Posts 2 posts is not longer mantained: https://github.com/WebDevStudios/CMB2-Post-Search-field We need a solution for user search

EugenioPetulla commented 8 years ago

This one seems to be a good option to me: https://webdevstudios.com/2014/12/23/attaching-posts-with-cmb2-for-wordpress/

Maybe I can write some code to adapt it for creating a new user search field also.

Mte90 commented 8 years ago

The fields for the users and posts I already done:

The problem is that posts2posts create tables and other stuff for the association of that information. With cmb2 instead that information are stored in the post so is difficult for search etc.

EugenioPetulla commented 8 years ago

I don't think I want something similar in my plugins. I can build a class and retrieve any information I want in an easy manner, why I need DB relationships when I can build my own custom and maybe storing it in a transient or something like that?

Mte90 commented 8 years ago

because posts 2 posts is used for relationships. As example do you want get all the post where is a specific post is associated like an user in a field? Actually you have to do a big query respect a post 2 post is easy to create that with only a declaration and a simple system like wp_query to get the relationships.

EugenioPetulla commented 8 years ago

My two cents

I don't want depend on another library to do a custom task like that! Really, if I need some relationships in my plugin I want write them on my own because it will be so custom and core related that I don't really need extra "shiny" stuff under my engine! :P

Mte90 commented 8 years ago

Depends of waht do you need ant time, check that library/plugin to see the power.

EugenioPetulla commented 8 years ago

I know Post2Post is powerfull but this is a boilerplate and it must be very slim in order to do it's job well.

I think P2P could be easily integrated by hand if someone needs. It's a Folder and a init, not a very hard work no? Not mantained anymore, no free alternatives, maybe post-connector by yoast has some free-to-use option but I can't remember so...

This is a big No to me now. :)