Hi, Erik! Thanks for the kind words about the plugin, and the question. Output filtering hadn’t actually occurred to me, when I was writing the plugin, but anything’s possible. Since I can’t see your post just now (you’re tinkering), what exactly did you have in mind?
Yes, I am tinkering with the theme right now. I should be finished by the end of the week.
In the meantime, this is how I edited your $output
string:
$output = '<div class="fluid_8t" style="position:relative;padding:0;width:100%;padding-top:100%;margin-bottom:1.563em;">';
$output .= '<iframe class="nd-eight" src="http://8tracks.com/mixes/' . intval($xml->mix->id) . '/player_v3_universal/' . $playops .'" ';
$output .= 'width="' .intval( $width ) . '" height="' . intval( $height ) . '" style="border: 0px none;width:100%;height:100%;position:absolute;left:0;top:0;"></iframe>';
$output .= '</div>';
As you can see, though not wholly optimal, I am using inline styles to make the image responsive. I don’t know if you want to include that in your code or, as I was suggesting, allow themes to filter the $output
with something like this:
// allow plugins to filter the output
$output = apply_filters( 'eighttracks_shortcode', '', $atts );
if ( $output != '' ) return $output;
Just a thought. Still love the plugin though. It has actually gotten me excited about my 8tracks account again.
Hi, Erik!
Thanks, again, for the kind words. It’s great that you’re feeling excited about your 8tracks account, again! 🙂
I can definitely see your point about wanting to allow themes to filter the output. I’m actually working on a few different features for the forthcoming 1.0 release, and I’ll see if I can’t get this in there, too. 🙂
So, I think I’ve got the support for filtering working in the most recent build of the plugin. Basically, I’ve given the iframe elements a class of “tracks-iframe,” and wrapped those in a div with a class of “tracks-div.” I tested with some custom css, and they do indeed seem to be responding.
In any case, that’s a long way of saying that you might want to wait, but you’re very welcome to check things out by grabbing the development build of the plugin. It’s stable, and backwards compatible (save for the widgets), so you shouldn’t run into too much trouble.
Either way, the plugin’s getting closer to 1.0. If you do check it out, I’d love to know how it works for you. 🙂