Skip to content

Instantly share code, notes, and snippets.

View Twanneman's full-sized avatar

Twanneman Twanneman

View GitHub Profile
@Twanneman
Twanneman / README.md
Created February 13, 2019 08:27
SCRIPT-8
@Twanneman
Twanneman / GF_disable_notifications.php
Created November 11, 2017 14:21
GF disable notifications
// disable notifications
function send_notification ( $event, $form, $lead ) {
$notifications = GFCommon::get_notifications_to_send( $event, $form, $lead );
$notifications_to_send = array();
//running through filters that disable form submission notifications
foreach ( $notifications as $notification ) {
if ( apply_filters( "gform_disable_notification_{$form['id']}", apply_filters( 'gform_disable_notification', false, $notification, $form, $lead ), $notification, $form, $lead ) ) {
//skip notifications if it has been disabled by a hook
continue;
}
@Twanneman
Twanneman / gravity_form_elements.xml
Created December 9, 2016 16:00 — forked from BronsonQuick/gravity_form_elements.xml
If you're using your own Gravity Forms CSS styling then import this xml file into your WordPress site to see if you've styled all of the Gravity Form fields and labels correctly.
<?xml version="1.0" encoding="UTF-8"?>
<forms version="1.6.12">
<form labelPlacement="top_label" useCurrentUserAsAuthor="1">
<title><![CDATA[GF Form 1 Test - Top aligned labels, Descriptions below inputs]]></title>
<description><![CDATA[We would love to hear from you! Please fill out this form and we will get in touch with you shortly.]]></description>
<confirmation type="message">
<message><![CDATA[Thanks for contacting us! We will get in touch with you shortly.]]></message>
</confirmation>
<button type="text">
<text><![CDATA[Submit]]></text>
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
#!/bin/sh
cd DEV_DIRECTORY_HERE
wget http://wordpress.org/latest.tar.gz
tar -zvxf latest.tar.gz
printf "What would you like to name your new WordPress directory (i.e. mywpdir)? "
read NEWDIR
mv -f wordpress $NEWDIR
cd $NEWDIR
cd wp-content
mkdir upgrade
#!/bin/sh
cd [YOUR-INSTALL-DIR]
wget http://wordpress.org/latest.tar.gz
tar -zvxf latest.tar.gz
printf "What's the name of the install? "
read NEWDIR
mv -f wordpress $NEWDIR
cd $NEWDIR
cd wp-content
#!/bin/sh
cd ../your/staging/location
echo -e "\033[32m Downloading WordPress... "
echo -e "\033[0m"
printf "De url van deze site is: your/staging/location/..."
read NEWDIR
mkdir $NEWDIR
@Twanneman
Twanneman / 0_reuse_code.js
Created October 21, 2013 13:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console