이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

LH User Taxonomies

설명

This plugin extends the default taxonomy functionality and extends it to users, while automating all the boilerplate code.

Once activated, you can register user taxonomies using the following code:

register_taxonomy('profession', 'user', array(
    'public'        =>true,
    'single_value' => false,
    'show_admin_column' => true,
    'labels'        =>array(
        'name'                      =>'Professions',
        'singular_name'             =>'Profession',
        'menu_name'                 =>'Professions',
        'search_items'              =>'Search Professions',
        'popular_items'             =>'Popular Professions',
        'all_items'                 =>'All Professions',
        'edit_item'                 =>'Edit Profession',
        'update_item'               =>'Update Profession',
        'add_new_item'              =>'Add New Profession',
        'new_item_name'             =>'New Profession Name',
        'separate_items_with_commas'=>'Separate professions with commas',
        'add_or_remove_items'       =>'Add or remove professions',
        'choose_from_most_used'     =>'Choose from the most popular professions',
    ),
    'rewrite'       =>array(
        'with_front'                =>true,
        'slug'                      =>'author/profession',
    ),
    'capabilities'  => array(
        'manage_terms'              =>'edit_users',
        'edit_terms'                =>'edit_users',
        'delete_terms'              =>'edit_users',
        'assign_terms'              =>'read',
    ),
));

Read more about registering taxonomies in the codex
This is heavily inspired by previous work by Justin Tadlock and also forks Damian Gostomskis plugin in the repository to add additional functionality, including:

  • Fixes a bug with display of existing user taxonomies in the user-edit screen
  • Fixes a bug with taxonomy count in the old plugin where deleting users did not update the count
  • Add support for ‘single_value’ attribute when registering a user taxonomy for taxonomies which should only have one value.
  • Properly supports the capabilities associated with the taxonomy when registered.
  • Supports ‘show_admin_column’ attribute when registering the taxonomy in the same way as post taxonomies.
  • Where ‘show_admin_column’ is true admins can assign user taxonomies using bulk edit functionality.

Check out our documentation for more information on how to register user taxonomies.

Like this plugin? Please consider leaving a 5-star review.

Love this plugin or want to help the LocalHero Project? Please consider making a donation.

설치

  1. Upload the lh-user-taxonomies folder to the /wp-content/plugins/ directory
  2. WordPress의 ‘플러그인’ 메뉴에서 플러그인을 활성화하세요.
  3. Use register_taxonomy as shown in the description

FAQ

Can I set a taxonomy that includes posts/pages/cpt´s with users?

You can but you should not. The problem being that when taxonomies are shared across objects types in different tables wordpress can get confused.

Does this create new database tables?

No. There are no new database tables with this plugin.

Does this modify existing database tables?

No. All of WordPress’s core database tables remain untouched.

Does this plugin integrate with user roles?

No. This is best left to plugins that choose to integrate with this plugin.

What is something does not work?

LH User Taxonomies, and all LocalHero plugins are made to WordPress so should work with all well coded plugins and themes. But not all plugins and themes are well coded (including many popular ones).

If something does not work properly, firstly decativate ALL other plugins and switch to one of the thesmes that come with core (e.g. twentyfirteen, twentysixteen etc).

If the problem persists pleasse leave a post in the support forum: https://wordpress.org/support/plugin/lh-user-taxonomies/ . I look there regularly and resolve most queries.

What if I need a feature that is not in the plugin?

Please contact me for custom work and enhancements here: https://shawfactor.com/contact/

Can I contribute?

Yes, please! The number of users needing LH User Taxonomies is growing fast. Having an easy-to-use API and powerful set of functions is critical to managing complex WordPress installations. If this is your thing, please help us out!

후기

2020년 12월 20일 답글 1개
Excellent plugin, thanks. One thing I’m adding to my implementation is to expose the taxonomy via API. register_taxonomy(‘profession’, ‘user’, array( … ‘show_in_rest’ => true, ‘rest_base’ => ‘profession, ‘rest_controller_class’ => ‘WP_REST_Terms_Controller’, ));
모든 8 평가 읽기

기여자 & 개발자

“LH User Taxonomies”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “LH User Taxonomies”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.00 February 28, 2015
* Initial release

1.2 July 15, 2015
* Code improvements

1.3 July 17, 2015
* Documentation links

1.41 August 31, 2015
* Fix for saving taxonomies on profile when you need to remove term – thanks Greumb

1.50 March 04, 2016
* Added bulk edit functionality

1.50 March 04, 2016
* Added bulk edit functionality

1.52 February 22, 2017
* Buildtree bug fix

1.53 April 27, 2017
* registered_taxonomy fix

1.54 April 30, 2017
* added show_in_menu support

1.55 May 15, 2017
* better single value check

1.56 July 27, 2017
* added class check

1.57 May 06, 2019
* singleton pattern, capability check, and value removal

1.60 September 22, 2020
* remove redundant code, menu fix

1.61 March 19, 2021
* fix term count on deleted_user and linked count