<?php
/**
* Wordpress Extra Features
* =========================
*
*/
function BP_login_logo() { ?>

    <style type="text/css">

        #login h1 a, .login h1 a {

        background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo&icons/Rehab_Mantra_02.png);

        }

 </style>

<?php }

add_action( 'login_enqueue_scripts', 'BP_login_logo' );

function BP_login_logo_url() {    return home_url();

}
add_filter( 'login_headerurl', 'BP_login_logo_url' );



function BP_login_logo_url_title() {

    return 'REHAB MANTRA';

}

add_filter( 'login_headertitle', 'BP_login_logo_url_title' );

function login_background() {
echo '<style type="text/css">
body { background: #5A372C; }
.login form { background: #fff; }
</style>';
}
add_action('login_head', 'login_background');


/**

     * Add Extra Fields on Setting General tab

     * =========================================

     *

*/

add_action('admin_init', 'my_general_section');  

function my_general_section() {  

    add_settings_section(  

        'my_settings_section', // Section ID 

        'My Options:', // Section Title

        'my_section_options_callback', // Callback

        'general' // What Page?  This makes the section show up on the General Settings Page

    );



    add_settings_field( // Option 1

        'option_1', // Option ID

        'Facebook:', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed (General Settings)

        'my_settings_section', // Name of our section

        array( // The $args

            'option_1' // Should match Option ID

        )  

    ); 



   /* add_settings_field( // Option 2

        'option_2', // Option ID

        'Twitter:', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed

        'my_settings_section', // Name of our section (General Settings)

        array( // The $args

            'option_2' // Should match Option ID

        )  

    ); 

     add_settings_field( // Option 3

        'option_3', // Option ID

        'Linkedin:', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed

        'my_settings_section', // Name of our section (General Settings)

        array( // The $args

            'option_3' // Should match Option ID

        )  

    ); */

    

    add_settings_field( // Option 4

        'option_4', // Option ID

        'Instagram:', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed

        'my_settings_section', // Name of our section (General Settings)

        array( // The $args

            'option_4' // Should match Option ID

        )  

    ); 

  /*add_settings_field( // Option 4

        'option_13', // Option ID

        'Youtube:', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed

        'my_settings_section', // Name of our section (General Settings)

        array( // The $args

            'option_13' // Should match Option ID

        )  

    );   */

    

    add_settings_field( // Option 3

        'option_5', // Option ID

        'Phone Number:', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed

        'my_settings_section', // Name of our section (General Settings)

        array( // The $args

            'option_5' // Should match Option ID

        )  

    );

    

    /*add_settings_field( // Option 3

        'option_6', // Option ID

        'Phone Number(2):', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed

        'my_settings_section', // Name of our section (General Settings)

        array( // The $args

            'option_6' // Should match Option ID

        )  

    );

    

    add_settings_field( // Option 3

        'option_7', // Option ID

        'Fax:', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed

        'my_settings_section', // Name of our section (General Settings)

        array( // The $args

            'option_7' // Should match Option ID

        )  

    );*/



    add_settings_field( // Option 3

        'option_8', // Option ID

        'Email:', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed

        'my_settings_section', // Name of our section (General Settings)

        array( // The $args

            'option_8' // Should match Option ID

        )  

    );

    /*add_settings_field( // Option 3

        'option_9', // Option ID

        'Email(2):', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed

        'my_settings_section', // Name of our section (General Settings)

        array( // The $args

            'option_9' // Should match Option ID

        )  

    );*/

    

    add_settings_field( // Option 3

        'option_10', // Option ID

        'Address:', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed

        'my_settings_section', // Name of our section (General Settings)

        array( // The $args

            'option_10' // Should match Option ID

        )  

    );

    add_settings_field( // Option 3

        'option_11', // Option ID

        'Footer Heading Text:', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed

        'my_settings_section', // Name of our section (General Settings)

        array( // The $args

            'option_11' // Should match Option ID

        )  

    );

    add_settings_field( // Option 3

        'option_12', // Option ID

        'Footer Text:', // Label

        'my_textbox_callback', // !important - This is where the args go!

        'general', // Page it will be displayed

        'my_settings_section', // Name of our section (General Settings)

        array( // The $args

            'option_12' // Should match Option ID

        )  

    );          



    register_setting('general','option_1', 'esc_attr');

    register_setting('general','option_2', 'esc_attr');

    register_setting('general','option_3', 'esc_attr');

    register_setting('general','option_4', 'esc_attr');

    register_setting('general','option_13', 'esc_attr');

    register_setting('general','option_5', 'esc_attr');

    register_setting('general','option_6', 'esc_attr');

    register_setting('general','option_7', 'esc_attr');

    register_setting('general','option_8', 'esc_attr');

    register_setting('general','option_9', 'esc_attr');

    register_setting('general','option_10', 'esc_attr');

    register_setting('general','option_11', 'esc_attr');

    register_setting('general','option_12', 'esc_attr');

    

}



function my_section_options_callback() { // Section Callback

    echo '<p>Print Extra Fields:  <strong>html_entity_decode( get_option( option_1 ) )</strong></p>';  

}



function my_textbox_callback($args) {  // Textbox Callback

    $option = get_option($args[0]);

    echo '<input style="width:50%" type="text" id="'. $args[0] .'" name="'. $args[0] .'" value="' . $option . '" />  <strong>Print field content: </strong> html_entity_decode( get_option( '.$args[0].' ) )';

}



function remove_BP_menus(){

  //remove_menu_page( 'index.php' );                  //Dashboard

  //remove_menu_page( 'jetpack' );                    //Jetpack* 

  //remove_menu_page( 'edit.php' );                   //Posts

  //remove_menu_page( 'upload.php' );                 //Media

  //remove_menu_page( 'edit.php?post_type=page' );    //Pages

  //remove_menu_page( 'edit-comments.php' );          //Comments  

  //remove_menu_page( 'themes.php' );                 //Appearance

  //remove_menu_page( 'plugins.php' );                //Plugins

  //remove_menu_page( 'users.php' );                  //Users

  //remove_menu_page( 'tools.php' );                  //Tools

  //remove_menu_page( 'options-general.php' );        //Settings

}

add_action( 'admin_menu', 'remove_BP_menus' );