programming

You are currently browsing the archive for the programming category.

I love the simplicity of content-driven themes like Tarski by Ben Eastaugh. The design stays out of the way and lets the writing do the talking (see how Terence Tao uses this theme). But Tarski was hopelessly out of date (last commits were 15 years ago), so I used Codex to refresh the codebase and make it work with newer versions of PHP and WordPress.

Here’s what I changed:

  • Added proper WordPress title-tag support and moved title generation to modern filters (document_title_separator and pre_get_document_title).
  • Removed the hardcoded tag from header.php.
  • Added wp_body_open() to improve compatibility with newer plugins.
  • Rebuilt the document title logic to match modern WordPress contexts (front page, home, archives, taxonomy, etc.).
  • Updated deprecated tarski_doctitle() to delegate to the new title builder.
  • Fixed PHP 8.x constructor deprecations in TarskiOptions and the recent posts widget.
  • Updated the widget to use posts_per_page, wp_reset_postdata(), and a safe offset.
  • Fixed PHP 8.x warnings around dynamic properties and header option checks.
  • Matched the Walker_Comment method signatures to avoid fatal errors in WordPress 6.9 / PHP 8.3.
  • Hardened option handling to avoid undefined index notices.

In addition, hosting on Bluehost required an explicit configuration change for PHP session garbage collection. I created or edited a .user.ini file with the following settings:

session.gc_probability = 1
session.gc_divisor = 100

I am deliberately conservative with respect to security, as PHP is not my primary language. If you notice any remaining issues or outdated patterns, pull requests are very welcome. I’ve put the refreshed code in a GitHub repo here: https://github.com/leoferres/tarski.git. I’m not really planning to maintain this code except for fixing small security vulnerabilities like I said above.

Tags: , , , , , ,