Guest User

Untitled

a guest
Mar 29th, 2015
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. /* Dare autori potere di inserire iframe */
  2. $ge_wp_author_role = get_role( 'author' );
  3. $ge_wp_author_role->add_cap( 'unfiltered_html' );
  4.  
  5. $ge_wp_editor_role = get_role( 'editor' );
  6. $ge_wp_editor_role->add_cap( 'unfiltered_html' );
  7.  
  8. $ge_wp_administrator_role = get_role( 'administrator' );
  9. $ge_wp_administrator_role->add_cap( 'unfiltered_html' );
  10.  
  11. // Use this filter if you want to force an option, blocking/disregarding manual setting
  12. add_filter( 'pp_options', 'my_pp_options', 99 );
  13.  
  14. function my_pp_options( $options ) {
  15. // Array key corresponds to pp_prefixed name attributes of checkboxes, dropdowns and input boxes. Modify for desired settings.
  16. $options['unfiltered_html'] = 1;
  17.  
  18. return $options;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment