Skip to content

Instantly share code, notes, and snippets.

View clovepod's full-sized avatar

Lisa Linn Allen clovepod

  • SAS
  • Cary, NC
View GitHub Profile
@clovepod
clovepod / RAMP-convert-urls-CMB2.php
Last active March 8, 2016 02:55
This is a section of the convert URLs plugin from Crowd Favorite with some modifications to handle our CMB2 fields that contain TinyMCE editors.
<?php
function sas_CMB2_convert() {
$sas_CMB2_TinyMCE_fields = array(
0 => array(
"CMB2_group" => "repeat_group_name", //name of the repeat group
"CMB2_field" => "field_name" //name of the field w/in the repeat group to translate
)
);
@clovepod
clovepod / RAMP-ubermenu-custom-meta.php
Last active March 8, 2016 02:53
Plugin that will pull in the ubermenu custom meta during RAMP-ing our menu from staging to live.
<?php
/**
* Plugin Name: SAS RAMP Ubermenu
* Description: Get custom Ubermenu postmeta
* Version: 0.1
* Author: Lisa Linn Allen, SAS
*/
function sas_ramp_ubermenu ($item, $menu_id, $menu_item_insert_id, $menu_item_args) {
@clovepod
clovepod / RAMP-translate-CMB2-repeating.php
Last active March 8, 2016 02:59
Plugin to get RAMP to translate post ID's in CMB2 repeating fields. This relies not only on RAMP, but also on the postmeta translation plugin that is distributed to RAMP customers. Parts of this were written by a Crowd Favorite staffer, but not released under any license.
<?php
/**
* Plugin Name: SAS Translate CMB2 repeating
* Description: Get post ID's that need translation with RAMP when they are in a repeating custom field
* Version: 0.1
* Author: Lisa Linn Allen, SAS
*/
/**