function __construct() { parent::__construct(); if (!KEYRING__HEADLESS_MODE) { add_action('keyring_' . $this->get_name() . '_request_ui', array($this, 'request_ui')); } }
function __construct() { parent::__construct(); // Nonces for the callback URL, which is used during the verify step $kr_nonce = wp_create_nonce('keyring-verify'); $nonce = wp_create_nonce('keyring-verify-' . $this->get_name()); $this->callback_url = Keyring_Util::admin_url($this->get_name(), array('action' => 'verify', 'kr_nonce' => $kr_nonce, 'nonce' => $nonce)); if (!class_exists('OAuthRequest')) { require dirname(dirname(dirname(__FILE__))) . '/oauth-php/OAuth.php'; } }
function __construct() { // If you need a custom __construct(), make sure to call the parent explicitly like this parent::__construct(); // Optionally register methods (of this object) to handle the UI for different actions // action is in the format "keyring_{$service}_{request/verify}_ui". // These are optional, and are only required if you need the user to see/do something during // each step. add_action('keyring_example_request_ui', array($this, 'request_ui')); add_action('keyring_example_verify_ui', array($this, 'verify_ui')); // Enable "basic" UI for entering key/secret, which a lot of services require // add_action( 'keyring_example_manage_ui', array( $this, 'basic_ui' ) ); // Optionally make this a service that we can communicate with *without* // requiring any sort of connection $this->requires_token(false); }