This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Clone the subscriber role to create a tenant role | |
* Note: this only needs to be run once, so it can be removed after the role is created | |
*/ | |
function clone_subscriber_to_tenant() { | |
$new_role = 'tenant'; | |
$new_role_name = 'Tenant'; | |
$source_role = 'subscriber'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// originally based on https://gist.github.com/kenhowardpdx/8484076 | |
// updated to current gtag.js snippet and moved to head | |
function rtp_init_analytics() { | |
$analytics_id = 'YOUR UA CODE HERE'; | |
$analytics = '<!-- Global site tag (gtag.js) - Google Analytics --> | |
<script async src="https://www.googletagmanager.com/gtag/js?id='. $analytics_id .'"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} |