Wacław Jacek

Wacław Jacek

  • Home
  • Skills & Work
  • Contact
  • Registering callbacks with variable-name WordPress hooks

    Registering callbacks with variable-name WordPress hooks

    Some action and filter names used by WordPress and plugins have variable names like this one: If you only care about one specific value of $key or the value is fairly predictable, that’s pretty OK (although still has the drawback of reduced searchability). If, however, you would like to register a callback for any value […]

    Wacław Jacek

    March 22, 2022
    WordPress, WordPress patterns
  • WP Gotcha #1: Passing an empty array as a WP_Query parameter

    WP Gotcha #1: Passing an empty array as a WP_Query parameter

    With this article, I would like to start a series called WP Gotchas. In it, I will describe some problems you might and probably will run into as a WordPress plugin developer – if you haven’t already. At one point I was caught off-guard by them. Maybe this post will help you if you ever […]

    Wacław Jacek

    April 15, 2020
    WordPress
    WordPress Gotchas, WP_Query
  • Adding a photo to custom email addresses in Gmail

    Adding a photo to custom email addresses in Gmail

    It is not immediately obvious how to add a photo to be displayed in Gmail for a custom, non-Gmail email address. Here is how you can do it as of January 2019:

    Wacław Jacek

    January 18, 2019
    Internet
  • Count total number of items in nested arrays in PHP

    Count total number of items in nested arrays in PHP

    Today I was working on some code that had arrays structured like this: I needed to calculate the total number of items in the nested arrays. I didn’t find a PHP function to help me with that but I came up with this idea:

    Wacław Jacek

    October 23, 2018
    PHP
  • Programmatically checking WordPress plugin dependencies

    Programmatically checking WordPress plugin dependencies

    Sometimes a WordPress plugin you are writing extends the functionality of another plugin or simply relies on it to work. In these cases, you need to make sure the plugins your plugin depends on are installed and active to be sure you can use their functionality. There are some existing libraries that you can use […]

    Wacław Jacek

    October 18, 2018
    WordPress

Create a website or blog at WordPress.com