1<?php
2/** Step 2 (from text above). */
3add_action( 'admin_menu', 'my_menu' );
4
5/** Step 1. */
6function my_menu() {
7 add_options_page( //this code Add submenu page to the Settings main menu
8 'My Options',
9 'My Menu', //this paramenter display menu option in administration setting
10 'manage_options',
11 'my-unique-identifier',
12 'my_options'
13 );
14}
15
16/** Step 3. */
17function my_options() {
18 if ( !current_user_can( 'manage_options' ) ) {
19 wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
20 }
21 echo 'Here is where I output the HTML for my screen.';
22 echo '</div><pre>';
23}
24?>