WordPress.org

Ready to get started?Download WordPress

Forums

User Taxonomies
Fails when taxonomies are registered for array of post types (3 posts)

  1. boxcarpress
    Member
    Posted 1 year ago #

    The plugin as written only works on taxonomies registered to one post type. It expects the second parameter $object_type of register_taxonomies() to be a string, but it can also take an array (as shown in the Codex).

    For example, this fails to allow the taxonomy for the user:
    register_taxonomy('visibility',array('pages','users'),$args);

    See http://pastie.org/6464242 for a rewritten DJG_UserTaxonomies::registered_taxonomy method to allow the plugin to handle taxonomies for multiple post types.

    http://wordpress.org/extend/plugins/user-taxonomies/

  2. boxcarpress
    Member
    Posted 1 year ago #

    While we're at it, here's a fix to better handle the POST ajax call when you add a user taxonomy (so the code expects a $_REQUEST rather than a $_GET variable):
    http://pastie.org/6464544

  3. boxcarpress
    Member
    Posted 7 months ago #

    On second look, I don't think that it's a good idea to have a taxonomy apply to both posts and users (as I explain how to do in the first post). See: http://wordpress.org/support/topic/dont-share-taxonomies-between-users-and-posts?replies=1#post-4921419

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags