pko
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
It works for me with :
if ( (is_preview() || is_admin()) && !(defined('DOING_AJAX') && DOING_AJAX) ) { return $text; }My problem was with sharing_display and not Jetpack_Likes (my bad :/).
In Ajax context sharing_display return nothing because of this code :
if ( is_preview() || is_admin() ) { return $text; }in /jetpack/modules/sharedaddy/sharing-service.php
I think that the is_admin() return true because of admin-ajax.php.
Done !
Thank’s a lot 🙂Thank’s for your reply.
It seems that the Jetpack_Likes isn’t loaded at all.
If I do “$custom_likes = new Jetpack_Likes;” without doing class_exists before I’ve got this error : “Fatal error: Class ‘Jetpack_Likes’ not found”.I tried to require likes scripts :
require_once('../wp-content/plugins/jetpack/modules/likes.php');With this, the error disappear, but the buttons don’t shows.
Maybe I must call some jetpack hooks …
Viewing 4 replies - 1 through 4 (of 4 total)