SimplePie 1.5 is now available!

SimplePie Documentation.  Learn how to use this thing.  It's way better than going to school.

You are here: Documentation » API Reference » SimplePie » set_javascript()

set_javascript()

Description

class SimplePie {
	set_javascript ( [mixed $get = 'js'] )
}

Set the query string that triggers SimplePie to generate the JavaScript code for embedding media files.

Availability

  • Available since SimplePie 1.0.

Parameters

get

The query string to use.

Examples

Change the query string

$feed = new SimplePie();
$feed->set_feed_url('http://simplepie.org/blog/feed/');
$feed->set_javascript('embed'); // Will load <script src="?embed" type="text/javascript"></script> when $enclosure->embed() is called.
$feed->init();
$feed->handle_content_type();
echo $feed->get_title();

See Also


reference/simplepie/set_javascript.txt · Last modified: 2011/03/06 03:56 (external edit)