', esc_attr( $input_name ), checked( $saved_value, true, false ) ); // Output the checkbox field, optionally with label if ( isset( $atts['label'] ) ) { printf( '', esc_attr( $input_name ), $output, $atts['label'] ); } else { echo $output; } // Add field description if it is set if ( ! empty( $atts['desc'] ) ) { echo '

' . $atts['desc'] . '

'; } } /** * Render a number select field for an editor setting * * @since 2.0.0 * * @param array $atts The setting field's attributes */ function code_snippets_number_field( $atts ) { printf( ''; if ( ! empty( $atts['label'] ) ) { echo ' ' . $atts['label']; } // Add field description if it is set if ( ! empty( $atts['desc'] ) ) { echo '

' . $atts['desc'] . '

'; } }