I released my first WordPress plugin today. I have have been trawling through custom code I have coded over years, and found some that are ideal to turn into plugins. The first is a simple on that adds an address field on the post form, and allows user to add a googlemap identifying location, with a customisable widget. Will be adding a proximity search and multiple map marker display in future releases. Will also be creating a user guide to demontsrate how to create plugins, and how this particular one was made. Continue reading
By default, excerpt length of a WordPress post is set to 55 words. To change excerpt length using excerpt_length filter, add the following code to functions.php file in your theme folder:
function custom_excerpt_length( $length )
add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 );
The new word count setting is highlighted in red – leave the rest of the code as-is.
How to create georss from your wordpress site feed. Firstly, you will need to ensure that your posts have post meta values for latitude and longitude. Geonames provide extensive amount of worldwide geolocation data http://www.geonames.org/export/. Plugins can do this work, but this is an exercise to remove dependncy from googlemaps wordpress plugins (which add overhead and sometimes unecessary complaication with wordpress and/or theme upgrades. I was using geo-mashup plugin which was excellent, but I realised quickly I was only using about 5% of the functionality it offered – overkill!
Though you can manually add in post meta values for coordinates, or use plugins such as geopress or geo-mashup, it is not that complicated to automatically generate these yourself, using mathematics to work out coordinates. First of all, lets create the file that will do that work of generating coordinates (save as class.googleHelper.php, and save somewhere)
From 1998, but still hold true for any tester – we start off full o’ beans and anxious to prove things are OK, and our brain can onyl function in a class-oriented way (that’s programming class!). Then we quickly realise there is more value in finding weaknesses. Then once the obsessive behaviour finding errors comes to end, due to realisation that chase for perfection is a fruitless one, we end up prioritising problems we find. This issue needs resolving now, but this one can be done some time in the future. The final phase is most valuable of tester – testing is a discipline, its an approach, its a way to integrate QA into a project and moving beyond simply being someone who reports a bug. As a discipline a tester should not only be rasing bugs, they should be reporting improvements, possible requirements errors, and becoming a focal point of information for what does work and what doesnt work, and what needs fixing when.
- Phase 0 = There’s no difference between testing and debugging. Other than in support of debugging, testing has no purpose.
- Phase 1 = The purpose of testing is to show that the software works.
- Phase 2 = The purpose of testing is to show that the software doesn’t works.
- Phase 3 = The purpose of testing is not to prove anything, but to reduce the perceived risk of not working to an acceptable value.
- Phase 4 = Testing is not an act. It is a mental discipline that result in low-risk software without much testing effort.