*/
class Alive5_Admin_Settings {
/**
* The ID of this plugin.
*
* @since 1.0.0
* @access private
* @var string $plugin_name The ID of this plugin.
*/
private $plugin_name;
/**
* The version of this plugin.
*
* @since 1.0.0
* @access private
* @var string $version The current version of this plugin.
*/
private $version;
/**
* Initialize the class and set its properties.
*
* @since 1.0.0
* @param string $plugin_name The name of this plugin.
* @param string $version The version of this plugin.
*/
public function __construct( $plugin_name, $version ) {
$this->plugin_name = $plugin_name;
$this->version = $version;
}
public function alive5_defaults() {
$defaults = array(
'a5_auth_url' => 'https://api.alive5.com/1.0/authuser',
'a5_widgets_url' => 'https://api.alive5.com/1.0/widget-code/get-all'
);
return $defaults;
}
public function alive5_page() {
add_menu_page(
'Alive5',
'Alive5',
'manage_options',
'alive5_page',
array($this, 'render_alive5_page'),
plugin_dir_url(__FILE__) . 'images/logo-small.png'
);
}
public function render_alive5_page( $active_tab = '' ) {
?>
'', 'a5_username' => '', 'a5_password' => '');
}
echo '';
echo '';
echo '';
// $this->a5_auth();
}
///////////////////// End Alive 5 Settings Tab /////////////////////
///////////////////// Alive 5 Widgets Tab /////////////////////
public function initialize_a5_widgets() {
add_settings_section(
'a5_widgets_section',
__('Widgets', 'a5_widgets'),
array($this, 'a5_widgets_section_callback'),
'a5_widgets'
);
register_setting(
'a5_widgets',
'a5_widgets'
);
}
// Callback function for a5_widgets
public function a5_widgets_section_callback() {
if (false == get_option('a5_settings')) {
echo '