Jetpack

How to Override Jetpack Infinite Scroll Settings in a Child Theme

From our illustrious colleagues over at ThemeShaper, I’d like to share with you a post on further customizing Infinite Scroll settings in your themes:

When a theme author adds Jetpack Infinite Scroll support to their theme, they configure its options specifically for that theme. Occasionally you might want to override the theme’s defaults for your purposes, and in this article, I’ll show you how to do so in a child theme.

Here is a typical Jetpack Infinite Scroll setup function…

Read the whole post: How to Override Jetpack Infinite Scroll Settings in a Child Theme.

Posted in Tips & Tricks | Comments Off

Jetpack 2.3.2 and 2.3.3

Hello Jetpack community,

This week, we released versions 2.3.2 and 2.3.3 of Jetpack.

(more…)

Posted in Releases | 7 Comments

Moving Sharing Icons

One of the most common requests you send us is “Can we move the Sharing and Like buttons?” By default, the Sharing and Like buttons get printed at the end of the the_content() Loop function, which causes them to display at the end of your post’s text — but that may not be where you want them in your site’s design.

There are actually two ways to move the Sharing buttons and one for the Like button.

Move the Sharing and Like buttons

Jetpack, by default, just attaches this tag to two filters — the_content() and the_excerpt() — so that the Sharing icons get displayed. By editing your theme files, you can move the tag wherever you’d like — we default to attaching it to the filters so that, when the Sharing and Likes modules are activated, the buttons are displayed with no extra work. You’re free to move it around to put the Sharing icons where you’d like; here’s how:

1. In your functions.php file, add the following:

function jptweak_remove_share() {
    remove_filter( 'the_content', 'sharing_display',19 );
    remove_filter( 'the_excerpt', 'sharing_display',19 );
    if ( class_exists( 'Jetpack_Likes' ) ) {
        remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
    }
}

add_action( 'loop_start', 'jptweak_remove_share' );

2. Find the file for the location where you’d like the sharing icons to appear and insert the following code in the area you want the Sharing or Likes buttons to appear:

if ( function_exists( 'sharing_display' ) ) {
    sharing_display( '', true );
}

if ( class_exists( 'Jetpack_Likes' ) ) {
    $custom_likes = new Jetpack_Likes;
    echo $custom_likes->post_likes( '' );
}

Note that you do not need to display these together; you can put sharing_display() in a separate place from the Likes display codeblock.

Move the Sharing Buttons via jQuery

This method comes via Beau Lebens, a fellow Automattician. He coded this jQuery method for moving the Sharing icons:

jQuery( document ).ready( function( $ ) {
    // Relocate Jetpack sharing buttons down into the comments form
    jQuery( '#sharing' ).html( jQuery( '.sharedaddy' ).detach() );
} );

The #sharing selector is just the DOM location where I want to move the buttons to, and the .sharedaddy one is the container that Jetpack places its buttons in normally. We just detach it from the normal position and then dump it into the new location exactly as it was.

We hope this helps you develop your theme and display things the way you like.

Posted in Misc, Tips & Tricks | Tagged , , , | 4 Comments

Custom post type and metadata support in the REST API

Originally posted on Developer Resources:

We’ve recently made some updates to the REST API which is available here on WordPress.com and for any Jetpack-enabled site that have the REST API module activated. The API now has full read and write support for custom post types and post metadata.

You can specify a post’s post type when you create or edit it. If you’re fetching a single post, you will receive its post type in the response. Of course, you can also specify a post type when fetching a series of posts. In all cases the parameter to use or look out for is type.

You can also query posts by metadata using the new meta_key and meta_value parameters. You can add, update, delete or retrieve a post’s metadata when creating, editing or getting a single post, using the new metadata parameter which accepts an array of metadata keys, ids,

View original 388 more words

Posted in Uncategorized | Comments Off

Urgent Bug Fix: Jetpack 2.2.4

Dear Jetpack community,

I want to apologize, firstly, for pushing multiple updates out to you in one day. We’ve been doing our very best over the last several months to make sure that our releases are stable and tested in as many disparate environments as possible.

In this case, a bug cropped up because of an oversight in how we loaded a compatibility file for bbPress in Jetpack. It wasn’t caught in testing, which is unfortunate. This is a good example, though, of how we learn from our mistakes, improve our processes, and do better with the next release.

For those users effected by this, we decided it would be better to release Jetpack 2.2.4 as soon as possible to resolve this issue.

As always, please get in touch with us if you run into an issue. We’d be very happy to help!

Posted in Uncategorized | 8 Comments

Spring Has Sprung; Jetpack 2.2.3

Hello Jetpack community,

We’ve been hard at work on Jetpack over the last couple of weeks. Since releasing version 2.2.2 (which was mainly a bug fix release), we have focused our attention on making sure that Jetpack will play nicely with WordPress 3.6 when it is released. Here are the highlights:

  • Yahoo! Updates API is going away, so Yahoo! has been pulled out of Publicize;
  • The Shortcode module now includes a Bandcamp shortcode;
  • The Audio flash player was removed in 2.2.2 for security reasons. We fixed the vulnerability and reenabled the flash player;
  • The plugin adds Infinite Scroll support to Twenty Thirteen;
  • With Jetpack 2.2.3, the reply-title portion of the comment form can be styled by the theme;
  • and many other things that you can read about in the changelog.

Keep an eye on our news feed! We will be posting some articles on how to use Jetpack-beyond-the-basics, plus some on “getting to know”-the-Jetpack-folks.

Thanks, as always, for following along with us. Here are some updated ways to get in touch:

Posted in Uncategorized | 22 Comments

Jetpack 2.2.1: Now with Extra Development Mode

Howdy Jetpackers,

We’ve put together a spring cleaning release for you today. A number of bugs have been fixed, which you can see in the changelog.

Of note is the new Development Mode in Jetpack. With this, features that do not require a connection to WordPress.com servers can be activated on a localhost WordPress installation for testing. This has been one of the most demanded features from developers; we are very happy to provide this first iteration today.

Turn on Development Mode right now by adding define( 'JETPACK_DEV_DEBUG', true); to your wp-config.php file.

Update: Alex Mills, the developer who added Development Mode, notes the following in the comments below:

A quick note: development mode automatically gets enabled if you don’t have a period in your site’s hostname, i.e. localhost. If you use a different URL, such as mycooltestsite.local or something, it is then that you will need to define the JETPACK_DEV_DEBUG constant.

Another note is the new filters for shortcodes and widgets. Jetpack loads a lot of shortcodes and widgets; until now, it was an all or nothing module. Now, you can filter the shortcodes and widgets that Jetpack loads with a mini-plugin of your own.

Use the new jetpack_shortcodes_to_include or jetpack_widgets_to_include and exclude the widgets or shortcodes that you do not want. Or include new ones!

We hope that you like the new Development Mode and other bug fixes work well for you. If you are in need of assistance, please get in touch with us on our support forums.

Posted in Uncategorized | 25 Comments

Jetpack 2.1.2

Dear Jetpack Community,

Today we released Jetpack 2.1.2. This is mainly a bug fix release to get some outstanding issues squashed. We have resolved 34 bugs and added 2 enhancements, by my count. That’s pretty impressive, for a point release!

The highlights for this release are:

- the new TED shortcode. You can now copy and paste the shortcode offered on http://ted.com/talks and embed it directly in your WordPress+Jetpack-powered post or page.

- filters for Infinite Scroll. These filters allow themes and plugins to provide additional assets that should be loaded before a new set of posts is appended to the DOM.

You can read the full changelog here. Get in touch with us via our support form if you need any assistance.

Posted in Releases | 7 Comments

Jetpack Comments Now Available at a Launchpad Near You

The wait is finally over. You’ve been asking for it for months and we are finally ready to ship it.

Jetpack Comments has arrived!

We’re breaking down the barriers between you and your audience. When someone reads an article on your site and wants to comment, they can now use one of their existing social networking accounts to post a comment. No longer do they need to create yet another account and profile.

Since it is a large change, we are making Jetpack Comments opt-in. To activate it, just visit the Jetpack menu on your Dashboard and click the Activate button inside the Jetpack Comments box.

When activated, Jetpack Comments takes the place of your theme’s comment form in this nifty, sleek form:

To leave a comment, just click in the box and start typing.

After a visitor has written a comment, they will have several ways to identify themselves. A visitor can leave a comment as a guest¹, or they can choose to use their WordPress.com, Twitter, or Facebook account. For example:

You can also change the “Leave a Reply” heading and the color scheme of the Jetpack Comments form under the Settings → Discussion menu.

Bug Fixes

We’ve also fixed a few outstanding bugs in this release:

  • Multiple fixes for Sharing, such as updates for language locales on the Facebook Like button and making the More button more reliable.
  • Updates to the YouTube and Audio shortcodes for better URL escaping.
  • Update the YouTube shortcode to respect the embed settings in Settings → Media when appropriate.
  • Code clean up for After the Deadline.

You should see the update available in your WordPress dashboard shortly. Alternatively, you can always download the latest version of Jetpack here at jetpack.me as well.

Remember to contact support if you need help.

On the Horizon

We’re always excited to bring more features to Jetpack. While we can’t provide any estimates on when these will be included in Jetpack, here are some of the additions or improvements that we are planning:

  • Increased customizability of the Subscription feature’s emails.
  • A better Jetpack management interface.
  • A refresh of the Sharing options.

¹ Guest commenting is still controlled by the options in Settings → Discussion; if you disable guest commenting, visitors will not be able to use this option in Jetpack Comments.

Posted in Features, Releases | 193 Comments
Follow

Get every new post delivered to your Inbox.

Join 64,053 other followers