src/SimplePlugin.php
public function render_admin_options_page() {
        $default = $this->options;
        $current = $this->get_options();
        $params = array(
            'icon' => $this->get_icon(),
            'title' => $this->get_title(__('Settings', $this->get_textdomain())),
            'form_url' => get_bloginfo('url') . '/wp-admin/admin.php?page=' . $this->get_id('-settings')
        );

        // Update options if necessarry
        if (filter_input(INPUT_POST, 'submit')) {
            $res = $this->save_options($default);

            $params['message'] = true;
            $params['message_id'] = 'message_'.rand(0, 99);

            if ($res === true) {
                $params['message_type'] = 'updated';
                $params['message_text'] = __(
                    'Options were successfully updated!',
                    $this->get_textdomain()
                );
                $current = $this->get_options();
            }
            else {
                $params['message_type'] = 'error';
                $params['message_text'] = __(
                    'Options were <b>NOT</b> successfully updated!',
                    $this->get_textdomain()
                );
            }
        }

        // Prepare options for rendering
        $params['options'] = $this->prepare_options_for_render($default, $current);

        // Render template
        echo $this->twig->render('options_page.html.twig', $params);
    }
public function render_admin_options_page() {
        $default = $this->options;
        $current = $this->get_options();
        $params = array(
            'icon' => $this->get_icon(),
            'title' => $this->get_title(__('Settings', $this->get_textdomain())),
            'form_url' => get_bloginfo('url') . '/wp-admin/admin.php?page=' . $this->get_id('-settings')
        );

        // Update options if necessarry
        if (filter_input(INPUT_POST, 'submit')) {
            $res = $this->save_options($default);

            $params['message'] = true;
            $params['message_id'] = 'message_'.rand(0, 99);

            if ($res === true) {
                $params['message_type'] = 'updated';
                $params['message_text'] = __(
                    'Options were successfully updated!',
                    $this->get_textdomain()
                );
                $current = $this->get_options();
            }
            else {
                $params['message_type'] = 'error';
                $params['message_text'] = __(
                    'Options were <b>NOT</b> successfully updated!',
                    $this->get_textdomain()
                );
            }
        }

        // Prepare options for rendering
        $params['options'] = $this->prepare_options_for_render($default, $current);

        // Render template
        echo $this->twig->render('options_page.html.twig', $params);
    }
Renders default options page (in WP administration).

@since 0.1.3
@return void

@todo Add `Reset To Defaults` button!