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 | |
add_filter( 'wp_mail', 'ltu_add_unsubscribe_links' ); | |
function ltu_add_unsubscribe_links( $args ) { | |
if ( ! class_exists( 'IW_LTU' ) ) { | |
// Let Them Unsubscribe is not active | |
return $args; | |
} | |
$email = $args['to']; |
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 | |
add_filter( 'appointments_gcal_update_event', 'appointments_hooks_gcal_update_event', 10, 2 ); | |
function appointments_hooks_gcal_update_event( $event, $appointment ) { | |
$appointments = appointments(); | |
$gcal_api = $appointments->get_gcal_api(); | |
$event = $gcal_api->appointment_to_gcal_event( $appointment->ID ); | |
return $event; | |
} |
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 | |
add_filter( 'appointments_gcal_update_event', 'app_gcal_update_event_summary', 10, 2 ); | |
function app_gcal_update_event_summary ( $event, $app ) { | |
if ( $event ) { | |
$appointments = appointments(); | |
$event->setSummary( $appointments->get_service_name( $app->service ) . ' Appointment' ); | |
} | |
return $event; | |
} |
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 | |
add_action( 'wp_footer', 'apppointmens_hacks_scripts', 20 ); | |
function apppointmens_hacks_scripts() { | |
if ( wp_script_is( 'app-shortcode-confirmation', 'enqueued' ) ) { | |
?> | |
<script> | |
( function( $ ) { | |
$(document).on("app-confirmation-response_received", function() { | |
var paypalForm = $(".appointments-paypal > form"); |
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
checkURLs: function( urls ) { | |
var percentage; | |
if ( urls.length == 0 ) { | |
finiquitado(); | |
return; | |
} | |
// Le robamos una URL a esto | |
var url = urls.shift(); |
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
add_action( 'pre_get_posts', 'order_conciertos_by_date' ); | |
function order_conciertos_by_date( $query ) { | |
if ( is_admin() ) | |
return; | |
if ( $query->get( 'post_type' ) != 'concierto' ) | |
return; | |
$today = current_time( 'timestamp' ); | |
$today = date( 'Ymd', $today ); |
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 | |
$args = array( | |
'post_type' => 'clips', | |
'ignore_sticky_posts' => true, | |
'posts_per_page' => 1, | |
'cat' => 6 | |
); | |
$clips_query = new WP_Query( $args ); |
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 | |
// This should add a new option in the form feed but it doesn't anymore because the action has dissappeared | |
add_action( 'gform_user_registration_add_option_section', 'nbt_add_blog_templates_user_registration_option', 15 ); | |
function nbt_add_blog_templates_user_registration_option( $config ) { | |
// I don't know if this would be valid in the new version | |
$multisite_options = rgar($config['meta'], 'multisite_options'); | |
$my_option = rgar( $multisite_options, 'blog_templates' ); | |
?> | |
<input type="checkbox" id="gf_user_registration_multisite_blog_templates" name="gf_user_registration_multisite_blog_templates" value="1" <?php checked( rgar( $multisite_options, 'blog_templates' ) ); ?> /> | |
<?php |
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 | |
add_action( 'network_after_site_new_form', function() { | |
$themes = wp_get_themes(); | |
?> | |
<table class="form-table"> | |
<tr class="form-field"> | |
<th scope="row"><label for="my-plugin-theme">Select your theme</label></th> | |
<td> | |
<select name="my-plugin-theme" id="my-plugin-theme"> |
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 | |
add_shortcode( 'areas', 'custom_query_shortcode' ); | |
function custom_query_shortcode( $atts ) { | |
// EXAMPLE USAGE: | |
// [areas show_posts="100" post_type="page" post_parent="246"] | |
// Defaults | |
$defaults = array( | |
"show_posts" => 100, | |
"post_type" => 'page', |