This WordPress site uses the Google Authenticator plugin to provide two-factor authentication (2FA) when logging-in to the administration area. Occasionally I need to temporarily disable 2FA in order to publish posts from the blogging software I use. Traditionally toggling 2FA is achieved from the WordPress backend. This post looks at two alternative methods of doing this locally from the command line.
I’m probably doing Cloudflare a disservice by categorising it as a CDN provider, but that’s certainly one of the many services they offer and perhaps how most individuals using their free offering see them. Like me, I’m certain the vast majority of that group use the Cloudflare dashboard to configure their domains, but Cloudflare provides an API that allows you to programmatically manage those DNS records through a command-line interface of a *nix shell such as Bash.
Comments in WordPress are displayed using the wp_list_comments() function. This function takes many arguments. One of these is callback which takes the name of a defined function that in turn determines what and how comment data is output. If no callback function is given, wp_list_comments() uses a built-in default function.
Part of a project I’m working on requires re-setting a MySQL table by deleting most – but not all – rows. In PHP I’m using mysqli::prepare to prepare the MySQL statements.
$id = 5; $query = $conn->prepare("DELETE FROM table WHERE id>?");
The MySQL statement includes a parameter marker – denoted by ? – which is then substituted for the value of the $id variable using mysqli::bind_param.
A previous theme I used for this site incorporated
I’ve finally completed a plugin which provides the same functionality, but in a far more convenient way.
The collapsible lists currently displayed in this site’s sidebar are generated by this plugin.
I was recently looking to give my photo gallery an overhaul. I’m quite a fan of Adobe’s Spry framework, so I thought I’d give the Sliding Panels widget a try. There are several examples on Adobe’s site showing panels sliding vertically, horizontally and in any direction. The direction is controlled by some CSS and after successfully playing around with vertical and horizontal sliding I couldn’t figure out from the examples how to get the panels to slide in any direction. That is until I realised how the panels are laid out and the importance of one particular CSS declaration.