/*
Plugin Name: Distrify Embed
Plugin URI: http://support.distrify.com/customer/portal/articles/264106-how-do-i-embed-on-a-wordpress-blog-
Description: Extends WordPress's Embeds allowing bloggers to easily embed videos from Distrify. Just go to any Distrify film page or player and copy the URL. Paste that URL in any WordPress blog and it will automatically be converted to an embedded Distrify player. If you are logged in to distrify.com it will automatically add your affiliate tracking code to your embeds. Make sure you turn on Auto-embeds in your WP settings and also make sure that the URL is on its own line and not hyperlinked (clickable when viewing the post). The plugin also extracts the still image from the film and saves it as the Featured Image for the post. This actually works for any Embed (not just Distrify) that you embed into your WordPress blog.
Author: Distrify Limited
Version: 0.3.1
Author URI: http://www.distrify.com
License: GPL2
Copyright 2011-2013 Distrify (email : hello@distrify.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* Does the work of adding the Distrify provider to wp_oembed
*/
function add_distrify_provider($the_content){
require_once( ABSPATH . WPINC . '/class-oembed.php' );
wp_oembed_add_provider('#https?://(www\.)?(distrify|muvies).com/films/.*#i', 'http://distrify.com/oembed.json', true );
wp_oembed_add_provider('http://muvi.es/*', 'http://distrify.com/oembed.json' );
wp_oembed_add_provider('#https?://.*\.muvies.com/.*reviews/.*#i', 'http://distrify.com/oembed.json', true );
}
//add the provider on plugins_loaded.
add_action('plugins_loaded', 'add_distrify_provider');
/**
* from http://wordpress.stackexchange.com/q/70752/1685
* Automatically set the featured image if an oEmbed-compatible embed is found in the post content.
* author: TheDeadMedic
* author URI: http://wordpress.stackexchange.com/users/1685/thedeadmedic
*
*/
add_action( 'wp_insert_post', array( 'ofi', 'init' ) );
class ofi
{
/**
* The post thumbnail ID
*
* @var int
*/
private $_thumb_id;
/**
* The post ID
*
* @var int
*/
private $_post_id;
/**
* Sets up an instance if called statically, and attempts to set the featured
* image from an embed in the post content (if one has not already been set).
*
* @param int $post_id
* @return object|null
*/
public function init( $post_id )
{
if ( ! isset( $this ) )
return new ofi( $post_id );
global $wp_embed;
$this->_post_id = absint( $post_id );
if ( ! $this->_thumb_id = get_post_meta( $this->_post_id, '_thumbnail_id', true ) ) {
if ( $content = get_post_field( 'post_content', $this->_post_id, 'raw' ) ) {
add_filter( 'oembed_dataparse', array( $this, 'oembed_dataparse' ), 10, 3 );
$wp_embed->autoembed( $content );
remove_filter( 'oembed_dataparse', array( $this, 'oembed_dataparse' ), 10, 3 );
}
}
}
/**
* @see init()
*/
public function __construct( $post_id )
{
$this->init( $post_id );
}
/**
* Callback for the "oembed_dataparse" hook, which will fire on a successful
* response from the oEmbed provider.
*
* @see WP_oEmbed::data2html()
*
* @param string $return The embed HTML
* @param object $data The oEmbed response
* @param string $url The oEmbed content URL
*/
public function oembed_dataparse( $return, $data, $url )
{
if ( ! empty( $data->thumbnail_url ) && ! $this->_thumb_id ) {
// if ( in_array( @ $data->type, array( 'video' ) ) ) // Only set for video embeds
$this->set_thumb_by_url( $data->thumbnail_url, @ $data->title );
}
}
/**
* Attempt to download the image from the URL, add it to the media library,
* and set as the featured image.
*
* @see media_sideload_image()
*
* @param string $url
* @param string $title Optionally set attachment title
*/
public function set_thumb_by_url( $url, $title = null )
{
/* Following assets will already be loaded if in admin */
require_once ABSPATH . 'wp-admin/includes/file.php';
require_once ABSPATH . 'wp-admin/includes/media.php';
require_once ABSPATH . 'wp-admin/includes/image.php';
$temp = download_url( $url );
if ( ! is_wp_error( $temp ) && $info = @ getimagesize( $temp ) ) {
if ( ! strlen( $title ) )
$title = null;
if ( ! $ext = image_type_to_extension( $info[2] ) )
$ext = '.jpg';
$data = array(
'name' => md5( $url ) . $ext,
'tmp_name' => $temp,
);
$id = media_handle_sideload( $data, $this->_post_id, $title );
if ( ! is_wp_error( $id ) )
return update_post_meta( $this->_post_id, '_thumbnail_id', $this->_thumb_id = $id );
}
if ( ! is_wp_error( $temp ) )
@ unlink( $temp );
}
}
The Earology Dept. - Page 159 of 173 - Where the food sounds good, and the music is pretty tasty too.
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Instantly I liked this. It’s the tickling synth intro. Then the gently thrummed guitar. It’s the steady uphill climb until the sun breaks out and singer-keyboardist-guitarist Cacie Dalager opens her mouth. She had me at, “If I believed in god I would not have done the things you’ve done…” What is there to do against such a song? Nothing. Just try and be still and attune every fiber of your being to the task of listening and absorbing every single note. “Giants” is a formidable and precious song, even more so in its acoustic version. Which is also available on their EP Neighbors. Their album dropped last year 2010, but so what, it’s still brilliantly awesome. Peace.
I didn’t see it coming. Who did? I heard Lana Del Rey and her song “Video Games” way back when the rest of the developed world heard it. I liked it well enough, but not like I like it now. Sub Swara have put their collective subversive mitts all over it and made it a funkier and dirtier affair. Now, “Video Games” 2.0 needs to go to confession and say a few Hail Marys and Our Fathers, but I hope not. Now, it has swagga galore. Dhruva Ganesan and Dave Sharma has clothed Ms. Del Rey in Beth Gibbons’ attire. Now she walks a bit like PJ Harvey to the heady drone of uncircumcised ragga beats and swooning synths and the world is better for it. Thanks guys. Peace. Continue reading “lana del rey // video games (sub swara remix)”
Who says loud agitated music isn’t beautiful or thought provoking? Not I. Although the lyrics of La Dispute aren’t always incendiary political affairs, they feel like it. What’s also readily apparent, is these guys don’t lack, well, rage or talent . However, the good thing about this band is that they channel all the bitterness and beauty of living into deeply emotional fare. Their new album Wildlife (out now via No Sleep Records) is filled with tales of trail and error, longing, love lost, and lots of boiling over angst aplenty. And through it all this five-piece tour de force from Grand Rapids, MI sound like a veritable punk-rock orchestra of sound. Each song is refined chaos, more than anything else, hitting you square in your chest. Leaving your pulse racing, your brow sweaty and your fist clenched. But what do you do after this just under an hour album cranks you up to 11? You thank your lucky stars for every little ounce of joy you can eke out of life. Peace. Continue reading “la dispute // wildlife”
How do you get inside of shadow and smothered facets of dim light. Further, how does one extrude those elusive analogies into potent song? It’s hard work for sure. Unless of course you’re the skillful sons of a gun going by Brown Bird. The songs on Salt For Salt cut you down like a fifth or two of Jameson, minus the shot glass and ice of course. Take these songs straight up without a chaser, and suffer through them to get to the warm glow of temporary peace at the bottom of the metaphorical glass. David Lamb and MorganEve Swain are taking their demons by the horns and creating a wondrous sound worth hearing. Listen below. Two of my favorites are “Bilgewater” and “End of Days” and of course the anchor weight of “Thunder and Lightning”. These songs, they’ll poke you right in the chest and get your attention like a shotgun brandished in the dead on night. Peace.
Watch a live session of “Thunder and Lightning” below.
It drips like fat rainbow/plaid raindrops. It pushes you like the errant wind tussling a small dreaming sailboat out to sea. You. Looking down from the tallest crag of Mount Kilimanjaro. All these images fitting together, juxtaposed into a spacey mosaic of sound. Not cluttered, but stitched patchwork upon the delicate petals of mystical flowers flowing into the curlicued nautilus of the listener’s ear. This is Major Tom to Ground Control. Repeat. Repeat. Repeat. Peace
P.S. Daniel Woolhouse is Deptford Goth. Youth II is the EP via Merok Records. Out now.
At times an artist’s true beauty isn’t fully experiences within the album format. And obviously that is one of the reasons why attending concerts, and witnessing live performances can be so amazing; at times even magical. Take Selah Sue for instance. I’ve listened to her album and its a good LP, but in many instances it sounds too strained and controlled. She doesn’t sound free to fly. Not so with her live work, which allows her true self to shine bright, and let’s listeners know that this unlikely songstress is very capable of making a believer out of any naysayer. I’ve posted two excellent examples so you can witness for yourself this young woman’s raw beauty and passion for the songs she embodies and brings to life. First up is “Summertime” which is taken from her self-titled LP Selah Sue. The second selection is a cover of Erykah Badu’s song “Appletree”. Both of these are stand out performances and I hope you enjoy them too. Peace.
Normally a 9-piece outfit the Brandt Brauer Frick Ensemble is nowadays a trio touring North America. It is hard to classify these guys. At times electro, then turning into something resembling techno/pop meets Richard Wagner. Although that sounds like a weird combination, surprisingly it works. No doubt their latest album Mr. Machine is an eclectic and tantalizing hybrid, you got to hear it to believe that different can be indeed good, very good. Mr. Machine is out now on via K7.
It’s not so easy to take an old format and make it fresh and invigorating again. But that is exactly what A Classic Education has done, and has been doing since the band formed in 2007. If the music feels like something you’d expect to hear from the 1950s or 60s it isn’t by mistake, it’s by design. Check out the video below for the song “Gone To Sea”. Right off the bat is doesn’t sound like anything else you’ve heard lately from this era. The guitar is subdued and mellow, the drum-work sounds like Dennis Wilson (of Beach Boys fame) is working the sticks effortlessly. Then there is the vocals of singer/songwriter Jonathon Clancy, which coincidentally sound almost identical to that of Jim McGuinn of the Byrds. Yet, it all comes together nicely and works big time. I’ve also included the song “Forever Boy”, which is one of my favorites. Give them a listen and I think you’ll enjoy this octet from Italy. Their debut LP Call It Blazing is out now. Peace.
It’s not hard to reason why one would enjoy listening to Winter Gloves. The foursome from Canada makes great noise that is not only easy to listen to, but their music has the blood of early alternative rock flowing through its veins. That’s a plus in my book no matter what. You’ll discern more than a few visceral references to late 80s and early 90s alt music, think Echo & The Bunnymen, and Depeche Mode for instance. But musical influences aside these guys know how to pen and play music that stays in your head long after you’ve hit stop. The music on their 2010 release All Red begs to be revisited and played anew and often. This collection of songs is unadulterated effortless joy. I have included the video for “Dancing My Heart Out”, and after you hear it I think you’ll want to seek out more of what Winter Gloves has to offer. Peace.
48 minutes a 2 seconds isn’t a long time up against the whole of eternity, right? So spend this meager amount of time listening to something utterly languid, beautiful and choke full of soul. This is Meshell Ndegeocello exploring a gentler side to music making, and it’s mostly uncharted territory for her. That’s saying something for an artist who in her past has portrayed a “brasher” type of music (Go back to Plantation Lullabies in 1993, you’ll love it). Ms. Ndegeocello has released numerous albums, played for the Rolling Stones and Madonna, etc. Yet, because of her notorious work effort she isn’t resting on her laurels, instead she’s doing what she loves to do and that’s make gorgeous music. The new album Weather is due for a November 8th release, so cop it, spin it and enjoy. It’ll be 48 minutes and 2 seconds of total bliss. Peace.
Stream the entire album here at NPR’s First Listenhere.