Skip to content

Instantly share code, notes, and snippets.

@nikolov-tmw
nikolov-tmw / multiple-roles-per-user.php
Last active September 5, 2024 01:45
Multiple roles per user WordPress plugin.
<?php
/**
* Plugin Name: Multiple Roles per User
* Description: Allows anyone who can edit users to set multiple roles per user. In a default WordPress environment that wouldn't have much of an effect, since the user would have the privileges of the top-privileged role that you assign to him. But if you have custom roles with custom privileges, this might be helpful.
* Version: 1
* Author: nikolov.tmw
* Author URI: http://paiyakdev.com/
* License: GPL2
*/
/*
@rosshanney
rosshanney / gce-alter-allowed-tags.php
Last active October 3, 2018 16:28
Add the itemprop, itemscope and itemtype attributes, and the meta tag to the list of allowed tags / attributes
<?php
/*
Plugin name: Add microdata stuff to list of allowed tags
*/
function gce_alter_allowed_tags() {
global $allowedposttags;
$microdata_atts = array( 'itemprop' => true, 'itemscope' => true, 'itemtype' => true );