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 | |
/** | |
* Remove MailPoet Action on the Unsubscribe page `the_content` | |
*/ | |
add_action( 'init', '__mailpoet_unsubscribe_page' ); | |
function __mailpoet_unsubscribe_page() { | |
if ( class_exists( 'WYSIJA_help_front' ) && ! is_admin() && isset( $_REQUEST['action'] ) && $_REQUEST['action'] === 'subscribe' ) { | |
$front_helper = WYSIJA::get('front','helper'); |
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 | |
/** | |
* Print MailPoet's Widget without having a Sidebar | |
* | |
* Reference: http://codex.wordpress.org/Function_Reference/the_widget | |
*/ | |
the_widget( | |
'WYSIJA_NL_Widget', // Name of the widget | |
array( // Variables that will configure the Widget | |
'title' => 'Subscribe to our Newsletter', |
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 | |
/** | |
* Ref: http://stackoverflow.com/questions/7683133/does-php-have-a-feature-like-pythons-template-strings | |
*/ | |
class Helper_StringFormat { | |
public static function sprintf($format, array $args = array()) { | |
$arg_nums = array_slice(array_flip(array_keys(array(0 => 0) + $args)), 1); |
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
$.ajax({ | |
'url': ajaxurl, | |
'data': { | |
'action': data.crop_action, | |
'crop': data.crop, | |
'attachment': data.$.return.val() | |
}, | |
'dataType': 'json', | |
'type': 'POST', | |
'success': function (response, textStatus, jqXHR){ |
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
import requests | |
import subprocess | |
import json | |
import sys | |
import threading | |
import time | |
from Queue import Queue | |
numberOfViewers = int(sys.argv[1]) | |
builderThreads = int(sys.argv[2]) |
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 | |
/* | |
* If you already have something in your functions.php, please remove these first few lines | |
*/ | |
add_filter( 'tribe_google_calendar_parameters', 'tec_hook_938252', 11 ); | |
function tec_hook_938252( $params ){ | |
// Since in our code we urlencode you need to first urldecode before doing anything | |
$params['details'] = urlencode( strip_tags( urldecode( $params['details'] ) ) ); |
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 | |
/* | |
* Open your Functions.php file | |
* On your `nectar_register_js` function after the `wp_register_script` for the `nectarFrontend`, you will append the following code | |
*/ | |
$js_config_array = array( | |
'permalink_settings' => get_option( 'permalink_structure' ), | |
'events_post_type' => TribeEvents::POSTTYPE | |
); |
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 | |
/* | |
* If you already have something in your functions.php, please remove these first few lines | |
*/ | |
add_filter( 'tribe_event_featured_image', 'tec_forum_938271', 11, 3 ); | |
function tec_forum_938271( $featured_image, $post_id, $size ){ | |
if ( ! empty( $featured_image ) ){ | |
return $featured_image; | |
} |
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 | |
/* | |
* If you already have something in your functions.php, please remove these first few lines | |
*/ | |
// First solution - links below the organizer section | |
add_action( 'tribe_events_single_meta_organizer_section_end', array( 'TribeiCal', 'single_event_links' ) ); | |
remove_action( 'tribe_events_single_event_after_the_content', array( 'TribeiCal', 'single_event_links' ) ); | |
// Second solution - links on the right of the organizer box (after) |
OlderNewer