-
eval() error check
We all know how dangerous eval() is in terms of security, but still it is the necessary evil sometimes. I’ve been developing a script last week that required eval() execution. I did pretty granular input validation with regular expressions and known troubleish test cases. Still, some expressions passed to the eval() function were prone to…
-
Plugin Base Skeleton
I got tired working on plugins and writing the same code snippets all over again, looking in the same old tutorial sites or my favorite WP 3 Plugin Dev book. So I released a startup script for plugins – http://wordpress.org/extend/plugins/dx-plugin-base/ . It contains most of the important snippets required for every plugin – registration of custom post…
-
Xdebug on Ubuntu for WordPress
Turns out enabling Xdebug on Ubuntu for Eclipse PDT is easier than doing the same on Windows. The short version is installing the module as per this tutorial – http://ubuntuforums.org/showthread.php?t=525257[bash]sudo apt-get install php5-dev php-pearsudo pecl install xdebug sudo updatedblocate xdebug (this one finds the xdebug path)sudo gedit /etc/php/apache2/php.ini[/bash] Adding this line (/w the path):[bash]zend_extension=”/usr/lib/php5/20060613/xdebug.so”sudo /etc/init.d/apache2…
-
The Business-IT Industry Relationship
The WordPress platform allows for a number of users to build business ideas over a number of options. Browsing online or offline (at a WordCamp or a regular WordPress meetup event) we could get in touch with WP developers, designers, writers, system administrators, support engineers and other technical. On the other hand, small teams are…
-
How to: Make a WordPress plugin translatable
WordPress has its own mechanism to support plugin translations, but if you are a plugin developer yourself, you need to take care of that process at first place. Everything important is covered in the i18n for WordPress devs page in the Codex. If you are new to this, a few comments: 1. You need a…
-
Xdebug for Fedora with PHP 5.3
In February I wrote a guide on setting up Xdebug for Eclipse usage under Ubuntu. Using a neat debugger while exploring an existing WordPress project is a must and among the two possibilities (the Zend one or Xdebug) I use Xdebug. However, setting it up on my ThinkPad took a bit more time due to…
-
Quick tip: get_terms with all terms
The get_terms WordPress function is listing all your terms for a given taxonomy (or taxonomies). However, the default callback returns only the terms with entries. Therefore your empty terms won’t be visible unless you use the hide_empty parameter with a false value, like this: [php] $product_terms = get_terms( ‘product’, array( ‘hide_empty’ => false ) );…