/*
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 "phox | phox"
The post phox | phox appeared first on The Earology Dept..
]]>The expansive 12-song offering dumps illegal amounts of dopamine into the bloodstream and compels you to take notice. From album opener Calico Man to the heart breaking Slow Motion, the playful Evil all done up in jaunty rhythms. This is an album steeped in honest musicianship, and the six members Of PHOX do themselves proud. The songwriting, the arrangements and Monica Martin’s unbelievable vocals all coalesce into something akin to sustenance. For these songs nurture and provide a barrier against the big bad world, if only for a little. And with songs like the stunning Laura, a song which turns the night sky into a slow-spinning disco ball. And right around the corner Shrieking Violets comes along draping a kind arm around your shoulder… hearts prolific in plain view.
And then comes Noble Heart and my own heart becomes but a fool in love with sound all over again, like a deaf man hearing birdsong for the first time. This song is iridescent and bubbly, my ear straining to the final note.
Amazon
iTunes
As the album approaches it’s conclusion it offer up a gift, unleashing the tidal under tow of Raspberry Seed, this song, although adorned with Ms. Martin’s vocals it gives way to glorious rapture. at 2:22 the bow breaks and floods all that you are with the entire sun, moon and stars.
In Due Time closes the alum traipsing among ringing echoes of the sung songs, and the vibratory resonances hanging in the air between listener and sweet melody. All in all PHOX has done a beautiful job and not only wowing us but making us much more. Peace.
1. Calico Man
2. Leisure
3. Slow Motion
4. 1936
5. Evil
6. Laura
7. Kingfisher
8. Shrinking Violets
9. Satyr and the Faun
10. Noble Heart
11. Raspberry Seed
12. In Due Time
Tour Dates 2014
06/24 – Omaha NE @ Waiting Room
06/25 – Kansas City MO @ Riot Room
06/27 – Austin TX @ Stubbs Jr.
06/28 – Dallas TX @ Three Links
06/30 – Phoenix AZ @ The Western
07/01 – Los Angeles CA @ Echo
07/03 – San Francisco CA @ The Chapel
07/05 – Portland OR @ Mississippi Studios
07/06 – Seattle WA @ The Crocodile
07/08 – Salt Lake City UT @ State Room
07/09 – Denver CO @ Hi-Dive
07/11 – St Louis MO @ Duck Room
07/12 – Champaign IL @ Mariposa Music Fest
07/13 – Nashville TN @ High Watt
07/15 – Birmingham AL @ Bottletree
07/16 – Atlanta, GA @ Vinyl
07/17 – Asheville NC @ Grey Eagle
07/18 – Chapel Hill NC @ Local 506
07/19 – Washington DC @ The Hamilton
07/21 – Philadelphia PA @ Boot & Saddle
07/22 – Brooklyn NY @ Knitting Factory
07/23 – New York NY @ Mercury Lounge
07/25 – Newport TI @ Newport Folk Fest
07/28 – Montreal QC @ Casa Del Popolo
07/29 – Toronto ON @ The Drake
07/31 – Cleveland OH @ Grog Shop
08/01 – Detroit MI @ Magic Stick
08/03 – Green Bay WI @ Meyer Theatre
08/04 – Minneapolis MN @ 7th Street Entry
08/06 – Milwaukee WI @ Turner Hall
08/07 – Madison WI @ High Noon
08/08 – Madison WI @ High Noon
08/09 – Chicago IL @ Lincoln Hall
The post phox | phox appeared first on The Earology Dept..
]]>Continue reading "phox | slow motion | official video"
The post phox | slow motion | official video appeared first on The Earology Dept..
]]>Baraboo, Wisconsin based band PHOX are by far my fav newish carnival band. And now I’ve yet another reason to lose my top hat over Monica Martin & Co. Check out the (band member) Zach Johnson-directed video for the track “Slow Motion“after the jump. Also, you just may want to grab Phox’s new, sort of, debut self-titled album. The songs are remastered and have a more finished quality than previous recordings (thanks Jeff Lipton). Keep your eyeballs peeled, the album drops June 24th courtesy of Partisan Records. You can, and surely may Pre-order at: Amazon or iTunes and at www. phoxband.com. Peace.
North American Headline Tour
(On-sale NOW)
Date | City | Venue | Tickets |
6/24/14 | Omaha, NE | Waiting Room* | Buy Tickets |
6/25/14 | Kansas City, MO | Riot Room* | Buy Tickets |
6/27/14 | Austin, TX | Stubbs Jr.* | Buy Tickets |
6/28/14 | Dallas, TX | Three Links* | Buy Tickets |
6/30/14 | Scottsdale, AZ | The Western* | Buy Tickets |
7/1/14 | Los Angeles, CA | The Echo* | Buy Tickets |
7/3/14 | San Francisco, CA | The Chapel | Buy Tickets |
7/5/14 | Portland, OR | Mississippi Studios* | Buy Tickets |
7/6/14 | Seattle, WA | The Crocodile* | Buy Tickets |
7/8/14 | Salt Lake City, UT | State Room* | Buy Tickets |
7/9/14 | Denver, CO | Hi-Dive* | Buy Tickets |
7/11/14 | St. Louis, MO | Duck Room* | Buy Tickets |
7/12/14 | Champaign, IL | Mariposa Music Festival | Free Show |
7/13/14 | Nashville, TN | High Watt* | Buy Tickets |
7/15/14 | Birmingham, AL | Bottletree* | Buy Tickets |
7/17/14 | Asheville, NC | Grey Eagle* | Buy Tickets |
7/18/14 | Chapel Hill, NC | Local 506* | Buy Tickets |
7/19/14 | Washington, DC | The Hamilton* | Buy Tickets |
7/21/14 | Philadelphia, PA | Boot & Saddle* | Buy Tickets |
7/22/14 | Brooklyn, NY | Knitting Factory* | Buy Tickets |
7/23/14 | New York, NY | Mercury Lounge* | Buy Tickets |
7/25/14 | Newport, RI | Newport Folk Festival | Buy Tickets |
7/26/14 | North Bennington, VT | Vermont Arts Exchange | Buy Tickets |
7/28/14 | Montreal, QC | Casa Del Popolo^ | Buy Tickets |
7/29/14 | Toronto, ON | The Drake^ | Buy Tickets |
7/31/14 | Cleveland, OH | Grog Shop^ | Buy Tickets |
8/1/14 | Detroit, MI | Magic Stick^ | Buy Tickets |
8/3/14 | Green Bay, WI | Meyer Theatre^ | Buy Tickets |
8/4/14 | Minneapolis, MN | 7th Street Entry^ | Buy Tickets |
8/6/14 | Milwaukee, WI | Turner Hall^ | Buy Tickets |
8/7/14 | Madison, WI | High Noon^ | SOLD OUT |
8/8/14 | Madison, WI | High Noon^ | SOLD OUT |
8/9/14 | Chicago, IL | Lincoln Hall^ | Buy Tickets |
8/29/14 | Dorset, UK | End of the Road Festival | Buy Tickets |
11/5/14 | Reykjavic, Iceland | Iceland Airwaves Festival | Buy Tickets |
The post phox | slow motion | official video appeared first on The Earology Dept..
]]>Continue reading "phox | confetti ep"
The post phox | confetti ep appeared first on The Earology Dept..
]]>A band of maniacal musicians of the highest and most talented order.
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.
Teddi Stavee/Derek D.
The post phox | confetti ep appeared first on The Earology Dept..
]]>