Plugin Directory

Changeset 1830398


Ignore:
Timestamp:
02/27/2018 08:37:41 PM (8 years ago)
Author:
lucaskowalski
Message:

Updating README

File:
1 edited

Legend:

Unmodified
Added
Removed
  • unregister-gutenberg-blocks/trunk/README.txt

    r1829677 r1830398  
    3030Of course you can! Default capability for seeing the plugin's option panel is 'edit_posts', but you can easily change it to whatever you like using filters. Just drop the line below into your functions.php:
    3131
    32 `if ( is_plugin_active( 'unregister-gutenberg-blocks/unregister-gutenberg-blocks.php' ) ) {
    33     add_filter( 'ugb_capability_filter', 'your_prefix_change_ugb_plugin_capability' );
     32`add_filter( 'ugb_capability_filter', 'your_prefix_change_ugb_plugin_capability' );
    3433
    35     function your_prefix_change_ugb_plugin_capability() {
    36         return 'manage_options'; // or a custom capability of your choice
    37     }
     34function your_prefix_change_ugb_plugin_capability() {
     35    return 'manage_options'; // or a custom capability of your choice
    3836}`
    3937 
Note: See TracChangeset for help on using the changeset viewer.