[wp-hackers] Limiting ability to add terms to taxonomies

Dion Hulse (dd32) wordpress at dd32.id.au
Wed Dec 15 21:42:43 UTC 2010


In that case, I'd say filter it on the fly,
if ($pagenow = post-new.php) { return 'do_not_allow'; }
hooked into the cap system, It's a better solution (to me) than rewriting  
new metaboxes, which will potentially have to be re-done with WordPress  
upgrades to fit in or whatever.

On Wed, 15 Dec 2010 23:36:51 +1100, William Davis <will.davis at gmail.com>  
wrote:

> Well, I want them to still be able to add terms, just have to go
> through the submenu in order to do so. Removing permissions for a user
> based on what page they're on seems a little inelegant.
>
> On Dec 15, 2010, at 1:17 AM, Dion Hulse (dd32) wrote:
>
>> You'd be better off removing the permission which allows the current
>> user
>> from editing the terms.
>> You can set a permission to be required to assign terms to a object,
>> manage
>> them, delete them, and edit them.
>> See this code reference for it:
>> http://core.trac.wordpress.org/browser/trunk/wp-includes/taxonomy.php#L345
>>
>> On 15 December 2010 16:53, William Davis <will.davis at gmail.com> wrote:
>>
>>> Thanks for your response. Is there a way to find all the taxonomies
>>> that
>>> need to have their meta boxes unset? (For example, query all custom
>>> taxonomies with show_ui=true and hierarchical=false)
>>>
>>> Will
>>>
>>>
>>>
>>>
>>> On Dec 15, 2010, at 12:43 AM, Mike Schinkel wrote:
>>>
>>> On Dec 14, 2010, at 10:43 PM, William Davis wrote:
>>>>
>>>>> My question is, is there an easy way to get an array of all the
>>>>> taxonomies that have meta boxes and unset those meta boxes?
>>>>>
>>>>
>>>>
>>>> Use the "add_meta_boxes" hook with a high priority (100?) and
>>>> modify the
>>>> global $wp_meta_boxes array?
>>>>
>>>> -Mike
>>>> _______________________________________________
>>>> wp-hackers mailing list
>>>> wp-hackers at lists.automattic.com
>>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>>
>>>
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


-- 
Dion Hulse / dd32
Contact:
  e: contact at dd32.id.au
  Web: http://dd32.id.au/


More information about the wp-hackers mailing list