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 | |
//* Attaching file to the form notification user email | |
//* in gform_notification_7, the number 7 is the FORM ID | |
//* This snippet works with the newer version of Gravity Forms too | |
add_filter('gform_notification_7', 'add_attachment_pdf', 10, 3); //target form id 7, change to your form id | |
function add_attachment_pdf( $notification, $form, $entry ) { | |
//There is no concept of user notifications anymore, so we will need to target notifications based on other criteria, | |
//such as name or subject | |
if($notification["name"] == "User Notification - Life Lesson"){ | |
//get upload root for WordPress |
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 | |
/* | |
Plugin Name: Toggle Debug | |
Description: Proof-of-concept for an admin-bar debug mode toggle. Needs some UX love. | |
*/ | |
/* | |
// In wp-config.php, wrap debug constants in a cookie conditional | |
if ( isset( $_COOKIE['wp-debug'] ) && $_COOKIE['wp-debug'] == 'on' ) { | |
define('WP_DEBUG', 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
/** | |
* SVG Fixer | |
* | |
* Fixes references to inline SVG elements when the <base> tag is in use. | |
* Firefox won't display SVG icons referenced with | |
* `<svg><use xlink:href="#id-of-icon-def"></use></svg>` when the <base> tag is on the page. | |
* | |
* More info: | |
* - http://stackoverflow.com/a/18265336/796152 | |
* - http://www.w3.org/TR/SVG/linking.html |
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 | |
/** | |
* This little class records how long it takes each WordPress action or filter | |
* to execute which gives a good indicator of what hooks are being slow. | |
* You can then debug those hooks to see what hooked functions are causing problems. | |
* | |
* This class does NOT time the core WordPress code that is being run between hooks. | |
* You could use similar code to this that doesn't have an end processor to do that. | |
* |
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
<!-- | |
`-/+osssssssssssso+/-` | |
./oys+:.` `.:+syo/. | |
.+ys:. .:/osyyhhhhyyso/:. ./sy+. | |
/ys: -+ydmmmmmmmmmmmmmmmmmmdy+- :sy/ | |
/h+` -odmmmmmmmmmmmmmmmmmmmmmmmmmmdo- `+h/ | |
:ho` /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmds/ `oh: | |
`sy. /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmd+ .ys` | |
.ho `sdddhhhyhmmmdyyhhhdddddhhhyydmmmmy oh. |
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 # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: T5 Fresh Editor Stylesheets | |
* Description: Enforces fresh editor stylesheets per version parameter. | |
* Version: 2012.08.09 | |
* Author: Thomas Scholz | |
* Plugin URI: http://toscho.de/?p=1965 | |
* Author URI: http://toscho.de | |
* License: MIT | |
* License URI: http://www.opensource.org/licenses/mit-license.php |
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 the following to your theme's functions.php | |
add_filter( 'tribe_ical_properties', 'tribe_ical_outlook_modify', 10, 2 ); | |
function tribe_ical_outlook_modify( $content ) { | |
$properties = preg_split ( '/$\R?^/m', $content ); | |
$searchValue = "X-WR-CALNAME"; | |
$fl_array = preg_grep('/^' . "$searchValue" . '.*/', $properties); | |
$key = array_values($fl_array); | |
$keynum = key($fl_array); |
NewerOlder