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 | |
add_filter( 'caldera_forms_submission_url', function( $url, $form_id ){ | |
if( 'CF582e6cf914f03' == $form_id ){ | |
$url = 'https://somesite.com/api'; | |
} | |
return $url; | |
}, 25, 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
<?php | |
if( !class_exists('acf') ) | |
{ | |
$tp_acf_notice_msg = __( 'This website needs "Advanced Custom Fields Pro" to run. Please download and activate it', 'tp-notice-acf' ); | |
/* | |
* Admin notice | |
*/ | |
add_action( 'admin_notices', 'tp_notice_missing_acf' ); | |
function tp_notice_missing_acf() |
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 exportSpreadsheet() { | |
//All requests must include id in the path and a format parameter | |
//https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export | |
//FORMATS WITH NO ADDITIONAL OPTIONS | |
//format=xlsx //excel | |
//format=ods //Open Document Spreadsheet | |
//format=zip //html zipped | |
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 get_all_fields($entry, $form) | |
{ | |
//only do this for a certain form (id 53 for example) | |
// if ($form["id"] == 17) | |
//{ | |
foreach($form["fields"] as &$field) | |
{ | |
//see if this is a multi-field, like name or address | |
if (is_array($field["inputs"])) |
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
// Register a custom image size for Featured Category images | |
add_image_size( 'featured-cat-image', 300, 200, true ); | |
/** | |
* Add Column Classes to Display Posts Shortcodes | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/add-column-classes-to-display-posts-shortcode | |
* | |
* Usage: [display-posts columns="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
<?php | |
/* | |
Plugin Name: Custom Caldera Forms Field | |
*/ | |
add_filter('caldera_forms_get_field_types', 'slug_add_field'); | |
function slug_add_field($fieldtypes){ | |
$fieldtypes['field_name'] = array( | |
"field" => "Field Name", |
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 add_custom_query_vars($vars) { | |
$vars[] = "past_events"; | |
return $vars; | |
} | |
// hook add_query_vars function into query_vars | |
add_filter('query_vars', 'add_custom_query_vars'); |
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 | |
global $current_user; // Use global | |
get_currentuserinfo(); // Make sure global is set, if not set it. | |
if ( user_can( $current_user, "subscriber" ) ) { | |
// Disable admin bar for subscribers | |
show_admin_bar(false); |
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
/* Author: Scott Bolinger | |
* Author URI: http://apppresser.com | |
* | |
* Styling for Display Posts Shortcode plugin for use with the AppTheme. Add this code to a child theme style.css file. | |
* Plugin information: http://www.billerickson.net/shortcode-to-display-posts/ | |
* | |
*/ | |
ul.display-posts-listing { | |
list-style-type: none; |