Skip to content

Instantly share code, notes, and snippets.

@tokkonopapa
Last active February 18, 2017 19:30
Show Gist options
  • Save tokkonopapa/e7421a5203a3c9fde863c9175f824e1b to your computer and use it in GitHub Desktop.
Save tokkonopapa/e7421a5203a3c9fde863c9175f824e1b to your computer and use it in GitHub Desktop.
like button for theme belle
<?php
/**
* Add action for like button of theme 'belle' to IP Geo Block whitelist
*
* @link http://themecanon.com/belle/
*/
function my_ip_geo_block_bypass_admins( $list ) {
$whitelist = array(
'like_post',
);
return array_merge( $list, $whitelist );
}
add_filter( 'ip-geo-block-bypass-admins', 'my_ip_geo_block_bypass_admins' );
@tokkonopapa
Copy link
Author

https://wordpress.org/support/topic/like-button-not-working-on-pos

How to use:

  • When you select "init" action hook as "Validation timing" in "Validation rule settings" section, copy this code (without <?php) and paste it into your theme's functions.php.

  • When you select "mu-plugins" (ip-geo-block-mu.php), save this code as a file named drop-in.php and upload it to wp-content/ip-geo-api/ where the geolocation APIs of IP Geo Block are placed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment