jmlapam

Untitled

Jan 15th, 2016
68
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. register_activation_hook( __FILE__, '_on_activation' );
  4. /**
  5. * Add cap edit menu to editors in WP
  6. * Run this on plugin's activation only
  7. */
  8. function _on_activation() {
  9. $role = get_role( 'editor' );
  10. $role->add_cap( 'edit_theme_options' );
  11. }
RAW Paste Data