开发者 |
Jeffinho2016
jfgmedia |
---|---|
更新时间 | 2025年6月14日 22:07 |
PHP版本: | 7.4.0 及以上 |
WordPress版本: | 6.8.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
add_filter('sdtdl_users_not_allowed_to_assign',function(){return ['3','6','8'];})
"sdtdl_[user_role]_can_assign_to" to allow a specific user role to assign items to other roles, by returning an array of roles: add_filter('sdtdl_editor_can_assign_to',function(){return ['administrator','editor'];})
"sdtdl_[user_role]_cannot_assign_to_users" to prevent specific roles from assigning tasks to specific users, by returning an array of user IDs: add_filter('sdtdl_[user_role]_cannot_assign_to_users',function($current_user_id){return ['2','4'];})
"sdtdl_never_assign_task_to_users" to prevent specific users from ever being assigned any tasks, by returning an array of user IDs: add_filter('sdtdl_never_assign_task_to_users',function(){return ['1'];})
Administrators can assign tasks to all user roles with the "edit_posts" capability, but this can also be altered with the previous 3 filters.
Manage list creation rights:
By default, users with the "edit_posts" capability can create a to-do-list
"sdtdl_min_user_capability" to override this minimum capability: add_filter('sdtdl_min_user_capability',function(){return 'publish_posts';})
Manage day count for task highlighting:
By default, tasks will be considered as "aging" 7 days after their creation, and as "old" 14 days after their creation
"sdtdl_aging_tasks_min_days" to override the amount of days for aging tasks, by returning an integer: add_filter('sdtdl_aging_tasks_min_days',function($current_user_id){return 10;})
"sdtdl_old_tasks_min_days" to override the amount of days for old tasks, by returning an integer: add_filter('sdtdl_old_tasks_min_days',function($current_user_id){return 20;})
It will have no impact on site speed whatsoever. The plugin only launches for users that have the ability to edit posts.