Inventory_Presser_Admin_Options::boolean_checkbox_setting_callback( string $setting_name, string $checkbox_label )
Outputs HTML that renders checkboxes.
Contents
Parameters Parameters
- $setting_name
-
(string) (Required) The name of the setting and control
- $checkbox_label
-
(string) (Required) The checkbox label that the user sees
Return Return
(void)
Source Source
File: includes/admin/class-admin-options.php
protected function boolean_checkbox_setting_callback( $setting_name, $checkbox_label ) { printf( '<input type="checkbox" name="%1$s[%2$s]" id="%2$s" %3$s> <label for="%2$s">%4$s</label>', esc_attr( INVP::OPTION_NAME ), esc_attr( $setting_name ), isset( $this->option[ $setting_name ] ) ? checked( $this->option[ $setting_name ], true, false ) : '', esc_html( $checkbox_label ) ); }
Expand full source code Collapse full source code View on Github