Ready for The Defenders?

Did you like Marvel’s Daredevil, season 1 and 2? You probably watched Jessica Jones as well, where weย got to knowย Luke Cage and discovered that all 3 characters lived in the same city and would maybe make a good team.

Well, that’s happening! Make note, as there are 3 more series coming up on Netflix for you:

Marvel’s Luke Cage

Marvel’s Iron Fist

A new hero joins the team! I’m so waiting for that one.ย It has a nice mystical feeling to it, a la Doctor Strange. And, you know, Kung Fu! :)

Marvel’s The Defenders

And finally, the whole team coming together!

๐Ÿ˜€
2
๐Ÿ˜ƒ+

On Repeat Today: French Fuse

I discovered French Fuse today. They seem pretty new, but their few remixes are really great!

Here is their take on Daft Punk, and you know how much I love Daft Punk remixes ๐Ÿ˜Š ย Be sure to check their other remixes as well.

๐Ÿ˜Ž
1
๐Ÿ˜ƒ+

A new apartment

About a year ago, Adri and I bought a new apartment. Over the months that followed, we planned, scheduled, and worked with contractors to make this place our home. After 10 months of work, we’re quite happy with the result!

For posterity’s sake, here are a few pictures of the process.

Continue reading

๐Ÿ‘
25
๐Ÿค—
2
๐Ÿ˜
47
๐Ÿ‘
16
๐Ÿ˜€
19
๐Ÿ‘Ž
3
โค
1
๐Ÿ˜ƒ+

Jetpack: Add Related Posts to your RSS feed

I got an interesting question in the Jetpack support forums today. Levy wanted to display Related Posts in their RSS feed.

Jetpack displays Related Posts at the bottom of single posts by default, but like with other modules, you can customize Related Posts. In this post, we’ll use the the_content filter and the raw Jetpack Related Posts class to build our own unordered list of Related Posts, and add it to the bottom of the post content in RSS feeds.

Quick note before we start:

  • You’ll want to add that code to a functionality plugin like this one.
  • Nothing will happen if you’re not using Jetpack and its Related Posts module.
/**
 * Add Jetpack Related Posts to RSS feed.
 *
 * @see https://wordpress.org/support/topic/2927523
 */
function jeherve_related_posts_feed( $content ) {
	// Return early if we're not in the RSS feed.
	if ( ! is_feed() ) {
		return $content;
	}

	// If Jetpack and Related Posts are active, let's get started.
	if ( class_exists( 'Jetpack_RelatedPosts' ) && method_exists( 'Jetpack_RelatedPosts', 'init_raw' ) ) {
		$related = Jetpack_RelatedPosts::init_raw()
			->set_query_name( 'jetpackme-shortcode' ) // Optional, name can be anything
			->get_for_post_id(
				get_the_ID(),
				array( 'size' => 3 )
			);

		if ( $related ) {
			$related_list = '';

			foreach ( $related as $result ) {
				// Get the related post IDs
				$related_post_id = get_post( $result[ 'id' ] );

				/**
				 * From there you can do just about anything, using the post IDs.
				 *
				 * In this example, we'll build an unordered list.
				 */
				$related_list .= sprintf(
					'<li><a title="%1$s" href="%2$s">%3$s</a></li>',
					esc_attr( get_the_title( $related_post_id ) ),
					get_permalink( $related_post_id ),
					get_the_title( $related_post_id )
				);
			}

			/**
			 * Let's wrap all those related posts in ul tags, and add that list to the end of our post content.
			 *
			 * We will also add a headline, but only if it was set to be displayed in your Jetpack Related Posts settings.
			 */
			$related_options = Jetpack_Options::get_option( 'relatedposts' );
			if ( $related_options['show_headline'] ) {
				$headline = sprintf(
					'<h3 class="jp-relatedposts-headline"><em>%s</em></h3>',
					esc_html__( 'Related', 'jetpack' )
				);
			} else {
				$headline = '';
			}

			return sprintf(
				'%1$s%2$s<ul class="jp-relatedposts">%3$s</ul>',
				$content,
				apply_filters( 'jetpack_relatedposts_filter_headline', $headline ),
				$related_list
			);
		}

		return $content;
	}

	// Last fallback, just in case Jetpack and Related Posts aren't there anymore.
	return $content;
}
add_filter( 'the_content', 'jeherve_related_posts_feed' );
๐Ÿ˜Ž
1
๐Ÿ˜ƒ+

Come see me at WordCamp Europe

Are you at WordCamp Europe this weekend? Come say hi, I am at the Jetpack booth! ๐Ÿš€ โ˜บ 

๐Ÿ‘
7
๐Ÿ˜ƒ+

On Repeat Today: Why Don’t You Do It, Little Barrie

I recently posted about Better Call Saul, and I told you that I loved the soundtrack.

Here is what’s on repeat for me today: Why Don’t You Do It, Little Barrie. It’s part of the soundtrack for Season 2, Episode 8 of Better Call Saul.

Little Barrie is actually behind Better Call Saul’s main theme as well. If you’re into old rock, check them out.

๐Ÿ˜ƒ+

TV Series: Better Call Saul

To this day, Breaking Bad still is oneย of my favourite TV Shows. The story, the photography, the characters, the soundtrack, … That show brought TV Shows to a new level. I was thrilled when I learned that one of the characters, Saul Goodman, would get his own show, created by Vince Gilligan and Peter Gould, who also worked on Breaking Bad.

Continue reading

๐Ÿ‘
1
๐Ÿ‘Œ
3
๐Ÿ˜ƒ+

REST API Post Embeds: alter API query based on custom shortcode parameter

I got an interesting question from @slotty7130 in the WordPress.org support forums today: they wanted to use the REST API Post Embeds plugin to display posts from one of their websites, but only in a specific language as defined in WPML.

Continue reading

๐Ÿ˜€
1
๐Ÿ˜Ÿ
1

A week in Dublin

Working for Automattic is pretty great. I work from home, and also get to travel from time to time. After Hawaii, India, San Francisco, Spain, and a few other places, we decided to head to Dublin for a week to meet, andย work on delivering better support for Jetpack, VaultPress, and Akismet users.

Continue reading

๐Ÿ‡ฎ๐Ÿ‡ช
8
๐Ÿ˜€
1

Doctor Strange

You wonder what I see in your future? Possibility.

Yup, Marvel’s Doctor Strange is coming,ย and they picked the best actor for the role, Benedict Cumberbatch.

benedict-cumberbatch-strange

You want to go see that movie.

For those of you not familiar with Doctor Strange back-story: Stephen Strange is a selfish, arrogant, and super-talented neurosurgeon; his hands are obviously super important to him as a surgeon. One day,ย he gets into a car accident, his hands are badly damaged, and he can’t perform surgeries anymore. He searchesย for a cure for a long time, until he finds The Ancient One, one of the most powerful sorcerers there is. The Ancient One becomes his mentor, until one day Strangeย becomes Sorcerer Supreme. Magic!

Marvel is really killing it lately:

  • Several movies, exploring different heroes and stories of the Marvel universe, including some superheroes that we might not have thought worthy of a movie before (Ant-Man, Vision, …);
  • Movies featuring anti-heroes, like Deadpool or Guardians of the Galaxy;
  • A tie-in show (Agents of S.H.I.E.L.D) getting popular enough to last for 3 seasons;
  • A tie-in show linked to that tie-in show (Agent Carter);
  • 2 seasons of Daredevil, featuring the Punisher;
  • Jessica Jones, Luke Cage, and the Iron Fist getting their own shows;
  • The Defenders, bringing them all together;
  • And now, Doctor Strange!

I can’t wait to see that movie.