Blog

How to exchange data from PHP to JavaScript in WordPress

Posted by on 2:31 pm in Knowledge Base | Comments Off on How to exchange data from PHP to JavaScript in WordPress

I was involved in writing a small plugin project last week, for which I found myself reading a database value from WordPress (in PHP) that I wanted to use in JavaScript. I don’t do much in JavaScript and it had occurred to me that I had no idea how I should exchange the data. After some digging I found several posts on this subject, and I found the most straightforward one was by Toby Osbourn. He made me aware of the wp_localize_script() function and gives a brief example. Thanks, Toby! The function is designed to over localised values...

read more

How to exchange data from PHP to JavaScript in WordPress

Posted by on 2:31 pm in Knowledge Base | Comments Off on How to exchange data from PHP to JavaScript in WordPress

I was involved in writing a small plugin project last week, for which I found myself reading a database value from WordPress (in PHP) that I wanted to use in JavaScript. I don’t do much in JavaScript and it had occurred to me that I had no idea how I should exchange the data. After some digging I found several posts on this subject, and I found the most straightforward one was by Toby Osbourn. He made me aware of the wp_localize_script() function and gives a brief example. Thanks, Toby! The function is designed to over localised values...

read more

How to find your Followers on Twitch

Posted by on 2:27 pm in Knowledge Base | Comments Off on How to find your Followers on Twitch

Twitch is a little weird in that it doesn’t provide a menu accessible link to a list of your current followers (as of April 2019). After all, if you’ve had a nice conversation with somebody, and you’d like to see when they’re live next, you may want to follow a follower. Thankfully though, there’s a quick URL hack that’ll show us just the same. Amend this: https://twitch.tv/user/followers where user is your user name. You may need to be logged in for this list to come up properly. For example, you can see...

read more

How to connect from your Mac to your Windows 10 Computer

Posted by on 1:29 am in Knowledge Base | Comments Off on How to connect from your Mac to your Windows 10 Computer

Networking sucks, particularly when Windows is involved. I’m not actually sure why, but I guess it has to do with the fact that deep down, manufacturers and software developer really don’t want us to connect arbitrary devices to suit our needs. It’s just a fact of technological survival I guess. I’ve recently re-installed Windows on my desktop, and now my Mac cannot connect to Windows anymore. I had to set this up again from scratch. While I remember how to do it, here’s how it (once) worked for me: On Your...

read more

How to use a PS4 Controller on your PS3

Posted by on 1:04 pm in Knowledge Base | Comments Off on How to use a PS4 Controller on your PS3

Even after so many years of use, I still love my Playstation 3. I can’t imagine a life without it. As such, I get nervous thinking about the fact that native PS3 Controllers are no longer in production. What happens when my ever so slightly worn out two controllers give up? How will I play my favourite platform games? Thankfully, Sony made it possible since software version 4.6 to use the newer Playstation 4 controllers on our Playstation 3 systems. Those are available in great numbers and colours, and from what I hear, they even have...

read more

How to add files to a ZIP archive on the Command Line

Posted by on 5:54 pm in Knowledge Base | Comments Off on How to add files to a ZIP archive on the Command Line

Before submitting ZIP files to various third parties, I often have the need to ether remove superfluous files from my archives. Until today I’ve never had the need to add a file to such archives. Had that happened in the past, I would have probably just deleted the whole archive and crated a new one from scratch. Today I felt adventurous and researched a way to add files to existing ZIP files and found a (not-so-obvious) solution to this puzzle, using the -r switch. Let me show you how it works: zip -rv YourArchive.zip NewFile.txt...

read more

Show Me The Cookies: How to list all cookies on your WordPress site

Posted by on 3:43 pm in Knowledge Base | Comments Off on Show Me The Cookies: How to list all cookies on your WordPress site

I’ve been working on a new plugin for WordPress called Cookies. It shows you a list of all cookies on your current site. Once activated, you can find this list under Appearance – Cookies. In addition, you can also display this list to your visitors by adding the shortcode [cookies] to any post or page. Many of those cookies are used by WordPress to track things such as “are you logged in”, so I’ve added an option to filter WordPress related cookies out. This list is available with the [cookies-nowp] shortcode....

read more

Child Theme Wizard – Version 1.3 released

Posted by on 12:36 pm in Knowledge Base, Plugins | Comments Off on Child Theme Wizard – Version 1.3 released

This morning I felt like a bit of coding, and something that’s been on my to-do list for a while was to update my Child Theme Wizard plugin. It’s been making over 10.000 users happy since 2013. The main reason for the update was to update the compatibility flag with WordPress 5.1 – it was already compatible with the latest version, it just wasn’t explicitly set. On this occasion I found a couple of other items I could improve upon: updated the link to the WordPress Codex about Child Themesverified compatibility with...

read more

How to copy Windows.old to an external drive

Posted by on 3:41 pm in Knowledge Base | Comments Off on How to copy Windows.old to an external drive

After a recent Windows 10 Refresh, I found myself with most of my data missing from my installation – a bit of a surprise, having done Windows refreshes before and seeing that I selected the option to “keep all my data”. Ah well… However, Windows was kind enough to preserve much of my previous configuration in an folder called Windows.old. As such, I could at least go back to some of the system data that I needed. Thank you, Windows Before moving on with major re-installation work, I thought it would be wise to...

read more

How to disable the Login with WordPress.com prompt

Posted by on 3:16 pm in Knowledge Base | Comments Off on How to disable the Login with WordPress.com prompt

One of my self hosted WordPress sites kept offering me to login with my WordPress.com credentials. I find that mindnumbingly annoying, since I don’t use WordPress.com (nor can I remember my credentials). Thankfully there’s an easy way to switch this prompt off. This integration comes courtesy of Jetpack. There’s an option under Jetpack – Settings – Security in which we can turn this feature on and off. After flicking the switch, this setting is saved automatically and WordPress won’t offer anything other...

read more