SimplePie 1.3.1 is now available. Upgrade now!

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/05 19:56 (external edit)