Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to validate this deprecated function:

add_filter('user_has_cap', array(&$this, 'filter_user_has_cap'), 10, 3);

It needs to use roles or capatibilies, so I guess 10 is the admin level, so I could use "edit_pages":

add_filter('user_has_cap', array(&$this, 'filter_user_has_cap'), 'edit_pages', 3);

But what is argument "3"?

Thank you Oliver

share|improve this question
    
Just FYI, the 10 is the filter priority, and is an argument to add_filter(), not to the callback. –  Chip Bennett Aug 11 '11 at 16:59

1 Answer 1

up vote 1 down vote accepted

First of all, it's not the add_filter() call that you're supposed to be modifying, but the callback: 'filter_user_has_cap', i.e. go to where that method is defined and change the user level to 'edit_pages'.

Fixing deprecated notices is easier with the Log Deprecated Notices plugin.

share|improve this answer
    
Nice plugin, thanks a bunch! –  mashup Aug 11 '11 at 16:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.