Skip to main content
WordPress Cover Image

WordPress Code Snippets

When I first started building themes with WordPress, I spent a lot of time looking at other programmer’s code. I would find a snippet, pull it apart and learn from it. Rinse and repeat. I learnt a lot from this process, and still do. Other people will always be finding solutions to problems you have, or problems similar.

 

I have decided to start posting specific snippets of code that I use time and time again for other people to get some use out of them, and learn as I did.

 

All these snippets will be fully documented, so as to provide as much understanding as possible. I will also try to explain how they can be used, give ideas on how to adapt them, and link to other websites that I use myself.

Read More

spoon-plugin

Turbo VM Extension injecting code

For those of you who have found the same thing. Enter Turbo VM Extension.

 

I was in the latter stages of developing a WordPress theme when I found a strange section of code inserted at the bottom of the page. I originally thought it was a mistake in my code as there was a large white space at the bottom of the page until I used the console log on Google Chrome and noticed the following:

 

<div id=”spoon-plugin-kncgbdglledmjmpnikebkagnchfdehbm-2″ style=”display:none”></div>

 

Upon Googling this issue I found the snippet turned up in a few places. At the bottom of a piece of code on Github, bottom of forum signatures, and inside the code of other WordPress themes. Always at the bottom.

 

That day I had downloaded Turbo.net Launcher, a browser emulator. To create a login for the launcher I used spoon.net (seeing the connection now?). Turbo VM Extension is a Google Chrome Extension. When it is switched on, for some reason it injects itself into specific websites.

 

For now I have disabled the extension whilst I research it a little more…

Read More