Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Could you let me know the exact changes you’ve made to your theme?

    Thanks!

    Thread Starter BrunoAmaral

    (@brunoamaral)

    @jeremy, even better, the source code is hosted in github ??

    https://github.com/brunoamaral/adp

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    I just sent you a pull request. Could you have a look at it and let me know if it helps?

    Thread Starter BrunoAmaral

    (@brunoamaral)

    This is quite strange. I had tried that exact line of code and it wasn’t working.

    Right now it all seems to be in order, thank you ! ??

    Thread Starter BrunoAmaral

    (@brunoamaral)

    @jeremy, I figured out what the issue was.

    At my development server Jetpack was not linked to wordpress.com, as a result the class for Jetpack Likes wasn’t loaded.

    I added a sanity check to your code to make sure this doesn’t break the theme.

    if (class_exists('Jetpack_Likes') {
    }

    Thank you again for your help. ??

    Thread Starter BrunoAmaral

    (@brunoamaral)

    After upgrading to Jetpack 2.5 this solution no longer works. At least not in this particular case.

    I am trying to figure out what exactly changed between 2.4.2. and 2.5 since the class names and hooks used seem to have stayed the same.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Thanks for the report! I’ll look into it and let you know as soon as I have a solution.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    We found the issue, and we updated the blog post accordingly: you will now need to use the following code to remove sharing buttons and Likes from the bottom of your posts:

    function jptweak_remove_share() {
        remove_filter( 'the_content', 'sharing_display',19 );
        remove_filter( 'the_excerpt', 'sharing_display',19 );
        remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
    }
    
    add_action( 'loop_start', 'jptweak_remove_share' );
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Class Jetpack_Likes not found’ is closed to new replies.