Skip to content

Instantly share code, notes, and snippets.

View DevinWalker's full-sized avatar
🌱
Coding for good

Devin Walker DevinWalker

🌱
Coding for good
View GitHub Profile
@drrobotnik
drrobotnik / gist:293f9aafd03bc7b51506
Last active August 29, 2015 14:23
remove wp_rollback for certain cases
<?php
// Untested Gist
function remove_wp_rollback() {
if( class_exists( 'WP_Rollback' ) ) :
if( ! current_user_can( 'invented_cap' ) ) :
remove_action( 'plugins_loaded', array( 'WP_Rollback', 'load_textdomain' ) );
//Admin
remove_action( 'admin_enqueue_scripts', array( 'WP_Rollback', 'scripts' ) );
remove_action( 'admin_menu', array( 'WP_Rollback', 'admin_menu' ), 20 );
@tomazzaman
tomazzaman / README.md
Last active March 31, 2021 06:30
Simple WordPress Optin form with CURL support

Simple Optin form example for WordPress

This is a simplified showcase of how you can easily build your own Optin form in WordPress.

It can connect to any API that supports cURL (most of them do). There is no error reporting implemented. It uses exit intent detection script called Ouibounce, which needs to be enqueued in your functions.php

See the tutorial here: How to build your own WordPress email form

@dwilliamson
dwilliamson / gist:e9b1ba3c684162c5a931
Last active December 20, 2021 19:38
Workflow for using git subtree on Windows
To include a library as a subtree, follow these steps:
1. Add the project as a remote
git remote add <remote-name> <source-repo>
2. Fetch the remote
git fetch <remote-name>
3. Add the project
git subtree add --prefix "path/to/project" <remote-name> <remote-branch-name> --squash
@DevinWalker
DevinWalker / remove-rev-slider-metabox.php
Created May 14, 2014 20:32
This code removed the Revolution Slider metabox on pages, posts and CTPs
/**
* Remove Rev Slider Metabox
*/
if ( is_admin() ) {
function remove_revolution_slider_meta_boxes() {
remove_meta_box( 'mymetabox_revslider_0', 'page', 'normal' );
remove_meta_box( 'mymetabox_revslider_0', 'post', 'normal' );
remove_meta_box( 'mymetabox_revslider_0', 'YOUR_CUSTOM_POST_TYPE', 'normal' );
}
@DevinWalker
DevinWalker / Gravity-Form-Base-Styles.css
Last active February 25, 2018 14:50
Styles to help frontend development of Gravity Forms with the plugin's CSS turned off.
/* ==========================================================================
Gravity Forms
========================================================================== */
ul.gform_fields {
padding: 0;
margin: 0;
}
.gform_fields, .content .gform_fields {
<?php
/*
Plugin Name: Easy Digital Downloads - Variable Pricing License Activation Limits
Plugin URL: http://easydigitaldownloads.com/extension/
Description: Limit the number of license activations permitted based on variable prices. This plugin has not been published officially yet. The plugin author gave this codes in a support ticket. So don't rellay on it completely.
Version: 1.1
Author: Pippin Williamson
Author URI: http://pippinsplugins.com
Contributors: mordauk , oneTarek
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 7, 2024 09:29
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@webaware
webaware / gist:6260468
Last active June 6, 2023 18:00
WooCommerce purchase page add-to-cart with quantity and AJAX, without customising any templates. See blog post for details: http://snippets.webaware.com.au/snippets/woocommerce-add-to-cart-with-quantity-and-ajax/
<?php
/**
* start the customisation
*/
function custom_woo_before_shop_link() {
add_filter('woocommerce_loop_add_to_cart_link', 'custom_woo_loop_add_to_cart_link', 10, 2);
add_action('woocommerce_after_shop_loop', 'custom_woo_after_shop_loop');
}
add_action('woocommerce_before_shop_loop', 'custom_woo_before_shop_link');
@dougedgington
dougedgington / functions.php
Last active December 20, 2015 12:59
Force SSL on Woocommerce pages and two additional custom pages
<?php
/*
Author: Doug Edgington
Description: modified version of Woocomemrce SSL functionality, forces ssl on Woocommerce pages and two additional custom pages
*/
function dee_ssl_template_redirect() {
if ( ! is_ssl() ) {
if ( is_checkout() || is_account_page() || is_page(48) || is_page(64) ) {
@jdevalk
jdevalk / .htaccess
Last active November 28, 2023 20:28
These three files together form an affiliate link redirect script.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
</IfModule>