options = $options;
$this->nonce = $nonce;
}
/*
* Generate admin page tabs
*/
private function page_tabs( $current_tab ) {
$tabs = array(
'general' => esc_html__( 'General', 'advanced-woo-labels' ),
);
$tabs_html = '';
foreach ( $tabs as $name => $label ) {
$tabs_html .= '' . esc_html( $label ) . '';
}
$tabs_html = '
' . $tabs_html . '
';
return $tabs_html;
}
/*
* Generate admin settings page
*/
public function generate_page() {
$current_tab = empty( $_GET['tab'] ) ? 'general' : sanitize_text_field( $_GET['tab'] );
if ( isset( $_POST["Submit"] ) && current_user_can( 'manage_options' ) && isset( $_POST["_wpnonce"] ) && wp_verify_nonce( $_POST["_wpnonce"], 'plugin-settings' ) ) {
AWL_Admin_Options::update_settings();
}
echo '';
echo '
';
echo ''. __( 'Settings', 'advanced-woo-labels' ) .'
';
echo $this->page_tabs( $current_tab );
echo '';
echo '';
}
}
endif;