Skip to content

Instantly share code, notes, and snippets.

@trueqap
Created September 1, 2019 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trueqap/e1ffbc2e9ac3a993cd2dbc5638a0bd99 to your computer and use it in GitHub Desktop.
Save trueqap/e1ffbc2e9ac3a993cd2dbc5638a0bd99 to your computer and use it in GitHub Desktop.
WordPress Clone Role
<?php
add_action('init', 'kisker_role');
function kisker_role()
{
global $wp_roles;
if (!isset($wp_roles)) {
$wp_roles = new WP_Roles();
}
$adm = $wp_roles->get_role('customer');
$wp_roles->add_role('kisker', 'Kiskereskedő', $adm->capabilities);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment