sudoku.php

PHP

A plugin to display a daily Sudoku puzzle

<?php
/*
Plugin Name: Sudoku
Description: A plugin to display a daily Sudoku puzzle on your WordPress site. Daily puzzles are stored in the database so you can review older puzzles.
Version: 2.2.0
Author: Mike Vahldieck
Author URI: http://it-breeze.info
Plugin URI: http://it-breeze.info
License: GPL2
*/

sudoku.js

JAVASCRIPT
jQuery(document).ready(function($) {
    let showSolutionActive = false;
    let checkAnswerActive = false;

    // Check Answer functionality
    $('#check-answer').on('click', function() {
        checkAnswerActive = !checkAnswerActive;
        if (checkAnswerActive) {
            $('#sudoku-grid input').each(function() {
                if ($(this).val() !== $(this).data('solution').toString()) {

sudoku.css

CSS
/* Container around the Sudoku puzzle */
#sudoku-container {
    max-width: 400px;
    margin: 20px auto;
    text-align: center;
    font-family: Arial, sans-serif;
}

/* The overall grid container just stacks .sudoku-row blocks */
#sudoku-grid {