I hereby claim:
- I am davidcramer on github.
- I am davidcramer (https://keybase.io/davidcramer) on keybase.
- I have a public key ASAQ5m0_eJRy0MBoYiwDFcnQcE2Y9QAAvy1SW8RR84IXggo
To claim this, I am signing this object:
<?php | |
add_filter( 'cloudinary_upload_options', function( $options, $attachment_post, $upload_object ){ | |
/** | |
* Structure of options as follows: | |
$options = array( | |
'unique_filename' => false, // Allow for auto filenames. See Cloudinary docs. | |
'resource_type' => $resource_type, // Type can be 'image' or 'video' or custom. | |
'public_id' => $public_id, // Changing this will change the public ID as stored in Cloudinary. |
<?php | |
// Simple snippet to show how to use Foundation's grid over the built in Bootstrap grid. | |
add_filter('caldera_forms_render_grid_settings', 'setup_foundation_grid', 10, 2); | |
function setup_foundation_grid($grid, $form){ | |
// Bootstrap grid sized to foundation equivilents | |
$grid_sizes = array( | |
'xs' => 'small', | |
'sm' => 'small', |
<?php | |
/* | |
* Plugin Name: Cron Daemon | |
* Plugin URI: https://cramer.co.za | |
* Description: Simple plugin to daemonize the WordPress Cron. | |
* Version: 1.0.0 | |
* Author: David Cramer | |
* Author URI: https://cramer.co.za | |
* License: GPL2+ | |
*/ |
<?php | |
/** | |
* Plugin Name: CF Get Submission Data | |
* Plugin URI: | |
* Description: Example in getting submission data in a form processor | |
* Version: 1.0.0 | |
* Author: David Cramer | |
* Author URI: | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
<?php | |
// add the below code to your child themes functions.php file. | |
add_filter( 'facetwp_assets', function( $assets ) { | |
?> | |
<script> | |
(function($) { | |
$(document).on('facetwp-loaded', function() { | |
$('.product').magnificPopup({ |
I hereby claim:
To claim this, I am signing this object:
<?php | |
/* Example to auto populate an option based field in caldera forms | |
* This example uses a by slug. method. this way you can populate the | |
* field by simply giving it the desired slug. in this example: gdp | |
* | |
* To populate based on type where {type} is dropdown, radio, checkbox etc... | |
* add_filter('caldera_forms_render_get_field_type-{type}', 'cf_get_data_json'); | |
*/ | |
// Add filter on the fetch field config to populate |
<?php | |
add_filter( 'facetwp_facet_html', function( $output, $params ) { | |
if ( 'my_facet' == $params['facet']['name'] ) { | |
$output = ''; | |
$values = (array) $params['values']; | |
$selected_values = (array) $params['selected_values']; | |
foreach( $values as $result ){ | |
$clean_val = esc_attr( $result ); | |
$selected = in_array( $result['facet_value'], $selected_values ) ? ' checked' : ''; |
<?php | |
// add this to your child themes functions.php file | |
add_filter( 'facetwp_map_init_args', function ( $args ) { | |
$args['scrollwheel'] = false; | |
return $args; | |
} ); |
<?php | |
$module_id = 0; // change this to the ID of your saved module. | |
FLBuilder::enqueue_layout_styles_scripts_by_id( $module_id ); | |
FLBuilder::render_content_by_id( $module_id ); | |
?> |