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
// put uploaded files into filetype based directories | |
add_filter('wp_handle_upload_prefilter', 'wpse_25894_handle_upload_prefilter'); | |
add_filter('wp_handle_upload', 'wpse_25894_handle_upload'); | |
function wpse_25894_handle_upload_prefilter( $file ) | |
{ | |
add_filter('upload_dir', 'wpse_25894_custom_upload_dir'); | |
return $file; | |
} |
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 | |
/* | |
* Hides QR codes from the Email/Tickets sent to purchasers | |
* No longer needed as of https://theeventscalendar.com/maintenance-release-for-the-week-of-27-may-2018/ | |
*/ | |
function tribe_neuter_qr () { | |
if ( class_exists( 'Tribe__Tickets_Plus__Main' ) ) { | |
$qr_class = Tribe__Tickets_Plus__Main::instance()->qr(); | |
remove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( $qr_class, 'inject_qr' ) ); |
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: Programmatically add Gravity Forms | |
Plugin URI: https://daan.kortenba.ch/programmatically-add-gravity-forms/ | |
Description: Programmatically add persistent Gravity Forms forms. | |
Author: Daan Kortenbach | |
Version: 0.1 | |
Author URI: https://daan.kortenba.ch/ | |
License: GPLv2 or later | |
*/ |
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 | |
// from https://gist.github.com/cliffordp/0d5718a259c0cf09df6c07dd1b9607eb/ | |
// as of version 4.3 | |
// by Brook 2016-10-19 | |
// for https://theeventscalendar.com/support/forums/topic/unlink-venue-and-organizer/ | |
// does NOT use tribe_get_venue_website_link or tribe_get_organizer_website_link filters | |
/** | |
* Remove the frontend link to the venue page when Pro is active. |
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
<head> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript" src="http://vera183.its.monash.edu.au/static/js/lib/jquery-1.7.1.min.ddb84c158728.js"></script> | |
<script type="text/javascript"> | |
google.load("visualization", "1", {packages:["corechart"]}); | |
google.setOnLoadCallback(drawChart); | |
function drawChart() { | |
var jsonData = $.ajax({ |
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: A faster load_textdomain | |
Version: 0.0.1 | |
Description: While we're wating for https://core.trac.wordpress.org/ticket/32052. | |
Author: Per Soderlind | |
Author URI: https://soderlind.no | |
Plugin URI: https://gist.github.com/soderlind/610a9b24dbf95a678c3e | |
@link https://bjornjohansen.no/wordpress-translations-loading-time | |
License: GPL |
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: Private Debug Log | |
Description: Enable debug log to a private folder not accessible from the web | |
Version: 0.0.1 | |
Author: WebAware | |
Author URI: http://www.webaware.com.au/ | |
*/ | |
/* |
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 | |
// Forked from gist linked at https://docs.gravityview.co/article/311-gravityview-capabilities | |
/** | |
* Modify whether an user has access to edit a specific View. | |
* | |
* @see https://codex.wordpress.org/Plugin_API/Filter_Reference/user_has_cap | |
* | |
* @param array $allcaps All the capabilities of the user |
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
// Gravity Forms Dynamic Redirect | |
add_filter( 'gform_confirmation', 'dlm_gf_dynamic_redirect', 10, 4 ); | |
function dlm_gf_dynamic_redirect( $confirmation, $form, $entry, $ajax ) { | |
// DLM GF Handler | |
$dlm_gf_handler = new DLM_GF_Gravity_Forms_Handler(); | |
// fetch download ID dynamically from form | |
$lead_id = $dlm_gf_handler->get_lead_index_of_dlm_field( $form ); |
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 | |
/** | |
* The WordPress Meme Shortcode admin page. | |
* | |
* @author Carl Alexander | |
*/ | |
class WPMemeShortcode_AdminPage | |
{ | |
/** |