Skip to content

Instantly share code, notes, and snippets.

View CapWebSolutions's full-sized avatar

Matt Ryan CapWebSolutions

View GitHub Profile
@CapWebSolutions
CapWebSolutions / allow-html-tags-in-widget-title.php
Created February 14, 2017 17:20
Allow HTML tags in widget title
<?php
// Allow HTML tags in Widget title
remove_filter( 'widget_title', 'strip_tags' );
remove_filter( 'widget_title', 'esc_html' );
add_filter( 'widget_title', 'html_widget_title' );
function html_widget_title( $var) {
$var = (str_replace( '[', '<', $var ));
$var = (str_replace( ']', '>', $var ));
@CapWebSolutions
CapWebSolutions / cap-web-plugin-header.php
Created February 14, 2017 17:24
Plugin file header
/**
* Plugin Name
*
* @package PluginPackage
* @author Cap Web Solutions|Matt Ryan
* @copyright 2017 Matt Ryan
* @license GPL-2.0+
*
* @wordpress-plugin
* Plugin Name: Plugin Name
@CapWebSolutions
CapWebSolutions / fix-gravity-form-tabindex-conflicts.php
Created February 14, 2017 17:24
Fix Gravity Forms TabIndex Conflicts
<?php
/**
* Fix Gravity Form Tabindex Conflicts
* http://gravitywiz.com/fix-gravity-form-tabindex-conflicts/
*/
add_filter( 'gform_tabindex', 'gform_tabindexer', 10, 2 );
function gform_tabindexer( $tab_index, $form = false ) {
$starting_index = 1000; // if you need a higher tabindex, update this number
if( $form )
add_filter( 'gform_tabindex_' . $form['id'], 'gform_tabindexer' );
@CapWebSolutions
CapWebSolutions / gravity-forms-field-label-visibility.php
Created February 14, 2017 17:25
Gravity Forms Field Label Visibility
<?php
//* Enable Gravity Forms Field Label Visibility - adde to functions.php or core functionality plugin
add_filter( 'gform_enable_field_label_visibility_settings', '__return_true' );
@CapWebSolutions
CapWebSolutions / update-wp-config.php
Last active February 17, 2017 13:55
Turn off iThemes security inactive user notices
define('ITSEC_DISABLE_INACTIVE_USER_CHECK', true); // turn off iThemes security inactive user notices
<?php
/**
* Plugin Name: WooCommerce Stock Report Exporter
* Plugin URI: http://www.capwebsolutions.com
* Description: A custom stock report exporter plugin for WooCommerce
* Version: 2.0.0
* Author: Cap Web Solutions | Matt Ryan
* Author URI: http://www.capwebsolutions.com
* License: GPL2
* Forked from https://gist.github.com/greenhornet79/74107d429dbf229a2435
@CapWebSolutions
CapWebSolutions / add-featured-image-no-customizer.php
Last active July 18, 2017 16:23
Add Featured Image at top of Single Post/Page in Genesis
@CapWebSolutions
CapWebSolutions / featured image in rss
Created August 23, 2017 15:09
Display assigned featured image in RSS feed.
@CapWebSolutions
CapWebSolutions / gist:e0895cd576a470b02e88723c5a903ef3
Created February 14, 2017 17:19
Force iThemes sync to show
/wp-admin/plugins.php?ithemes-sync-force-display=1
@CapWebSolutions
CapWebSolutions / gist:edbb26f9e64fe10d1d31695dd5e64a9f
Created September 11, 2017 20:00
Enable WooCommerce Product Gallery Features
// Disabling gallery features
// This new gallery is off by default for custom and 3rd party themes since it's common to disable the WooCommerce gallery
// and replace with your own. To enable the gallery, you can declare support like this
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
// You do not have to support all 3; you can pick and choose.
// If a feature is not supported, the scripts will not be loaded and the gallery code will not execute on product pages.