/*
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 );
}
}
Continue reading "chet faker | gold | official video"
The post chet faker | gold | official video appeared first on The Earology Dept..
]]>
And if you have been charting Chet’s continual rise over the years, then surely you have noticed beards are the de facto accoutrement of manly cool as of late, and the constant output and high level of badassery of this Aussie are the star stuff streaking across your earlobe.
Ahywho, it would serve you right to lay your optics upon the official music video for Gold, taken from Chet Faker’s debut album ‘Built On Glass‘. Basically, I told you so and you’re welcome. Peace.
Artist: Chet Faker
Album: Built On Glass
iTunes
Google Play
Amazon
Tracklsting:
Release Your Problems
01. Talk Is Cheap
02. No Advice (Airport Version)
03. Melt (feat. Kilo Kish)
04. Gold
05. To Me
06. /
07. Blush
08. 1998
09. Cigarettes & Loneliness
10. Lesson In Patience
11. Dead Body
The post chet faker | gold | official video appeared first on The Earology Dept..
]]>Continue reading "pony bwoy // hallowed ground + dark soccer"
The post pony bwoy // hallowed ground + dark soccer appeared first on The Earology Dept..
]]>
Pony Bwoy is the latest project from rapper/singer/provocateur Jeremy Nutzman (aka Spyder Baybie Raw Dog), this time teaming up with producer Hunter Morley. Departing from his usual antics as a drugged-up after-party boy late to the club, Nutzman has now blossomed into a soulful smooth-talker, with vocal chops and rhythmic control of uncanny proportions. This transformation is no doubt a result of his collaborating with H. Morley and his forward thinking R&B-inspired production. The songs of Pony Bwoy vary from dance floor anthems to late-night chill zone lullabies perfect accompaniment for conjoined intimacy and solo exploration in the fine art of herblaxation. Album drops tomorrow July 16th. Peace.
Pony Bwoy Tracklist:
01. Medium Cool (Intro)
02. Hallowed Ground
03. Ipanema_Evol
04. Ævum (time crawls)
05. My Mouth Is A Tomb
06. My Body Is A Bruise
07. Ouroboros
08. Crystal Ball
09. Epoch;Glss
10. Bermuda Triangle
11. Dark Soccer (Night Sounds)
12. Fata Morgana
The post pony bwoy // hallowed ground + dark soccer appeared first on The Earology Dept..
]]>Continue reading "quadron // avalanche"
The post quadron // avalanche appeared first on The Earology Dept..
]]>
I’m switching gears here, a virtual pumping of the brakes and slowing things down. And as I move to the slow lane check out the good feel music of Quadron and their infectious downtempo vibe. Avalanche, Quadron’s sophomore LP, is currently streaming in full via The New York Time’s Press Play. Also, be sure to catch them in all of their unbridled sexy glory on The Late Show with David Letterman on June 17th, 2013. Peace.
Quadron on Tour:
6/12 – Brighton Music Hall – Boston, MA *
6/13 – Highline Ballroom – New York, NY *
6/15 – 9:30 Club – Washington, DC *
6/16 – Union Transfer – Philadephia, PA *
6/17 – Late Show with David Letterman
6/18 – Nectar Lounge – Seattle, WA
6/19 – Fortune Sound Club – Vancouver, BC
6/21 – Hawthorne Theater – Portland, OR
6/23 – Stern Grove Festival – San Francisco, CA
6/27 – Central Park Summerstage – (New York, NY #
8/03 – Osheaga Festival – Montreal, QC
8/22 – Troubadour – Los Angeles, CA
8/24 – First City Festival – Monterey, CA
9/14 – One Music Fest – Atlanta, GA
10/12 – Corona Capital Festival – Mexico City, CA
* w/ Junip
# w/ Lianne La Havas
The post quadron // avalanche appeared first on The Earology Dept..
]]>Continue reading "child of lov // child of lov"
The post child of lov // child of lov appeared first on The Earology Dept..
]]>
The Child of Lov creates an amalgam of divergent sounds. Some his, others not so much. This 25-year old from the Netherlands seems to have been to the thrift shop of music and gathered bits from veritable legends: Ali Farka Toure, Ravi Shankar and the glowing sounds of 60’s soul. All this (and more) he’s sewn tenuously together with a triple-twined thread taken from Bootsy Collins, Jimmy Hendrick, and Prince’s respective funky manish manes.
His self- titled debut album Child Of Lov dropped May 6th via Double Six Records. It’ll definitely add some funk to your playlist. Peace.
The post child of lov // child of lov appeared first on The Earology Dept..
]]>Continue reading "active child // evening ceremony"
The post active child // evening ceremony appeared first on The Earology Dept..
]]>
Whether you are lover or beloved. On this slight and chill Michigan morning it is Sunday and the music matches the countenance of the weather and the occasion. Behold. Fore the tender tendrils of spring are doing their determined best to permeate the frost strewn terra firma. And Active Child‘s track Evening Ceremony is knocking a ragged hole in your heart. “You Are All I See” Deluxe Edition is available now on iTunes via Vagrant Records. Peace.
The post active child // evening ceremony appeared first on The Earology Dept..
]]>Continue reading "solange // lovers in the parking lot"
The post solange // lovers in the parking lot appeared first on The Earology Dept..
]]>
what’s not to like about solange? and i got to give it to her on what i’ve heard so far from her forthcoming ep release ‘true’. first there was “losing you” with its eclectic, yet visceral homage to heartbreak and fear of losing love. then there was the very capable b-side “sleep in the park,” although i choose the twin shadow remodel featuring d’angelo lacy over the original. this was followed by a couple of additional songs, “true”, “don’t let me down” and “locked in the closet”. so far so good. now we have “lovers in the parking lot”. don’t forget the ‘true’ ep drops digitally november 27th via terrible records. peace.
The post solange // lovers in the parking lot appeared first on The Earology Dept..
]]>Continue reading "rudimental // not giving in (ft. john newman & alex care ) the bondax remix"
The post rudimental // not giving in (ft. john newman & alex care ) the bondax remix appeared first on The Earology Dept..
]]>
East London quartet Rudimental are on a mission to bring back soul into electronic music.
rudimental are the producers, songwriters and musicians piers agget, kesi dryden and amir amor. and together with dj locksmith, the four men of the world source their various musical backgrounds to constantly turn out dance floor gems from the motherlode of their collective consciousness. check out their, “not giving in” (ft. john newman and alex care), and on this one we get the magic of a bondax remix too! peace.
The post rudimental // not giving in (ft. john newman & alex care ) the bondax remix appeared first on The Earology Dept..
]]>Continue reading "kid smpl // but i don’t"
The post kid smpl // but i don’t appeared first on The Earology Dept..
]]>seattle-based producer kid smpl (b.k.a. j. butler) is all about creating docile chillwave meets electro r&b music, and with his forthcoming debut release ‘skylight’ via hush hush records, this one is sure to please. after the jump check out the ultra smooth, “but i don’t” and the good thing is you can cop it the day it drops on november 12th. peace.
The post kid smpl // but i don’t appeared first on The Earology Dept..
]]>Continue reading "kilo kish // navy"
The post kilo kish // navy appeared first on The Earology Dept..
]]>
if you’re hip to the cavalier would be musical starlet kilo kish then you know the story. it’s a story about an aloof floridian making good with her many different manifestations, i.e. kool kats klub, her stuff with mell and smash, and of course the sort of mixtape that set it off big time, the ‘homeschool’ ep. and this is what she does for fun! after the jump check the fan fav, “navy” it is def one of my favorites. you’ll dig it too i suspect. peace.
The post kilo kish // navy appeared first on The Earology Dept..
]]>Continue reading "sarah williams white (sww) // your silence is killing me ep"
The post sarah williams white (sww) // your silence is killing me ep appeared first on The Earology Dept..
]]>
i like surprises, don’t you? at times the most amazing things happen unexpectedly. case in point, the muse euterpe , you know the muse of song and music (according to olympian mythlogy), introduced me to the music of sarah williams white last night as I randomly searched for new and interesting music. needless to say i hit the jackpot. when one is in a quiet place, hearing sarah williams white for the first time is akin to listening to the inner most thoughts of suburbia reaching out it’s hand to the urban and different. it is also an artist traversing the fine line in-betwixt those two extremes and pulling it off adroitly.
although the ‘your silence is killing me’ ep was released via monosole on september 24th it doesn’t really matter. this is the second release for sww this year, the first being, “if smile at you/take your time“. at any rate, you can check both out after the jump, and you can cop the former on itunes. peace.
The post sarah williams white (sww) // your silence is killing me ep appeared first on The Earology Dept..
]]>