The wp_connect_login_button function renders a Facebook Login Button based on the specified setting values. It can be used by theme designers who would like to add specific login button(s) to their theme.


<?php wp_connect_login_button
); ?>


(required) Whether to show profile photos on the plugin or not.
Valid Values:

Default: None

(integer) (required) The width of the plugin in pixels.
Default: None
(integer) (required) The maximum number of rows of faces to display.
Default: None
(string) (required). A comma separated list of extended permissions. By default the Login button prompts users for their public information. If your application needs to access other parts of the user’s profile that may be private, your application can request extended permissions. A complete list of extended permissions can be found here.
Default: None; an empty string is allowed.
(boolean) (optional) Whether to print the plugin code (TRUE) or return it as a PHP variable (FALSE).
Default: TRUE


Default Usage

Prints the Login Button.

// 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_login_button' ) ){
	require_once( $wpc_constants_file );

	$show_faces = WPC_OPTION_ENABLED;
	$width = 480;
	$max_rows = 2;
	$perms = 'email,read_stream';

	// render the login button in place

Change Log

Source File

wp_connect_login_button() 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_live_stream, wp_connect_recommendations, wp_connect_send_button