Skip to content

Instantly share code, notes, and snippets.

View tylerdigital's full-sized avatar

Nathan Tyler tylerdigital

View GitHub Profile
@tylerdigital
tylerdigital / helpscout-rest-controller.php
Created March 31, 2016 06:06 — forked from bradyvercher/helpscout-rest-controller.php
A starter WP REST API controller for creating a Dynamic App for Help Scout. http://developer.helpscout.net/custom-apps/dynamic/
<?php
/**
* Help Scout REST controller class.
*
* @license GPL-2.0+
* @link http://developer.helpscout.net/custom-apps/dynamic/
*/
class HelpScout_REST_Controller {
/**
* Secret key.
<?php
add_filter( 'soliloquy_output_slide', 'tgm_soliloquy_custom_html', 10, 4 );
function tgm_soliloquy_custom_html( $html, $id, $image, $data ) {
// If the ID doesn't match the one we want to modify, return the default HTML output. Change 324 to your slider ID.
$slider_id = $data['id'];
if ( '1937' != $slider_id ) return $html;
ob_start(); ?>
<span class="social-m">
<?php $summary = get_field('short_description');?>
<?php
// Fetch vars
$event = array(
'id' => $_GET['id'],
'title' => $_GET['title'],
'address' => $_GET['address'],
'description' => $_GET['description'],
'datestart' => $_GET['datestart'],
'dateend' => $_GET['dateend'],
'address' => $_GET['stage']
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;
/****
You should paste this into a file (in the example below : bp-customize-registration.php )
in your active theme's folder, then depending if your theme is a child theme or not you should
use this code in your functions.php to include the trick