Find broken shortcodes

If you recently changed your theme and used shortcodes from it or disabled plugins you maybe want to find all leftovers of them because they are not translated any more. You will find things like [shortcode attribute=”bla”] all over website. Obviously you don’t want to review each post on your website to find them manually. So there comes a little… Read more →

sort functions – access class member

If you want to sort a class member with the functions uasort, uksort, usort (the u stands for user-defined comparison function) you have to take care of some things. bool uksort ( array &$array , callable $key_compare_func ) The function takes as first parameter the array you want to sort as reference. Thereby no copy is made to the function stack and any changes are directly made on… Read more →

WordPress change post_date for tests

If you want to create a post via the post factory in you tests you can do it like this:

Make sure to pass a date! Unix timestamps or other formats won’t work. This creates 2 posts with different dates. You can test the function getPostsInYear(2014) as follows:

Post1 should not be returned by getPostsInYear( 2014 ) because… Read more →

Private Communication

Letters sealed with sealing wax are rare today – the keynote is quite good though. But also the ordinary letter has, since the rise of the Internet, lost its predominance for written communication. What we use today are mails, SMS, WhatsApp, Facebook.. And the vast amount of them are sending without “envelope” never mind seals. Like a modern form of… Read more →

Online IDE

All online IDE don’t fulfill my requirements of a IDE where I can – checkout git repositories – merge branches with visual support – no git editor integration – no paste in terminal – no git editor integration – no git editor integration – login via github was broken – no registration email received to… Read more →

How to install Scrapy

This line installs all requirements for pip first. After that you can install pip. With pip you can install Scrapy.

This should avoid errors like:

The reason for this error might be “out of memory”. Check the last lines of  dmesg | tail Read more →

WordPress action or filter not called

If you are using the wordpress api to hook into actions or filters there are some pitfalls. But these pitfalls are not wordpress related but likely your faults. I wan’t to show how to NOT hook into wordpress. 1. add_action( "actionA", array( __CLASS__, "processA", 10, 3) ); Please check the array declaration. Stupid mistake, but it’s hard to locate the error. You can output $wp_filter and check… Read more →

oBackup superSu errors

If you struggle with installing onandroid script (that is used by oBackup) and get the following error:

You should install superSU by Chainfire (just right from the PlayStore). You might have to update the su binary. After that make sure oBackup uses the right (superSU) instead of the build in superuser app (in case of CM). Also make sure… Read more →