get_names(); $dp_roles = get_option('duplicate_post_roles'); if ( $dp_roles == "" ) $dp_roles = array(); foreach ($roles as $name => $display_name){ $role = get_role($name); // role should have at least edit_posts capability if ( !$role->has_cap('edit_posts') ) continue; /* If the role doesn't have the capability and it was selected, add it. */ if ( !$role->has_cap( 'copy_posts' ) && in_array($name, $dp_roles) ) $role->add_cap( 'copy_posts' ); /* If the role has the capability and it wasn't selected, remove it. */ elseif ( $role->has_cap( 'copy_posts' ) && !in_array($name, $dp_roles) ) $role->remove_cap( 'copy_posts' ); } } ?>




- -



name == 'post_format'){ continue; } ?>
get_names(); foreach ($roles as $name => $display_name): $role = get_role($name); if ( !$role->has_cap('edit_posts') ) continue; ?>
true),'objects'); foreach ($post_types as $post_type_object ) : if ($post_type_object->name == 'attachment') continue; ?>
= 0 ){ ?>

here', 'duplicate-post'), 'https://duplicate-post.lopo.it/docs/developers-guide/functions-template-tags/duplicate_post_clone_post_link/'); ?>
"/>