The wp_connect_live_stream function renders a Facebook Lvie Stream based on the specified setting values. It can be used by theme designers who would like to add specific live stream(s) to their theme.


<?php wp_connect_live_stream
); ?>


(integer) (required) The width of the plugin in pixels.
Default: None
(integer) (required) The width of the plugin in pixels.
Default: None
(string) (required) If you have multiple live stream boxes on the same page, specify a unique xid for each.
Default: None; an empty string is allowed.
(string) (required) The URL that users are redirected to when they click on your app name on a status (if not specified, your Connect URL is used).
Default: None; an empty string is allowed.
(required) If set, all user posts will always go to their profile. This option should only be used when users’ posts are likely to make sense outside of the context of the event.
Valid Values:

Default: None

(boolean) (optional) Whether to print the plugin code (TRUE) or return it as a PHP variable (FALSE).
Default: TRUE


Default Usage

Prints the Live Stream plugin.

// this file is required to enable the use of WordPress Connect constants
$wpc_constants_file = WP_PLUGIN_DIR . '/wordpress-connect/src/WordpressConnectConstants.php';

if ( file_exists( $wpc_constants_file ) && function_exists( 'wp_connect_live_stream' ) ){
	require_once( $wpc_constants_file );

	$width = 480;
	$height = 480;
	$xid = md5( 'http://www.mysite.com' );
	$attribution = '';
	$post_to_friends = WPC_OPTION_ENABLED;

	// render the live stream box in place

Change Log

Source File

wp_connect_live_stream() is located in wordpress-connect/wordpress-connect-functions.php.


wp_connect_activity_feed, wp_connect_comments, wp_connect_comments_default, wp_connect_facepile, wp_connect_like_box, wp_connect_like_button, wp_connect_like_button_default, wp_connect_login_button, wp_connect_recommendations, wp_connect_send_button