'ip_selected_as_shipping', ) ); add_settings_field( 'ip_select_show_logo', // As of WP 4.6 this value is used only internally. // Use $args' label_for to populate the id inside the callback. __( 'Show logo in cart and checkout', 'inpost-paczkomaty' ), 'ip_select_show_logo_cb', 'inpost_paczkomaty_settings', 'inpost_section_developers', array( 'label_for' => 'ip_select_show_logo', ) ); add_settings_field( // Option 1 'ip_select_show_logo_img', // Option ID __( 'Logo', 'inpost-paczkomaty' ), 'ip_select_show_logo_img_cb', 'inpost_paczkomaty_settings', 'inpost_section_developers', array( // The $args 'label_for' => 'ip_select_show_logo_img' ) ); add_settings_field( 'ip_select_weight_limit', // As of WP 4.6 this value is used only internally. // Use $args' label_for to populate the id inside the callback. __( 'Weight limit', 'inpost-paczkomaty' ), 'ip_select_weight_limit_cb', 'inpost_paczkomaty_settings', 'inpost_section_developers', array( 'label_for' => 'ip_select_weight_limit', ) ); add_settings_field( 'ip_select_weight_limit_value', // As of WP 4.6 this value is used only internally. // Use $args' label_for to populate the id inside the callback. __( 'Max weight (kg)', 'inpost-paczkomaty' ), 'ip_select_weight_limit_value_cb', 'inpost_paczkomaty_settings', 'inpost_section_developers', array( 'label_for' => 'ip_select_weight_limit_value', ) ); add_settings_field( 'ip_select_weight_limit_result', // As of WP 4.6 this value is used only internally. // Use $args' label_for to populate the id inside the callback. __( 'Weight limit result', 'inpost-paczkomaty' ), 'ip_select_weight_limit_result_cb', 'inpost_paczkomaty_settings', 'inpost_section_developers', array( 'label_for' => 'ip_select_weight_limit_result', ) ); add_settings_field( 'ip_select_dimensions_limit', // As of WP 4.6 this value is used only internally. // Use $args' label_for to populate the id inside the callback. __( 'Dimensions limit', 'inpost-paczkomaty' ), 'ip_select_dimensions_limit_cb', 'inpost_paczkomaty_settings', 'inpost_section_developers', array( 'label_for' => 'ip_select_dimensions_limit', ) ); add_settings_field( 'ip_select_dimensions_limit_width', // As of WP 4.6 this value is used only internally. // Use $args' label_for to populate the id inside the callback. __( 'Max width (cm)', 'inpost-paczkomaty' ), 'ip_dimensions_limit_width_cb', 'inpost_paczkomaty_settings', 'inpost_section_developers', array( 'label_for' => 'ip_select_dimensions_limit_width', ) ); add_settings_field( 'ip_select_dimensions_limit_height', // As of WP 4.6 this value is used only internally. // Use $args' label_for to populate the id inside the callback. __( 'Max height (cm)', 'inpost-paczkomaty' ), 'ip_dimensions_limit_height_cb', 'inpost_paczkomaty_settings', 'inpost_section_developers', array( 'label_for' => 'ip_select_dimensions_limit_height', ) ); add_settings_field( 'ip_select_dimensions_limit_length', // As of WP 4.6 this value is used only internally. // Use $args' label_for to populate the id inside the callback. __( 'Max length (cm)', 'inpost-paczkomaty' ), 'ip_dimensions_limit_length_cb', 'inpost_paczkomaty_settings', 'inpost_section_developers', array( 'label_for' => 'ip_select_dimensions_limit_length', ) ); add_settings_field( // Option 1 'save_shortcode_cart_checkout', // Option ID __( 'Restore the classic view of the cart and checkout', 'inpost-paczkomaty' ), 'save_shortcode_cart_checkout_cb', 'inpost_paczkomaty_settings', 'inpost_section_developers', array( // The $args 'label_for' => 'save_shortcode_cart_checkout' ) ); } /** * Register our inpost_settings_init to the admin_init action hook. */ add_action( 'admin_init', 'inpost_settings_init' ); /** * Developers section callback function. * * @param array $args The settings array, defining title, id, callback. */ function inpost_paczkomaty_settings_section_developers_callback( $args ) { ?>

'; // Zmień 'nazwa_twojej_opcji' } function ip_dimensions_limit_length_cb( $args ) { $options = get_option( 'inpost_paczkomaty_options' ); $val = ''; if ( isset( $options[ $args['label_for'] ] ) && ! empty( $options[ $args['label_for'] ] ) ) { $val = $options[ $args['label_for'] ]; } // Wyświetlenie pola input typu number, gdzie będzie przechowywana wartość opcji echo ''; // Zmień 'nazwa_twojej_opcji' } function ip_dimensions_limit_height_cb( $args ) { $options = get_option( 'inpost_paczkomaty_options' ); $val = ''; if ( isset( $options[ $args['label_for'] ] ) && ! empty( $options[ $args['label_for'] ] ) ) { $val = $options[ $args['label_for'] ]; } // Wyświetlenie pola input typu number, gdzie będzie przechowywana wartość opcji echo ''; // Zmień 'nazwa_twojej_opcji' } function ip_select_weight_limit_result_cb( $args ) { // Get the value of the setting we've registered with register_setting() $options = get_option( 'inpost_paczkomaty_options' ); ?>

'; // Zmień 'nazwa_twojej_opcji' } /** * Pill field callbakc function. * * WordPress has magic interaction with the following keys: label_for, class. * - the "label_for" key value is used for the "for" attribute of the