Skip to content

Instantly share code, notes, and snippets.

View deckerweb's full-sized avatar
🏠
Working from home

David Decker deckerweb

🏠
Working from home
View GitHub Profile
@deckerweb
deckerweb / plugin.php
Created September 22, 2016 14:17 — forked from logoscreative/plugin.php
Friendlier, Safer WordPress Admin Areas
<?php
/**
* "Friendlier, Safer WordPress Admin Areas"
* Presented by Cliff Seal at WordCamp Atlanta 2015 and Asheville 2016
* Slides: http://www.slideshare.net/cliffseal/wp-admin
*
* Plugin Name: A Better Admin Experience
* Plugin URI: http://evermoresites.com
* Description: Cleans up and sanitizes the WordPress admin area
* Version: 1.0
@deckerweb
deckerweb / language-updates-table.php
Created March 22, 2016 09:13 — forked from swissspidy/language-updates-table.php
Display a table with available translation updates on the WordPress update screen
<?php
/**
* Plugin Name: Translation Updates Table
*
* @author Pascal Birchler <pascal@required.ch>
* @license GPL2+
*/
/**
* Displays a table with available translation updates.
@deckerweb
deckerweb / gw-gravity-forms-change-field-id.js
Created January 26, 2016 15:57 — forked from spivurno/gw-gravity-forms-change-field-id.js
Gravity Wiz // Gravity Forms // Change Field ID via Browser Console
/**
* Gravity Wiz // Gravity Forms // Change Field ID via Browser Console
*
* Provides a simple function for changing the ID of a Gravity Forms field via the browser console from the Form Editor page.
*
* @version 1.0
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/changing-your-gravity-forms-field-ids/
* @video http://www.screencast.com/t/STm1eLZEsR9q
@deckerweb
deckerweb / wpseo-iconfix.php
Created December 3, 2015 10:22 — forked from krafit/wpseo-iconfix.php
Nachdem der Schmerz, den wpSEO-Menüpunkt ansehen zu müssen zu groß wurde, habe ich das Icon im Admin-Menü ersetzt.
if (function_exists(wpseo_autoload)) {
function krafit_repair_wpseo() {
?>
<style>
#adminmenu #toplevel_page_wpseo div.wp-menu-image img {
display: none;
}
#adminmenu #toplevel_page_wpseo div.wp-menu-image::before {
content: "\f511";
@deckerweb
deckerweb / multisite_custom_my_sites_menu_titles.php
Created November 16, 2015 08:11 — forked from glueckpress/multisite-custom-my-sites-menu-titles.php
Custom site titles for the My Sites network admin bar menu in a WordPress multisite network. Configure first function, then auto-activate by saving this file in wp-content/mu-plugins, or network activate as a regular plugin.
<?php
/**
* Plugin Name: Custom My Sites Menu Titles
* Description: Custom site titles for the My Sites network admin bar menu. Multisite only.
* Version: 2015.11
* Author: Caspar Hübinger
* Author URI: https://profiles.wordpress.org/glueckpress
* License: GNU General Public License v3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
@deckerweb
deckerweb / gist:1e17c328b5f36adfecb5
Created November 3, 2015 11:31 — forked from vanbernaert/gist:4dd1557abda08e7be90a
Gravity Forms: restrict days on datepicker
jQuery(function () {
// 0 = monday, 1 = tuesday, 2 = wednesday, 3 = thursday,
// 4=friday, 5 = saturday, 6=sunday
var daysToDisable = [2, 4, 5];
jQuery("#input_id_id").datepicker({
beforeShowDay: disableSpecificWeekDays
});
@deckerweb
deckerweb / genesis-site-title.php
Created October 6, 2015 18:33 — forked from cdils/genesis-site-title.php
Filter the Genesis SEO Title to output with a custom class.
// Filter the title with a custom function
add_filter('genesis_seo_title', 'wap_site_title' );
// Add additional custom style to site header
function wap_site_title( $title ) {
// Change $custom_title text as you wish
$custom_title = '<span class="custom-title">WA</span>Estate';
// Don't change the rest of this on down
<?php
/*
* Add custom query vars to handle Google Analytics Ecommerce tracking.
* This should be placed in a plugin or in functions.php of the theme.
*
* You'll want to use the redirect method for Gravity Forms confirmations and
* turn on passing field data via a query string. An example we used was:
* donation_amount={Donation Amount:13}&donation_id={entry_id}&donation_recurring=0
*/
function sm_add_query_vars( $vars ){
<?php
/*
* @goliver79
* woocommerce hide empty categories in woocommerce widget "product categories"
*/
function woo_hide_product_categories_widget( $list_args ){
$list_args[ 'hide_empty' ] = 1;
return $list_args;
}
/**
* to exclude field from notification add 'exclude[ID]' option to {all_fields} tag
* 'include[ID]' option includes HTML field / Section Break field description / Signature image in notification
* see http://www.gravityhelp.com/documentation/page/Merge_Tags for a list of standard options
* example: {all_fields:exclude[2,3]}
* example: {all_fields:include[6]}
* example: {all_fields:include[6],exclude[2,3]}
*/
add_filter( 'gform_merge_tag_filter', 'all_fields_extra_options', 11, 5 );
function all_fields_extra_options( $value, $merge_tag, $options, $field, $raw_value ) {