This file contains hidden or 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 support for custom color palettes in Gutenberg. | |
*/ | |
function meta13_gutenberg_color_palette() | |
{ | |
add_theme_support( | |
'editor-color-palette', | |
array( | |
array( |
This file contains hidden or 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 | |
// Remove iPad from wp_is_mobile check | |
function my_wp_is_mobile() | |
{ | |
static $is_mobile; | |
if (isset($is_mobile)) { | |
return $is_mobile; | |
} |
This file contains hidden or 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 | |
// Simple script used to touch/update post meta that was used in an Advanced Custom Fields select field that didn't have the reference field after an import of data thorugh a CSV. Running this script was enough to get the admin to dispaly the correct state that was already in the database. | |
require 'wp-config.php'; | |
$things = get_posts(array('numberposts' => -1, 'post_type' => 'things')); // Change 'things' to the name of your post type | |
if (!$things) { | |
echo 'No Posts'; | |
exit; | |
} | |
foreach ($things as $thing) { | |
update_post_meta($thing->ID, "state", 'MN'); // 'state' was the name of the custom post meta ACF field. |
This file contains hidden or 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
UPDATE wp_posts SET post_content = replace(replace(replace(post_content, '“', '"'), '”', '"'), '’', ''''); |
This file contains hidden or 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('be_subpages_widget_args', 'bgcmn_subpages_widget_args'); | |
/** | |
* Exclude page from Subpages Widget. | |
* | |
* @param array $args Array of arguments. | |
* @param array Modified array of arguments for get_pages(). | |
*/ | |
function bgcmn_subpages_widget_args($args) | |
{ |
This file contains hidden or 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
<script type="text/javascript"> | |
// Add the following to an HTML block on your form | |
gform.addFilter( 'gform_datepicker_options_pre_init', function( optionsObj, formId, fieldId ) { | |
if ( formId == 7 && fieldId == 220, 226, 243, 282, 290, 298, 348, 356, 364, 414, 422, 430 ) { | |
optionsObj.minDate = '+2'; // No letter for days | |
optionsObj.maxDate = '+1 Y'; // M for month, Y for years | |
} | |
return optionsObj; | |
} ); |
This file contains hidden or 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('gform_authorizenet_transaction_pre_capture', 'bgcmn_kidstop_auth', 10, 5); | |
function bgcmn_kidstop_auth($transaction, $form_data, $config, $form, $entry) | |
{ | |
// GFCommon::log_debug(__METHOD__ . "(): Entry => " . print_r($entry, true)); | |
// error_log(print_r($transaction, true)); | |
if ($form['id'] == 7) { |
This file contains hidden or 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 | |
// Functions for apending form name to authorize.net invoice | |
add_filter('gform_authorizenet_transaction_pre_capture', 'add_custom_field', 10, 5); | |
function add_custom_field($transaction, $form_data, $config, $form, $entry) | |
{ | |
if ($form['id'] == 3) { | |
$donation_type = rgar($entry, '6'); | |
$honor_memory = rgar($entry, '10'); |
This file contains hidden or 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
<div id="loader"> | |
<div class="spinner"></div> | |
</div> |