Wordpress: добавления глобальных переменных (настроек)

/**
*
* The page content surrounding the settings fields. Usually you use this to instruct non-techy people what to do.
*
*/
function custom_settings_page(){
?>
<div class="wrap">
<h1>Custom settings</h1>
<p>This information is used on page "Home".</p>
<form method="post" action="options.php">
<?php
settings_fields("home_section");
settings_fields("cross_section");
do_settings_sections("custom-options");
submit_button();
?>
</form>
</div>
<?php }

function display_home_left_title_element(){ ?>
<input type="text" name="home_left_title" placeholder="Enter left title" value="<?php echo get_option('home_left_title'); ?>" size="35">
<?php }

/**
* Here you tell WP what to enqueue into the <form> area. You need:
* 1. add_settings_section
* 2. add_settings_field
* 3. register_setting
*/

function display_custom_info_fields(){

add_settings_section("home_section", "Home page", null, "custom-options");

add_settings_field("home_left_title", "Left title", "display_home_left_title_element", "custom-options", "home_section");

register_setting("home_section", "home_left_title");
}

add_action("admin_init", "display_custom_info_fields");

/**
* Tie it all together by adding the settings page to wherever you like. For this example it will appear
* in Settings > Contact Info
*/
function add_custom_info_menu_item(){
add_menu_page("Custom settings", "Custom settings", "manage_options", "custom-settings", "custom_settings_page");
// add_submenu_page("custom-settings", "Home page", "Home page", "manage_options", "custom-settings-home", "custom_settings_page");
}

add_action("admin_menu", "add_custom_info_menu_item");