This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 ID of the lists you want to add a user to | |
| $list_ids = array( 1 ); | |
| // User Data without the custom fields | |
| $data_subscriber = array( | |
| 'user' => array( | |
| 'email' => '[email protected]', | |
| 'firstname' => 'John', | |
| 'lastname' => 'Doe', |
This file contains hidden or 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 hidden or 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 hidden or 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 | |
| ); |