public static function admin_init()
 {
     add_settings_section(LastTrackPlugin::get_name_with_prefix('general'), __('General', LastTrackPlugin::domain()), function () {
     }, LastTrackPlugin::get_name_with_prefix('options'));
     add_settings_section(LastTrackPlugin::get_name_with_prefix('parsing'), __('Parsing config', LastTrackPlugin::domain()), function () {
     }, LastTrackPlugin::get_name_with_prefix('options'));
     add_settings_field(LastTrackPlugin::get_name_with_prefix('url'), __('Link', LastTrackPlugin::domain()), ElementsLibrary::echo_text(LastTrackPlugin::get_name_with_prefix('url'), LastTrackPlugin::get_option('url')), LastTrackPlugin::get_name_with_prefix('options'), LastTrackPlugin::get_name_with_prefix('general'));
     $is_require_auth = LastTrackPlugin::get_option('require_auth') != '';
     add_settings_field(LastTrackPlugin::get_name_with_prefix('require_auth'), __('Use authrization', LastTrackPlugin::domain()), ElementsLibrary::echo_checkbox(LastTrackPlugin::get_name_with_prefix('require_auth'), $is_require_auth), LastTrackPlugin::get_name_with_prefix('options'), LastTrackPlugin::get_name_with_prefix('general'));
     $tags = array();
     if (!$is_require_auth) {
         $tags['readonly'] = true;
     }
     add_settings_field(LastTrackPlugin::get_name_with_prefix('login'), __('Login', LastTrackPlugin::domain()), ElementsLibrary::echo_text(LastTrackPlugin::get_name_with_prefix('login'), $is_require_auth ? LastTrackPlugin::get_option('login') : '', null, $tags), LastTrackPlugin::get_name_with_prefix('options'), LastTrackPlugin::get_name_with_prefix('general'));
     add_settings_field(LastTrackPlugin::get_name_with_prefix('password'), __('Password', LastTrackPlugin::domain()), ElementsLibrary::echo_text(LastTrackPlugin::get_name_with_prefix('password'), $is_require_auth ? LastTrackPlugin::get_option('password') : '', null, $tags), LastTrackPlugin::get_name_with_prefix('options'), LastTrackPlugin::get_name_with_prefix('general'));
     add_settings_field(LastTrackPlugin::get_name_with_prefix('connect_timeout'), __('Connect timeout', LastTrackPlugin::domain()), ElementsLibrary::echo_text(LastTrackPlugin::get_name_with_prefix('connect_timeout'), LastTrackPlugin::get_option('connect_timeout')), LastTrackPlugin::get_name_with_prefix('options'), LastTrackPlugin::get_name_with_prefix('general'));
     add_settings_field(LastTrackPlugin::get_name_with_prefix('timeout'), __('Timeout', LastTrackPlugin::domain()), ElementsLibrary::echo_text(LastTrackPlugin::get_name_with_prefix('timeout'), LastTrackPlugin::get_option('timeout')), LastTrackPlugin::get_name_with_prefix('options'), LastTrackPlugin::get_name_with_prefix('general'));
     add_settings_field(LastTrackPlugin::get_name_with_prefix('parse_format'), __('Parse format', LastTrackPlugin::domain()), ElementsLibrary::echo_text(LastTrackPlugin::get_name_with_prefix('parse_format'), LastTrackPlugin::get_option('parse_format')), LastTrackPlugin::get_name_with_prefix('options'), LastTrackPlugin::get_name_with_prefix('parsing'));
     add_settings_field(LastTrackPlugin::get_name_with_prefix('exclude'), __('Excludes', LastTrackPlugin::domain()), ElementsLibrary::echo_text(LastTrackPlugin::get_name_with_prefix('exclude'), LastTrackPlugin::get_option('exclude')), LastTrackPlugin::get_name_with_prefix('options'), LastTrackPlugin::get_name_with_prefix('parsing'));
     register_setting(LastTrackPlugin::PREFIX, LastTrackPlugin::get_name_with_prefix('url'));
     register_setting(LastTrackPlugin::PREFIX, LastTrackPlugin::get_name_with_prefix('require_auth'));
     register_setting(LastTrackPlugin::PREFIX, LastTrackPlugin::get_name_with_prefix('login'));
     register_setting(LastTrackPlugin::PREFIX, LastTrackPlugin::get_name_with_prefix('password'));
     register_setting(LastTrackPlugin::PREFIX, LastTrackPlugin::get_name_with_prefix('connect_timeout'));
     register_setting(LastTrackPlugin::PREFIX, LastTrackPlugin::get_name_with_prefix('timeout'));
     register_setting(LastTrackPlugin::PREFIX, LastTrackPlugin::get_name_with_prefix('exclude'));
     register_setting(LastTrackPlugin::PREFIX, LastTrackPlugin::get_name_with_prefix('parse_format'));
 }
 public static function settings()
 {
     $post_options = array(LastTrackPlugin::get_name_with_prefix('information'), LastTrackPlugin::get_name_with_prefix('information_message'), LastTrackPlugin::get_name_with_prefix('title'), LastTrackPlugin::get_name_with_prefix('current_song'), LastTrackPlugin::get_name_with_prefix('last_songs'), LastTrackPlugin::get_name_with_prefix('count_songs'), LastTrackPlugin::get_name_with_prefix('href'));
     foreach ($post_options as $option) {
         if (!empty($_REQUEST[$option])) {
             update_option($option, $_REQUEST[$option]);
         }
     }
     $options = array(LastTrackPlugin::INFORMATION_NONE => __('None', LastTrackPlugin::domain()), LastTrackPlugin::INFORMATION_MESSAGE => __('Specified message', LastTrackPlugin::domain()), LastTrackPlugin::INFORMATION_FULL => __('Full', LastTrackPlugin::domain()));
     echo ElementsLibrary::draw_label(__('Error notification', LastTrackPlugin::domain()));
     echo ElementsLibrary::draw_select(LastTrackPlugin::get_name_with_prefix('information'), $options, LastTrackPlugin::get_option('information'));
     echo ElementsLibrary::draw_label(__('Error message', LastTrackPlugin::domain()));
     echo ElementsLibrary::draw_text(LastTrackPlugin::get_name_with_prefix('information_message'), LastTrackPlugin::get_option('information_message'));
     echo ElementsLibrary::draw_label(__('Title', LastTrackPlugin::domain()));
     echo ElementsLibrary::draw_text(LastTrackPlugin::get_name_with_prefix('title'), LastTrackPlugin::get_option('title'));
     echo ElementsLibrary::draw_label(__('Current track title', LastTrackPlugin::domain()));
     echo ElementsLibrary::draw_text(LastTrackPlugin::get_name_with_prefix('current_song'), LastTrackPlugin::get_option('current_song'));
     echo ElementsLibrary::draw_label(__('Last tracks title', LastTrackPlugin::domain()));
     echo ElementsLibrary::draw_text(LastTrackPlugin::get_name_with_prefix('last_songs'), LastTrackPlugin::get_option('last_songs'));
     echo ElementsLibrary::draw_label(__('Count last songs', LastTrackPlugin::domain()));
     echo ElementsLibrary::draw_text(LastTrackPlugin::get_name_with_prefix('count_songs'), LastTrackPlugin::get_option('count_songs'));
     echo ElementsLibrary::draw_label(__('Link to radio', LastTrackPlugin::domain()));
     echo ElementsLibrary::draw_text(LastTrackPlugin::get_name_with_prefix('href'), LastTrackPlugin::get_option('href'));
 }
<div class="wrap">
  <div class="icon32" id="icon-options-general"><br></div>
  <h2><?php 
_e('Last track settings', LastTrackPlugin::domain());
?>
</h2>
  <p></p>
  <form action="options.php" method="post">
    <?php 
settings_fields(LastTrackPlugin::PREFIX);
?>
    <?php 
do_settings_sections(LastTrackPlugin::get_name_with_prefix('options'));
?>
    <?php 
submit_button();
?>
  </form>
</div>
<?php 
wp_enqueue_script("jquery");
wp_enqueue_script(LastTrackPlugin::get_name_with_prefix('options_js'), plugins_url('js/options.js', __FILE__), array('jquery'));
 public static function get_option($option_name)
 {
     return get_option(LastTrackPlugin::get_name_with_prefix($option_name), LastTrackPlugin::$options[LastTrackPlugin::get_name_with_prefix($option_name)]);
 }