defaults = $this->ax_logwriter_get_defaults_option(); add_action( 'admin_init', array( $this, 'page_init' ) ); add_action( 'admin_menu', array( $this, 'add_plugin_page' ) ); } /** * Add options page */ public function add_plugin_page() { // Create a top level menu add_menu_page( __('AX Log Writer Settings','authentication-and-xmlrpc-log-writer'), __('AX Log Writer','authentication-and-xmlrpc-log-writer'), 'manage_options', 'axlw-setting-admin', array( $this, 'create_admin_page' ) ); // Create a sublevel entry for log viewer $logviewer_page = add_submenu_page( 'axlw-setting-admin', __('Custom Log Viewer','authentication-and-xmlrpc-log-writer'), __('Custom Log Viewer','authentication-and-xmlrpc-log-writer'), 'manage_options', 'axlw-logviewer-admin', array( $this, 'create_logviewer_page' ) ); // Use custom style in logviewer page add_action( 'admin_print_styles-'.$logviewer_page, array( $this, 'axlw_logwiewer_admin_styles' ) ); } /** * Options page callback */ public function create_admin_page() { // Set class property $this->options = $this->ax_logwriter_get_options(); ?>
axlw_tail($file, $lines);
$output = trim($output);
if( !empty($output) )
{
?>
'.htmlspecialchars($outline).'';
}
}
?>