Skip to content

Instantly share code, notes, and snippets.

View mecachisenros's full-sized avatar

Andrei Mondoc mecachisenros

View GitHub Profile
@mecachisenros
mecachisenros / cf-polylang.php
Created March 8, 2019 14:01
Calder Forms Polylang example integration
<?php
/**
* Plugin Name: Caldera Forms Polylang
* Version: 0.1
* Author: Andrei Mondoc
*/
// register form and field translatable strings
add_action( 'admin_init', function() {
<?php
// register civicrm magic tags
add_filter( 'caldera_forms_get_magic_tags', 'set_civicrm_magic_tags', 1, 30 );
// do civicrm magic tags
add_filter('caldera_forms_do_magic_tag', 'do_civicrm_magic_tags', 10, 2);
function set_civicrm_magic_tags( $tags ){
$civicrm_tags = array(
'website_type_id'
<?php
/*
Plugin Name: Instrument Hooks for WordPress
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook.
Version: 0.1
Author: Mike Schinkel
Author URI: http://mikeschinkel.com
*/
if (isset($_GET['instrument']) && $_GET['instrument']=='hooks') {