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 | |
// Enqueue Font Awesome 5 in WordPress | |
function tme_load_font_awesome() { | |
// You can find the current URL for the latest version here: https://fontawesome.com/start | |
wp_enqueue_style( 'font-awesome-free', '//use.fontawesome.com/releases/v5.6.3/css/all.css' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'tme_load_font_awesome' ); |
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 | |
// Add prefix to Search & Filter Option Labels | |
function filter_input_object($input_object, $sfid) { | |
//* Exclude all non-targeted fields | |
if(($input_object['name']!='_sft_field_name')) { | |
return $input_object; | |
} | |
//* Exclude fields without options | |
if(!isset($input_object['options'])) { |
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 | |
function filter_input_object($input_object, $sfid) | |
{ | |
//ensure we are only filtering the correct field name - in this case the field we want to filter has the name `_sfm_colours` | |
//we also want to make sure its a `select` input type we're filtering | |
if(($input_object['name']!='_sfm_colours')||($input_object['type']!='select')) | |
{ | |
return $input_object; | |
} | |
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
<!-- Facebook Custom Audience Pixel Code - Placed on Every Page of Site --> | |
<script> | |
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; | |
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; | |
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, | |
document,'script','//connect.facebook.net/en_US/fbevents.js'); | |
fbq('init', '{{facebook pixel}}'); | |
fbq('track', 'PageView'); | |
</script> |
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 | |
// Update Allowed Blocks in Newsletter Glue | |
function add_custom_allowed_blocks( $blocks ) { | |
// Add your custom block to the array | |
$blocks[] = 'acf/my-block'; // Change to your block's actual name. Use hyphens instead of underscores. | |
return $blocks; // Return modified array | |
} | |
add_filter( 'newsletterglue_allowed_block_list', 'add_custom_allowed_blocks', 10 ); |
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 | |
// Edit the address and name below | |
add_filter( 'wp_mail_from', function ( $original_email_address ) { | |
return 'your.email@example.com'; | |
} ); | |
// Change the From name. | |
add_filter( 'wp_mail_from_name', function ( $original_email_from ) { | |
return 'Your Name'; |
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 | |
// Add Google Tag Manager code in <head> | |
add_action( 'wp_head', 'm3_google_tag_manager_head' ); | |
function m3_google_tag_manager_head() { ?> | |
<!-- Google Tag Manager --> | |
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); |
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
<?p | |
// Disable WordPress Core Update Notifications | |
add_filter( 'auto_core_update_send_email', 'tme_stop_auto_update_emails', 10, 4 ); | |
function tme_stop_update_emails( $send, $type, $core_update, $result ) { | |
if ( ! empty( $type ) && $type == 'success' ) { | |
return false; | |
} | |
return true; | |
} |
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
http://rpc.pingomatic.com | |
https://rpc.pingomatic.com/ | |
http://api.feedster.com/ping | |
http://api.moreover.com/ping | |
http://api.moreover.com/RPC2 | |
http://bblog.com/ping.php | |
http://blo.gs/ping.php | |
http://blog.goo.ne.jp/XMLRPC | |
http://blogs.yandex.ru/ | |
http://blogsearch.google.ae/ping/RPC2 |
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: Login Status Body Class | |
* Plugin URI: https://gist.github.com/danielmcclure/31463eb8c72316b21154f45483ad6777 | |
* Description: Adds logged-in or logged-out class to body tag depending on login status. | |
* Version: 1.0.0 | |
* Author: danielmcclure | |
* Author URI: https://danielmcclure.com/ | |
* License: GPL-2.0+ |
NewerOlder