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 | |
function refsites_update_labels() { | |
// Only run this function on the front end | |
if ( is_admin() ) { | |
return; | |
} | |
$post_types = array( 'post', 'sr_playlist' ); |
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 | |
// Edited by Mission Lab on 7/31/2023 to add SubStack posts | |
$api_url = 'https://substackapi.com/api/feeds/[your-username].substack.com?sort=new&limit=4'; | |
// Set up cURL to fetch data from the Substack API | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $api_url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
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
/** | |
* | |
* ## OPTIONS | |
* | |
* <environment> | |
* : The environment you are going to. 'local' or 'stage'. Defaults to 'local' | |
* | |
* <language> | |
* : The language to import the content to | |
* |
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
add_action( 'wpmu_new_user', function( $user_id ) { | |
add_user_to_blog( 19, $user_id, 'participant' ); // add user to forum site as participant | |
// subscribe user to forum | |
$forum_id = 0; // update the forum id | |
switch_to_blog( 19 ); // switch to the correct site | |
bbp_add_user_forum_subscription( $user_id, $forum_id ); // add user to the forum | |
restore_current_blog(); // switch back to the original site | |
} ); |
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 | |
/** | |
* Filter the subscriptions that can be used in the upgrade path | |
* original filter: https://docs.google.com/document/d/19-H7iF-6M_xuKQIF_V6VdeuwXyXaGgWAU9zrJnxavOw/edit | |
*/ | |
function trm_filter_subscriptions( $subscriptions, $user_id ) { | |
// make sure the user is active and get the subscription ID | |
$user_subscription = ( rcp_is_recurring( $user_id ) && rcp_is_active( $user_id ) && 'cancelled' !== rcp_get_status() ) ? rcp_get_subscription_id( $user_id ) : ''; | |
$subscriptions = rcp_get_subscription_levels( 'active' ); |
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
<div id="spotxchange"></div> | |
<script type="text/javascript"> | |
window.isMobile = function () { | |
var check = false; | |
(function (a) { | |
if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(2 |
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
function remove_prev_role_meta( $user_id = null) { | |
// Define the user we are working on | |
if ( ! $user_id ) { | |
$user_id = get_current_user_id(); | |
} | |
// Set valid groups | |
$valid_groups = bp_xprofile_get_groups( array( 'user_id' => $user_id ) ); | |
$valid_group_ids = wp_list_pluck( $valid_groups, 'id' ); |
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 | |
/* | |
* Plugin Name: wpMandrill MS | |
* Plugin URI: https://gist.github.com/tannerm/b6d06e3d784f7c12bdd5 | |
* Description: Network-wide settings for wpMandrill. | |
* Version: 2015.07.07 | |
* Author: Kailey Lampert, Tanner Moushey | |
* Author URI: kaileylampert.com | |
* License: GPLv2 or later | |
* TextDomain: wpmandrill-ms |
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
/** | |
* Custom price the Registration form and support other custom price functions | |
* Yes this is kind of a hack, but we need out function to fire first | |
*/ | |
var registrationTotal = function() { | |
var SELF = this; | |
SELF.init = function() { | |
// This would be the right way to make this happen if the coupons extension didn't mess it up | |
// gform.addFilter('gform_product_total', SELF.swapVars); |
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
jQuery(document).ready(function($){ | |
'use strict'; | |
var ajaxLogin = function() { | |
var SELF = this; | |
SELF.data = {'security': tm.security}; | |
SELF.init = function(id) { | |
SELF.$loginContainer = $(id); |
NewerOlder