jetpack

  • #Jetpack testing session last night before dim sum.

    #Jetpack testing session last night before dim sum.

    #Jetpack testing session last night before dim sum.

  • @zinigor and @benedictsinger on the big bus. #wcus #jetpack

    @zinigor and @benedictsinger on the big bus. #wcus #jetpack

    @zinigor and @benedictsinger on the big bus. #wcus #jetpack

  • #Jetpack pit crew near the museum of art.

    #Jetpack pit crew near the museum of art.

    #Jetpack pit crew near the museum of art.

  • #Jetpack photographers doing what they do. #wcus

    #Jetpack photographers doing what they do. #wcus

    #Jetpack photographers doing what they do. #wcus

  • China Town friendship arch #wcus #Jetpack

    China Town friendship arch #wcus #Jetpack

    China Town friendship arch #wcus #Jetpack

  • These jokers don’t look as happy as me to be on top of the tour bus ? #jetpack #wcus

    These jokers don't look as happy as me to be on top of the tour bus ? #jetpack #wcus

    These jokers don’t look as happy as me to be on top of the tour bus ? #jetpack #wcus

  • #jetpack about to embark on a sightseeing tour

    #jetpack about to embark on a sightseeing tour

    #jetpack about to embark on a sightseeing tour

  • @sdquirk and @nancythanki at the #Jetpack #woocommerce booth at #wcus.

    @sdquirk and @nancythanki at the #Jetpack #woocommerce booth at #wcus.

    @sdquirk and @nancythanki at the #Jetpack #woocommerce booth at #wcus.

  • #Jetpack and guests at dinner. #travelmattic

    #Jetpack and guests at dinner. #travelmattic

    #Jetpack and guests at dinner. #travelmattic

  • Before dinner shot of #Jetpack crew in Philly. #travelmattic

    Before dinner shot of #Jetpack crew in Philly. #travelmattic

    Before dinner shot of #Jetpack crew in Philly. #travelmattic

  • Most of #Jetpack pit crew at lunch. #travelmattic

    Most of #Jetpack pit crew at lunch. #travelmattic

    Most of #Jetpack pit crew at lunch. #travelmattic

  • Tacos with Sara before the #jetpack meetup in Philly. Only way to start traveling. ?

    Tacos with Sara before the #jetpack meetup in Philly. Only way to start traveling. ?

    Tacos with Sara before the #jetpack meetup in Philly. Only way to start traveling. ?

  • How to Use Jetpack Photon for WordPress Header Image

    When doing some performance testing of the new site design, I realized that the header image wasn’t being processed by Photon.

    Since there’s a filter for almost everything in WordPress, I look around a bit and found the theme_mod_$name filter.

    
    /**
     * Filters the theme modification, or 'theme_mod', value.
     *
     * The dynamic portion of the hook name, $name, refers to
     * the key name of the modification array. For example,
     * 'header_textcolor', 'header_image', and so on depending
     * on the theme options.
     *
     * @since 2.2.0
     *
     * @param string $current_mod The value of the current theme modification.
     */
    return apply_filters( "theme_mod_{$name}", $mods[$name] );

    Using that filter, we can then modify the image source so that the image will be handled by Jetpack’s Photon.

    add_filter( 'theme_mod_header_image', 'moh_photonize_header_image' );
    function moh_photonize_header_image( $image ) {
      if ( $image && function_exists( 'jetpack_photon_url' ) ) {
        $image = jetpack_photon_url( $image );
      }
      return $image;
    }

    At this point, if you were to reload your home page and check the source for your header image, you’ll notice that the image has something like i1.wp.com in front of it. This means that our little snippet worked.

    What I haven’t yet figured out is how to properly set the width and height arguments for the image since we only have the URL and not an image attachment. ¯_(?)_/¯

  • The All-New Jetpack: Let’s See How You React

    The Jetpack UI has been completely overhauled in 4.3. Release candidate 1 dropped today, so be sure to give it a spin.

    The easiest way to test Jetpack 4.3 is to use the Jetpack Beta plugin.

    Jetpack 4.3 is coming out next week! It’s the culmination of thousands of hours of work from dozens of talented engineers and designers. The Jetpack interface has been completely rethought …

    Source: The All-New Jetpack: Let’s See How You React — Jetpack for WordPress

  • Jetpack 4.2 and 4.2.1: Performance Improvements and More

    Jetpack 4.2.1 dropped today.

    We had a rough start last week, but have since been hard at work fixing the performance issues that we had on large networks (8 Million+ users), so be sure to check out the updates for your WordPress site and get the latest version!

    While I came in late to the project, having spent the past month or two focusing on SSO for 4.1, it’s been an honor to work with my Poseidon team (Miguel Lezama, Dan Walmsley, Enej Bajgoric) to get this out the door. Many thanks to all Automatticians who also helped make this a possibility by settings up systems, testing, providing feedback, etc.

    Jetpack 4.2 and 4.2.1 brings you performance improvements along with some important security updates and enhancements to existing Jetpack modules.

    Source: Jetpack 4.2 and 4.2.1: Performance Improvements and More — Jetpack for WordPress

  • #jetpack booth is setup at #wcbos. Come see us for swag and to get any questions answered.

    #jetpack booth is setup at #wcbos. Come see us for swag and to get any questions answered.

    #jetpack booth is setup at #wcbos. Come see us for swag and to get any questions answered.

  • Come check out the #Jetpack booth at #wcbos. We have some fancy swag to give out ?

    Come check out the #Jetpack booth at #wcbos. We have some fancy swag to give out ?

    Come check out the #Jetpack booth at #wcbos. We have some fancy swag to give out ?

  • Quick stop to eat at Steak N Shake and update to the latest #jetpack ?

    Quick stop to eat at Steak N Shake and update to the latest #jetpack ?

    Quick stop to eat at Steak N Shake and update to the latest #jetpack ?

  • Jetpack 4.1: My first large contribution to Jetpack

    While I have contributed to a few Jetpack releases in the past, Jetpack 4.1 is the first release where I have contributed a significant amount of work.

    The past couple of months I have worked hard on refreshing the Single Sign On (SSO) module. SSO makes it as easy as clicking a button to log in to a self-hosted WordPress site!

    It was a fun project because I got to touch several different code bases, including: Jetpack, the WordPress.com API, Calypso (JavaScript version of WordPress.com), and the PHP parts of WordPress.com. Also, for each code base, unit tests were either created or updated.

    Personally, this was an exciting release for me, but I’m stoked for the next two releases. We have some great UI and performance updates coming.

    Check it out

    Jetpack 4.1 dropped today. You can check out the release post for more information, or just head to your dashboard to update to the latest.

    Jetpack 4.1 is here and it’s packed with performance improvements, new features, improvements to existing features, and bug fixes!

    Source: Jetpack 4.1: Secure Sign On Improvements, Two New Sharing Buttons, and More — Jetpack for WordPress

    Join our amazing team

    While I did have the opportunity to write most of the SSO code for the release, the SSO refresh in 4.1 was only possible because of the amazing team we have.

    • Rick Banister and Michael Arestad provided mocks as well feedback on the UX and UI.
    • Brandon Kraft provided lots of feedback, pointed out old issues as well as conflicts with other plugins, and even created a core patch to add more actions to the login form.
    • Jeremy Herve did a ton of work getting the release ready.
    • The entire division participated in pre-release testing.
    • My team reviewed my code and listened to my complaining.

    If you’re interested in joining our team, we’re always hiring.

    jpop-full-2015
    JPOP division at 2015 Grand Meetup in Park City.

  • Disable Jetpack’s Photon module for Keying Social Importer

    Since migrating my site to a new server, I’ve been noticing mixed content SSL errors.

    After doing a bit of digging, I found that when my Instagram posts were being imported by Keyring Social Importers, that the image source was being set with an http Jetpack Photon URL.

    So, my post markup looked like this:

    <img src="http://i2.wp.com/manofhustle.com/wp-content/uploads/2016/04/13130026_1061188440605739_999811134_n.jpg?fit=640%2C640&quality=80&strip=all" width="640" height="640" alt="Bees in a tree" class="keyring-img" />;

    Instead of this:

    <img src="https://eric.blog/wp-content/uploads/2016/05/13113885_1541803272790749_1295774627_n.jpg" width="640" height="640" alt="&quot;No more pictures. No! No! No! No!&quot;" class="keyring-img" />;

    I wasn’t sure why the http was being used instead of https. That being said, I knew that the post content should have manofhustle.com for the image source instead of a Jetpack Photon URL. So, I set off to fix it.

    Finding the fix

    Within a few minutes, I stumbled across one of my coworker’s (Erick Hitter) blog posts about conditionally disabling Photon, which made the work pretty easy! Thanks Erick

    In that article, Erick suggests this code to disable Photon conditionally:

    $photon_removed = remove_filter( 'image_downsize', array( Jetpack_Photon::instance(), 'filter_image_downsize' ) );
    
    // Call wp_get_attachment_image(), wp_get_attachment_image_src(), or anything else that ultimately calls image_downsize()
    
    if ( $photon_removed )
    add_filter( 'image_downsize', array( Jetpack_Photon::instance(), 'filter_image_downsize' ), 10, 3 );

    Modifying for Keyring Social Importers

    The above code works great when you know that Jetpack is installed and when you have access to whatever function is calling for the image source. But, in the case of a plugin like Keyring Social Importers, we need to find actions to use so that we don’t modify the plugin code.

    So, after looking around a bit, I found the import() method in Keyring Social Importers which seems to kick the process off. Within that method, there are two actions which are useful to us – import_start and import_end.

    With that in mind, I modified Erick’s code to specifically work with Keyring Social Importers.

    add_action( 'import_start', 'moh_disable_photon_social_importer' );
    function moh_disable_photon_social_importer() {
    if ( ! class_exists( 'Jetpack_Photon' ) ) {
    return;
    }
    
    remove_filter( 'image_downsize', array( Jetpack_Photon::instance(), 'filter_image_downsize' ) );
    add_action( 'import_end', 'moh_enable_photon_social_importer' );
    }
    
    function moh_enable_photon_social_importer() {
    add_filter( 'image_downsize', array( Jetpack_Photon::instance(), 'filter_image_downsize' ), 10, 3 );
    }

    You can place this code in a custom functionality plugin for your site or in the functions.php file of your theme.