[wp-hackers] Question Regarding Taxonomy Terms per User

William Satterwhite whsatterwhite at gmail.com
Tue Apr 2 21:44:32 UTC 2013


There's always the chance of "term collision" between taxonomies.

http://core.trac.wordpress.org/ticket/5809

On Tuesday, April 2, 2013, Matthias Breuer wrote:

> We use this solution for custom post types and taxonomies on a larger
> scale WordPress project and I have yet to find any downsides. In our
> special case the users never get to see other users content so we simply
> register the taxonomy bound to the current user id on init. I can image
> that if the content was public to anybody registering a few hundred
> taxonomies and post types on init could create problems.
>
>
> Am 02.04.2013 um 23:18 schrieb Kai Jacobsen <kai at ungestaltbar.de<javascript:;>
> >:
>
> > I don't see any real issues with this solution, except that it shouldn't
> become a practice with public projects / plugins / themes, imho.
> > So I thought I post my answer with some words of caution.
> >
> > I've done something similar with post types for user specific blogs /
> contents without using multisite. But, and this is a possible implication,
> this can lead to some extra work to make things accessible to non-logged in
> users etc..
> >
> > Depends on the usecase..
> >
> > regards
> >>> Some way to do this is to suffix / prefix the custom taxonomy with some
> >>> user specif data upon registration
> >>>
> >>> global $current_user;
> >>> register_taxonomy( "genre_{$current_user->ID}", array( 'page' ), $args
> );
> >>>
> >>> this approach has some implications of course and you shouldn't use it
> if
> >>> none of them come to your mind :)
> >>>
> >> Nice.  That is at least a workable solution.  I don't see too much issue
> >> with that except there will be a bunch of taxonomies created ( 1/user )
> >> which I can hide from the UI in the backend.  This isn't a production
> site
> >> so unless there is an issue I am not seeing this will work.  I would be
> >> interested in hearing what your idea of the negative 'implications'
> might
> >> be.
> >>
> >> Ryan
> >>
> >>
> >> On Tue, Apr 2, 2013 at 4:50 PM, Kai Jacobsen <kai at ungestaltbar.de<javascript:;>>
> wrote:
> >>
> >>> Some way to do this is to suffix / prefix the custom taxonomy with some
> >>> user specif data upon registration
> >>>
> >>> global $current_user;
> >>> register_taxonomy( "genre_{$current_user->ID}", array( 'page' ), $args
> );
> >>>
> >>> this approach has some implications of course and you shouldn't use it
> if
> >>> none of them come to your mind :)
> >>>
> >>>
> >>>  A quick question:
> >>>> One of my weekend projects is creating a Instapaper/Reader type app
> using
> >>>> WordPress.  It all works great for storing bookmarks but I am running
> into
> >>>> a bit of an issue if I want to scale this beyond a single user.  I
> >>>> currently have a Post Type of 'bookmark' and a custom tax for users to
> >>>> categorize these bookmarks as they see fit.  The issue is mainly that
> >>>> terms
> >>>> are defined on a global level and there is no way to have a term have
> an
> >>>> 'author' or to only be specified by user.  I could use a term meta
> plugin
> >>>> but that becomes an issue when trying to use the loop (WP_Query).
>  Does
> >>>> anyone have a good data architecture for something like this?
> >>>>
> >>>> In short....each user would have there own taxonomy terms for their
> >>>> specific bookmarks and only those would show up on a page.  I would
> need
> >>>> to
> >>>> get these terms without having to go through each term.
> >>>>
> >>>>
> >>> ______________________________**_________________
> >>> wp-hackers mailing list
> >>> wp-hackers at lists.automattic.**com <wp-hackers at lists.automattic.com<javascript:;>
> >
> >>> http://lists.automattic.com/**mailman/listinfo/wp-hackers<
> http://lists.automattic.com/mailman/listinfo/wp-hackers>
> >>>
> >>
> >>
> >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com <javascript:;>
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com <javascript:;>
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


-- 
Hunter Satterwhite
http://linkedin.com/in/hsatterwhite
(252) 762-5177


More information about the wp-hackers mailing list