2018-08-31 18:50:29 -05:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Class for intializing and displaying all admin settings
|
|
|
|
*
|
|
|
|
* @package LBRYPress
|
|
|
|
*/
|
|
|
|
|
|
|
|
class LBRY_Admin
|
|
|
|
{
|
2018-09-11 15:10:15 -05:00
|
|
|
/**
|
|
|
|
* [__construct description]
|
|
|
|
*/
|
|
|
|
public function __construct()
|
2018-08-31 18:50:29 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called to initialize the settings interface
|
|
|
|
* @return [type] [description]
|
|
|
|
*/
|
|
|
|
public function settings_init()
|
|
|
|
{
|
|
|
|
add_action('admin_menu', array($this, 'create_options_page'));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates the options page in the WP admin interface
|
|
|
|
* @return [type] [description]
|
|
|
|
*/
|
|
|
|
public function create_options_page()
|
|
|
|
{
|
|
|
|
add_options_page(
|
|
|
|
__('LBRYPress Settings', 'lbrypress'),
|
|
|
|
__('LBRYPress', 'lbrypress'),
|
|
|
|
'manage_options',
|
|
|
|
'LBRYPress',
|
|
|
|
array($this, 'options_page_html')
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the Options Page HTML for the plugin
|
|
|
|
* @return [type] [description]
|
|
|
|
*/
|
|
|
|
public function options_page_html()
|
|
|
|
{
|
2018-09-11 15:10:15 -05:00
|
|
|
require_once(LBRY_ABSPATH . 'templates/options_page.php');
|
2018-08-31 18:50:29 -05:00
|
|
|
}
|
|
|
|
}
|