Title: Register Settings API
Author: Jenst
Published: <strong>10 Tháng 12, 2014</strong>
Last modified: 31 Tháng 12, 2014

---

Tìm kiếm plugin

Plugin này **chưa được cập nhật với 3 phiên bản mới nhất của WordPress**. Nó có 
thể không được hỗ trợ và bảo trì, và có thể xung đột với các phiên bản WordPress
mới nhất.

![](https://s.w.org/plugins/geopattern-icon/register-settings-api.svg)

# Register Settings API

 Bởi [Jenst](https://profiles.wordpress.org/jenst/)

[Tải về](https://downloads.wordpress.org/plugin/register-settings-api.1.4.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/register-settings-api/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/register-settings-api/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/register-settings-api/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/register-settings-api/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/register-settings-api/)

## Mô tả

Add settings to your own theme or plugin. As simple as writing an array.

Full documentation at: http://www.wp-load.com/register-settings-api/

#### Benefits of the plugin

 * Work fine as a plugin OR as included to your theme or plugin.
 * Everything you need is in one single file.
 * No more fighting the settings API. Just add your settings and you are done.
 * Tinymce, textarea, checkboxes, radio buttons, url, color, email supported.
 * It will from the array create a menu and a settings page with tabs and fields.

#### Full example, placed in functions.php OR your plugin

    ```
    add_filter('register_settings_api', 'settings_array');

    function settings_array( $options_page ) {
        $options_page['my-menu-slug'] = array(
            'menu_title' => 'My menu',
            'page_title' => 'My page',
            'option_name' => 'my_options_slug',
            'tabs' => array(
                'first' => array(
                    'tab_title' => 'My first tab',
                    'fields' => array(
                        'my_editor' => array(
                            'type' => 'tinymce',
                            'title' => 'My editor'
                        ),
                        'my_color' => array(
                            'type' => 'color',
                            'title' => 'My color'
                        )
                    ),
                ),
                'second' => array(
                    'tab_title' => 'My second tab',
                    'fields' => array(
                        'my_textarea' => array(
                            'type' => 'textarea',
                            'title' => 'My textarea'
                        )
                    )
                )
            )
        );
        return $options_page;
    }
    ```

## Ảnh màn hình

[⌊Full example. This is what it creates. Much more types than this available.⌉⌊Full
example. This is what it creates. Much more types than this available.⌉[

Full example. This is what it creates. Much more types than this available.

## Cài đặt

To use as a plugin:

 1. Upload `register-settings-api` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Place the array code (described in another tab) in your functions.php file OR in
    your plugin

To use as a class:

 1. Upload `register-settings-api.php` into your theme or plugin and include it
 2. Remove the comment on the top and only keep the class. Else it might belive it’s
    a plugin
 3. It’s recommended to rename the class, the instance and the class_exists class to
    prevent collision with other plugins
 4. Place the array code (described in another tab) in your functions.php file OR in
    your plugin

## Hỏi đáp

  Why use this plugin when there are a settings API that work fine?

Speed. It should take just a few minues to set up a whole lot of settings for your
plugin or theme.

  What makes this better than other plugins like this?

Simplicity. It’s one file to include (if not using the plugin directly). There is
one array to write.

  I want an advanced settings page not looking like default WordPress style. Is 
this plugin for me?

No, probably not. This plugin makes it simple to set up tabs with settings the “
default” way, not that much more. It’s made for speed not complexity.

  I don’t see any tabs. Why not?

If you only created ONE tab there are no meaning of adding tabs. Then it will not
add the tabs. You need two or more tabs to get them visible.

## Đánh giá

Không có đánh giá nào cho plugin này.

## Người đóng góp & Lập trình viên

“Register Settings API” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

 *   [ Jenst ](https://profiles.wordpress.org/jenst/)

[Dịch “Register Settings API” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/register-settings-api)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/register-settings-api/),
check out [SVN repository](https://plugins.svn.wordpress.org/register-settings-api/),
hoặc theo dõi [nhật ký phát triển](https://plugins.trac.wordpress.org/log/register-settings-api/)
qua [RSS](https://plugins.trac.wordpress.org/log/register-settings-api/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

#### 1.4

 * Many bug fixes
 * Array values “tab_description”, “before_tabs_text” and “after_tabs_text” added
 * “button” and “custom” field type added
 * “Get” now supports args

#### 1.3

 * Minor bug fixes
 * Change color field type to colorpicker to prevent collision with html5 color 
   field.
 * Change date field type to datepicker to prevent collision with html5 color field.
 * Added color (html5) field type
 * Added date (html5)field type

#### 1.2

 * Fixed bug with color field, JS error in some cases

#### 1.1

 * Warnings: More checks, less warnings
 * Title: Before it was named “description”. It’s used in the column to the left
 * Description: It’s used below the field
 * Empty: Add empty option to select boxes
 * Default: Add default value when no value is saved
 * Size: Added size to textarea, tinymce and multiselect
 * Get: Select dynamic values like posts, users, plugins, themes, menus, terms, 
   taxonomies, sidebars, post_types
 * New types: image, file, date, multiselect

#### 1.0

 * Initial release

## Meta

 *  Phiên bản **1.4**
 *  Cập nhật lần cuối **12 năm trước**
 *  Số lượt cài đặt **10+**
 *  Phiên bản WordPress ** 4.0 hoặc cao hơn **
 *  Đã kiểm tra lên đến **4.1.42**
 *  Ngôn ngữ
 * [English (US)](https://wordpress.org/plugins/register-settings-api/)
 * Thẻ
 * [admin](https://vi.wordpress.org/plugins/tags/admin/)[options](https://vi.wordpress.org/plugins/tags/options/)
   [settings api](https://vi.wordpress.org/plugins/tags/settings-api/)[wp-admin](https://vi.wordpress.org/plugins/tags/wp-admin/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/register-settings-api/advanced/)

## Đánh giá

 5 trên 5 sao.

 *  [  2 5-star reviews     ](https://wordpress.org/support/plugin/register-settings-api/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/register-settings-api/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/register-settings-api/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/register-settings-api/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/register-settings-api/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/register-settings-api/reviews/#new-post)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/register-settings-api/reviews/)

## Những người đóng góp

 *   [ Jenst ](https://profiles.wordpress.org/jenst/)

## Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/register-settings-api/)