Skip to content

Instantly share code, notes, and snippets.

@thaboklass
Created June 17, 2021 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thaboklass/6cbf1650be4141beb988fad5bd46dad9 to your computer and use it in GitHub Desktop.
Save thaboklass/6cbf1650be4141beb988fad5bd46dad9 to your computer and use it in GitHub Desktop.
<?php
public function __construct() {
// Add RobberBaron.TV options
$this->robber_baron_tv_add_options();
// Set the option to true, if is in fact connected
if (get_option('robber_baron_tv_connected') == 'true') {
$this->robber_baron_tv_connected = 'true';
}
// Get the email from the options
$this->robber_baron_tv_email_address = get_option('robber_baron_tv_email_address');
// If the connection is not enable, try to connect
if ($this->robber_baron_tv_email_address != '' && $this->robber_baron_tv_connected == 'false') {
$this->robber_baron_tv_connect();
}
// This loads admin scripts
add_action('admin_enqueue_scripts', array($this, 'robber_baron_tv_load_admin_scripts'));
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment