wp-discourse/lib/shortcodes/sso-client.php
Angus McLeod 92033ea5ba
Apply DiscourseConnect copy changes && new shortcode (#398)
* Apply DiscourseConnect copy changes && new shortcode

See further https://meta.discourse.org/t/sso-to-discourseconnect/183377

* Update usage of "Single Sign On" in readmes

* Apply DiscourseConnect copy changes && new shortcode

See further https://meta.discourse.org/t/sso-to-discourseconnect/183377

* Add logging copy change

* Apply DiscourseConnect copy changes && new shortcode

See further https://meta.discourse.org/t/sso-to-discourseconnect/183377

* Update version and changelog
2021-08-05 12:20:56 -07:00

44 lines
885 B
PHP
Vendored

<?php
/**
* Shortcode for discourse SSO
*
* @package WPDiscourse
*/
namespace WPDiscourse\SSOClient;
/**
* Class SSOClientShortcode
*/
class SSOClientShortcode extends SSOClientBase {
/**
* SSOClientShortcode constructor.
*/
public function __construct() {
add_shortcode( 'discourse_sso_client', array( $this, 'discourse_sso_client_shortcode' ) );
add_shortcode( 'discourse_connect_client', array( $this, 'discourse_sso_client_shortcode' ) );
}
/**
* Shortcode for SSO link.
*
* @method discourse_sso_client_shortcode
*
* @param array $atts shortcode params.
*
* @return string
*/
public function discourse_sso_client_shortcode( $atts = array() ) {
$options = shortcode_atts(
array(
'login' => null,
'link' => null,
'redirect' => null,
),
$atts
);
return $this->get_discourse_sso_link_markup( $options );
}
}