'string', 'sanitize_callback'=> 'sanitize_text_field', ) ); add_settings_field( 'ooo-woo-start-date', // id of the settings field 'Start Date of the Out of Office', // title 'out_of_office_for_woo_options_cb_start_date', // callback function 'out-of-office-for-woo', // page on which settings display 'out-of-office-for-woo-section' // section on which to show the settings ); register_setting( 'out-of-office-for-woo', //option group ???? check if this should be the slug or the option section id!!! 'ooo_woo_end_date', array( 'type' => 'string', 'sanitize_callback'=> 'sanitize_text_field', ) ); add_settings_field( 'ooo-woo-end-date', // id of the settings field 'End Date of the Out of Office', // title 'out_of_office_for_woo_options_cb_end_date', // callback function 'out-of-office-for-woo', // page on which settings display 'out-of-office-for-woo-section' // section on which to show the settings ); register_setting( 'out-of-office-for-woo', //option group ???? check if this should be the slug or the option section id!!! 'ooo_woo_title', array( 'type' => 'string', 'sanitize_callback'=> 'sanitize_text_field', ) ); add_settings_field( 'ooo-woo-title', // id of the settings field 'Title for the Out of Office message', // title 'out_of_office_for_woo_options_cb_title', // callback function 'out-of-office-for-woo', // page on which settings display 'out-of-office-for-woo-section' // section on which to show the settings ); register_setting( 'out-of-office-for-woo', //option group ???? check if this should be the slug or the option section id!!! 'ooo_woo_message', array( 'type' => 'string', 'sanitize_callback'=> 'sanitize_textarea_field', ) ); add_settings_field( 'ooo-woo-message', // id of the settings field 'Message for the Out of Office', // title 'out_of_office_for_woo_options_cb_message', // callback function 'out-of-office-for-woo', // page on which settings display 'out-of-office-for-woo-section' // section on which to show the settings ); register_setting( 'out-of-office-for-woo', //option group ???? check if this should be the slug or the option section id!!! 'ooo_woo_is_active', array( 'type' => 'string', 'sanitize_callback'=> 'sanitize_text_field', ) ); add_settings_field( 'ooo-woo-is-active', // id of the settings field 'How should Out of Office be activated', // title 'out_of_office_for_woo_options_cb_is_active', // callback function 'out-of-office-for-woo', // page on which settings display 'out-of-office-for-woo-section' // section on which to show the settings ); register_setting( 'out-of-office-for-woo', //option group ???? check if this should be the slug or the option section id!!! 'ooo_woo_show_in_order_confirmation_email', array( 'type' => 'string', 'sanitize_callback'=> 'sanitize_text_field', ) ); add_settings_field( 'ooo_woo_show_in_order_confirmation_email', // id of the settings field 'Show message in the order confirmation Email', // title 'out_of_office_for_woo_options_cb_show_in_order_confirmation_email', // callback function 'out-of-office-for-woo', // page on which settings display 'out-of-office-for-woo-section' // section on which to show the settings ); register_setting( 'out-of-office-for-woo', //option group ???? check if this should be the slug or the option section id!!! 'ooo_woo_show_on_shopping_cart_page', array( 'type' => 'string', 'sanitize_callback'=> 'sanitize_text_field', ) ); add_settings_field( 'ooo_woo_show_on_shopping_cart_page', // id of the settings field 'Show message on the Shopping Cart page', // title 'out_of_office_for_woo_options_cb_show_on_shopping_cart_page', // callback function 'out-of-office-for-woo', // page on which settings display 'out-of-office-for-woo-section' // section on which to show the settings ); register_setting( 'out-of-office-for-woo', //option group ???? check if this should be the slug or the option section id!!! 'ooo_woo_show_on_checkout_page', array( 'type' => 'string', 'sanitize_callback'=> 'sanitize_text_field', ) ); add_settings_field( 'ooo_woo_show_on_checkout_page', // id of the settings field 'Show message on the Checkout page', // title 'out_of_office_for_woo_options_cb_show_on_checkout_page', // callback function 'out-of-office-for-woo', // page on which settings display 'out-of-office-for-woo-section' // section on which to show the settings ); /*register_setting( 'out-of-office-for-woo', //option group ???? check if this should be the slug or the option section id!!! 'ooo_woo_show_top_bar', array( 'type' => 'string', 'sanitize_callback'=> 'sanitize_text_field', ) ); add_settings_field( 'ooo_woo_show_top_bar', // id of the settings field 'Show a top bar with the out of office', // title 'out_of_office_for_woo_options_cb_show_top_bar', // callback function 'out-of-office-for-woo', // page on which settings display 'out-of-office-for-woo-section' // section on which to show the settings );*/ } function out_of_office_for_woo_options_cb_start_date() { $ooo_woo_start_date = get_option( 'ooo_woo_start_date', '' ); ?>