/*
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 );
}
}
Mitten Mouth Music: Alternative, Indie, Rap, Underground & Life Archives - Page 50 of 162 - The Earology Dept.
Some of the best things in life are a mere $19.95 a month.
What do you know about vinyl? For many a vinyl record is like distilling the soul of any music down into it’s bare essence, then shooting the experience through a needle and straight into your eardrum. Well, if that description sounds over-the-top, then forgive me my gratuitous metaphors. But it also happens to be closer to the truth than say E = mc2. Continue reading “things we like: feedbands”
The NYC band Selebritites are just good to have around just in case you need something to smile about.
selebrities /// lovely things lp
Brooklyn’s Selebrities return with their anticipated second album, Lovely Things. Known for their ability to capture the sound of an optimistic and neon splashed New York, the band shows a softer, subtler side to their songwriting with the new material. Tracks like Found and Fell to Earth are pensive musings on the impact of relationships, whereas Temporary Touch and I Could Change are bouncier-style jams that Selebs’ fans adore.
The Lovely Things LP is a mature and finely-tuned affair from an act that travels confidently in their own lane. Peace.
Hockeysmith (Annie & Georgie Hockeysmith) make dreamy electro pop fare with a flare for the mundane. This is music subtle enough to chill to and just flashy enough to keep you interested. Peace. Continue reading “hockeysmith // let’s bang + now i want to”
If all music tells a story, then Royal Teeth’s joyous, inspired songs spin an exuberant tale of possibility, each note conveying the youthful excitement of venturing out into the great wide world. The songs on the band’s debut album, Glow (courtesy of Dangerbird Records), were penned around the idea of exploration and spirited adventures into the unknown, and its 12 tracks lay out a kaleidoscopic narrative of discovery.
A band of maniacal musicians of the highest and most talented order.
phox // confetti ep
If indeed two is company and three’s a crowd, then six must naturally be a circus troupe. The supernaturally fun musical phenomenon from Baraboo, Wisconsin is none other than PHOX. This band packs more ruckus and beatific arrangement into a song than is scientifically possible, or at least we thought not. The music is trippy and traipsing, with the vocals sung out like proclamations from on high. And thank you so very much Ms. Monica Martin for opening your mouth and letting fly the honey-spun melodies which are a captivating and gorgeously morass if I ever heard one. Never have I heard a voice in possession of both the light and airiness of hopefulness and the heavy laden anchor of sorrowful blue with worry lines aplenty; a voice of braided dichotomy.
The band’s 2013 release Confetti EP is a 6-song mini LP masquerading as an EP (it is so much more grandiose, sonically speaking, than a mere EP), and it is as adorable as calico space kittens decked out in Teletubbies onesies. After the jump click play and marvel as the music Crip-dances delicately upon your eardrum. In my opinion, if ever a band was destined for greatness this one is a sure bet. Peace.
Ground control to Major Tom we have Taiwo Heard. Copy?
taiwo heard // frontier to eternity ep
Taiwo Heard may have been born and raised in Washington, D.C. but his musical influences are anything but local. So, if you’re in the mood for rock-grunge-ish meets electronica then listen as you glisten to Taiwo Heard’s debut Frontier To Eternity EP. The end result is a mix bag of musical influences, i.e. classic rock, R&B, Soul, etc. Mr. Heard music sounds homogenous, but only partly so, it lacks the cloying and redundancy commercialism. Yet, the music occupies the realm of the familiar and the innovative, simultaneously. Basically, it’s fresh like the heliosphere blowing through the young lungs of a burgeoning solar system. Continue reading “taiwo heard // frontier to eternity ep (our sunday best)”
klangkarussell // sonnentanz (the sun don’t shine)
Klangkarussell featuring Will Heard’s Sonnentanz (The Sun Don’t Shine) is the deep house anthem that bears all the hallmarks of becoming one of this summer’s biggest dance hits.
Young Brits idolize Eno and Hot Chip; make a foggy-eyed summer jam. That’s the story behind Outfit’s I Want What’s Best – a simple-sounding exercise that actually flowers into a textured, danceable mountain.
Double Denim Records released their debut single Two Islands / Vehicles and followed it up with the release of ‘A.N.D.R.E.A’ in May 2012, a four track E.P that documented their outlook of life in the capital. Produced by the band themselves, Outfit combined live instrumentation with heavily processed samples, manipulating everyday noises and field recordings. Their methods were inspired not only by creative desires but also by the limitations of their studio, exploring necessity as a creative tool. Painting a world that’s as beautiful as it is dystopian, as hopeful as it is uncertain, Outfit’s soon-to-come debut album Performance is a step into the glorious unknown, it drops August 12, 2013. Peace.
Rose Windows is a band of a certain kind of rock ecstasy religion.
rose windows // the sun dogs
Rose Windows is the kind of band which comes along and carves a wide swath through you brain like a tattooed-meat cleaver. Chris Cheveyo began gathering members for the band back in 2010, and now with the composition of the band complete the result is staggeringly affective.
The band’s label Sub Pop had this to say in regards to the bands latest album:
“The Sun Dogs is an album based on the idea of sifting through the past, extracting bits and pieces, and re-imagining these into new forms. It’s about observing and building upon musical traditions. Thematically, Cheveyo describes The Sun Dogs as being about “the everyday blues that capitalism and its hit man, religion, bring on all of us.” More specifically, he sees The Sun Dogs as an acknowledgment of the circular nature of the rat race, learning to accept the evil in the world, taking joy wherever we can, and ultimately disavowing traditions of exploitation and violence.
That search for finding light in the dark is perfectly captured in the album opener “The Sun Dogs I: Spirit Modules,” as the ominous verses uncoil into beautifully lush string arrangements and vocal harmonies. “Native Dreams” displays the band’s affinity for both exotic melodies and bold distorted guitar riffs, all while Qazi describes the encroachment of one culture upon another by singing of “spirit warriors” surrounding a sleeping camp. “Walkin’ With a Woman” conjures the old blues tale of encountering the devil at the crossroads while culling motifs from classic psych and prog records. Songs like “Heavenly Days” and “Season of Serpents” offer a counterpoint to the foreboding moments on The Sun Dogs, with folk-steeped guitars, gentle pedal steel, and graceful choruses painting a picture of those moments of joy and grace in the midst of the world’s evil.
These moments of respite make the foreign melodies, menacing mysticism, and blown-out riffs on songs like “This Shroud” all the more disquieting. But ultimately “The Sun Dogs II: Coda” ends the album with a ray of light, with the alternating major and minor chords on acoustic guitar, lilting piano lines, “Kashmir”-esque strings, and full-band vocal harmonies burning off the gloom.”
This is an LP of pure rock gospel, of such quality and proportion is shatters the soul with it’s honesty, raw intensity and daring. Peace.
If a voice can convey the best one has to offer then Sophie Jamieson’s voice is truly a gift of the great measure.
It was a no-brainer really, signing Sophie Jamieson to Folkroom Records was as natural a thing as falling in love with her pristine and deceptively durable voice. On June 24th, her achingly melodic Where EP entered the world. And by subtle degrees life is noticeably better, or at least my ears think so. So, put her record on and waltz around the room with a loved one, or enjoy a spot of tea and rummage through some cherished memories. Peace.