This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Connect the widget to the user's RobberBaron account by | |
* sending a JSON reguest that will return the user's IS | |
* | |
* @param none | |
* @return none | |
*/ | |
function robber_baron_tv_connect() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Outputs pertinent nonces, actions and options for | |
// the section | |
settings_fields('robber_baron_tv_settings'); | |
// Renders the setting sections added to the page | |
// 'Configuration Settings' | |
do_settings_sections('robber-baron-tv-configuration'); | |
// Renders a submit button that saves all of the options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register section, fields and page | |
* | |
* Registers a new settings section and settings fields on the | |
* 'RobberBaron.TV' page of the WordPress dashboard. | |
* | |
* @param none | |
* @return none | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// If uninstall is not called from WordPress, exit | |
if (!defined('WP_UNINSTALL_PLUGIN')) { | |
exit(); | |
} | |
// delete options from options table | |
delete_option('robber_baron_tv_connected'); | |
delete_option('robber_baron_tv_email_address'); | |
delete_option('robber_baron_tv_user_id'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Widget callback: registers RobberBaron.TV | |
* widget | |
* | |
* @param none | |
* @return none | |
*/ | |
function robber_baron_tv_widget_reg() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add options for new activation | |
* | |
* This checks whether or not backend options that define the basic | |
* functionality have been added and if not, they are added | |
* with what have been determined as the most efficient defaults | |
* | |
* @param none | |
* @return none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Load scripts | |
* | |
* Load all relevant styles and scripts - in this case we load just | |
* one stylesheet and two javascript files | |
* | |
* @param none | |
* @return none | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Front-end display of widget. | |
* | |
* @see WP_Widget::widget() | |
* | |
* @param array $args Widget arguments. | |
* @param array $instance Saved values from database. | |
*/ |
NewerOlder