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 Events Calendar: Open event website, organizer, and venue links in new window. | |
* | |
* Filters are found in these files: | |
* /wp-content/plugins/the-events-calendar/src/functions/template-tags/link.php | |
* /wp-content/plugins/events-calendar-pro/src/functions/template-tags/general.php | |
* /wp-content/plugins/the-events-calendar/src/functions/template-tags/organizer.php | |
* /wp-content/plugins/the-events-calendar/src/functions/template-tags/venue.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
// EXIF data extracted using exif_read_data() PHP function from https://github.com/ianare/exif-samples/blob/master/jpg/Canon_40D.jpg | |
Array ( | |
[FileDateTime] => 0 | |
[FileSize] => 7958 | |
[FileType] => 2 | |
[MimeType] => image/jpeg | |
[SectionsFound] => ANY_TAG, IFD0, THUMBNAIL, EXIF, GPS, INTEROP | |
[COMPUTED] => Array | |
( |
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 | |
// https://gist.github.com/cliffordp/48713847d9d22511737aa74b03a891d1 This snippet. | |
// Site Title | |
add_filter( 'option_blogname', 'shortcode_unautop'); | |
add_filter( 'option_blogname', 'do_shortcode' ); | |
// Site Info when 'display' | |
add_filter( 'bloginfo', 'shortcode_unautop'); |
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 | |
/** | |
* WooCommerce: redirect initial visit to Cart to Checkout instead to discourage | |
* users being able to edit the cart's contents after adding Tickets. | |
* | |
* Useful if only using WooCommerce for Event Tickets Plus, | |
* not selling other Products. | |
* | |
* Updated 2018-01-17 to work with WooCommerce 2.5+ (released 2016-01-18). |
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 | |
/** | |
* Fix for WP Defender Masked Login not filtering wp_login_url() usage. | |
* | |
* @link https://gist.github.com/cliffordp/9468791d165d1864c39969d12100d13d This snippet. | |
*/ | |
add_filter( 'login_url', 'cliff_point_to_custom_login_slug', 999, 3 ); | |
function cliff_point_to_custom_login_slug ( $login_url, $redirect, $force_reauth ) { | |
if( class_exists( '\WP_Defender\Model\Setting\Mask_Login' ) ) { |
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 | |
/** | |
* WP Review Slider: allow shortcodes in reviews. | |
* | |
* Requires plugin version 11.5.8 or later. | |
* | |
* @link https://gist.github.com/cliffordp/14f9355ff089b871abc4d8c183014900 This snippet. | |
* @link https://r.freemius.com/646/58358/ Get the plugin. | |
*/ |
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 | |
/** | |
* ACF: render shortcodes in Message fields, except on the ACF settings screen. | |
* | |
* Does work on ACF Options pages, just not ACF Settings pages. | |
* | |
* @link https://gist.github.com/cliffordp/bef4f1c5054555991cccccb058796739 This snippet. | |
*/ | |
add_filter( 'acf/load_field', function ( array $field ) { |
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 | |
/** | |
* NotificationX plugin: Custom link location for Google Analytics sourced notifications (default is homepage). | |
* | |
* @link https://gist.github.com/cliffordp/f90a50390f51e98457512a36d02f1ef3 This snippet. | |
* | |
* @see \NotificationX\FrontEnd\FrontEnd::link_url | |
*/ | |
add_filter( 'nx_notification_link_google', function( $link, $post, $entry ){ |
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 | |
/** | |
* Redirection plugin: Add support for additional shortcodes. | |
* | |
* Adding support for: [my_shortcode] | |
* !!!You CANNOT call `do_shortcode()` within this function. Just call the shortcode's function directly. | |
* | |
* @link https://gist.github.com/cliffordp/e74f559a523259141a7e95c25a7327fa This snippet. | |
* @link https://redirection.me/support/dynamic-urls/ |
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 | |
/* | |
* Shortcode to display an edit link to each Venue (or Organizer) not used by any Event (All Events, not just Upcoming Events). Also has a scary single line of commented-out code to then DELETE all such results (they don't even end up in the Trash). You've been warned! | |
* Examples: | |
* Venues: [tribe_unused_posts] - https://cl.ly/0q441G1I3I05 | |
* same as above: [tribe_unused_posts type=venues] | |
* Venues with Debug: [tribe_unused_posts debug=true] - https://cl.ly/2v0S2z420x0U | |
* Organizers: [tribe_unused_posts type=organizers] - https://cl.ly/1H3q2o1w2o3v | |
* Organizers with Debug: [tribe_unused_posts type=organizers debug=true] - https://cl.ly/0Y2s1k1n0T0R | |
* Note: if multiple Organizers are assigned to an Event, there will be multiple _EventOrganizerID meta keys with single values, not a single _EventOrganizerID key with an array or comma-separated list of values. |