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 wcd_choose_gravity_forms( $field ) { | |
$field['choices'] = array(); | |
$forms = GFAPI::get_forms(); | |
foreach ( $forms as $form ) { | |
$title = $form['title']; | |
$field['choices'][ $title ] = $title; | |
} |
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('gform_field_content', function ($field_content, $field) { | |
$fieldtype = $field['type']; | |
if( $fieldtype == 'text' || $fieldtype == 'email' || $fieldtype == 'number' || $fieldtype == 'phone' ) { | |
$readonlySupport = 'true'; | |
} else { | |
$readonlySupport = '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
<?php | |
function gp_add_woo_categories_to_menu($items, $args) | |
{ | |
if ($args->theme_location == 'primary') { | |
$cat_args = array( | |
'orderby' => 'name', | |
'order' => 'asc', | |
'hide_empty' => true, |
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 | |
/* Template Name: Category Template */ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
get_header(); ?> | |
<div id="primary" <?php generate_do_element_classes( 'content' ); ?>> |
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
/** Add SVG support first **/ | |
function wcd_add_svg_support($file_types){ | |
$new_filetypes = array(); | |
$new_filetypes['svg'] = 'image/svg+xml'; | |
$file_types = array_merge($file_types, $new_filetypes ); | |
return $file_types; | |
} | |
add_action('upload_mimes', 'wcd_add_svg_support'); | |
/* |
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 get_header(); ?> | |
<div id="content" role="main"> | |
<?php | |
// get the current term | |
$term = get_queried_object(); | |
// taxonomy to check against |
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
'use strict'; | |
( function( $ ) { | |
$( function() { | |
woocommerce_add_to_cart_and_update(); | |
$( document.body ).on( 'updated_cart_totals', function() { | |
woocommerce_add_to_cart_and_update(); | |
} ); |
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 iodine_is_active() { | |
if ( !class_exists('Iodine_Plugin') ) { | |
?> | |
<div class="notice notice-error is-dismissible"> | |
<p> | |
<a target="_blank" | |
href="https://github.com/saltnpixels/Iodine"> <?php _e( 'This theme works best with iodine installed!!', 'digipress' ); ?></a> | |
</p> |