Support » Plugin: Powered Cache » powered_cache_cap use?

  • Resolved juliangk

    (@juliangk)


    Hi there,

    I have been trying to use the “powered_cache_cap” filter to extend the use of the plugin for editors. But I can’t get it to work, because my OOP knowledge is limited and I can’t properly change the $capability variable. Do I have to extend the class to be able to change the $capability. Do I have to access the setup() method?

    Some help would be greatly appreciated.

    Thank you!

Viewing 1 replies (of 1 total)
  • Plugin Author Mustafa Uysal

    (@m_uysl)

    Hi @juliangk,

    You don’t need to know OOP for changing the powered_cache_cap by hooking with a filter.

    Something like:

    
    add_filter( 'powered_cache_cap', function () {
    	return 'edit_users';
    } );
    

    should work. The default capability is manage_options

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.