Catch own Exceptions

Your exception isn’t caught by the try{} catch(){} block, because it isn’t thrown inside the try catch block. This demonstrates a lack of understanding of asynchronous events and the WordPress hook/action/event system. The methods of your object are attached to the init action hook, and are thrown when the init hook is fired, not when … Read more

Multiple Parameters for a Shortcode

Lets look at the shortcode [SH_TEST var1=”somevalue” var2=”someothervalue”]THE SHORTCODE CONTENT[/SH_TEST] the shortcode handler function accepts 3 paramters $atts – an array of attributes passed by the shortcode in our case: $atts[‘var1’] is set to ‘somevalue’ $atts[‘var2’] is set to ‘someothervalue’ $content – is a string of the value enclosed with in the shortcode tags, in … Read more

Get list of available wordpress actions

I’d just like to point out that that is, by no means, anywhere NEAR a complete list. According to adambrown.info, there are 595 actions and 970 filters in wordpress 3.3…and that’s just by default, not including hooks added by your plugins. You might be able to do something with global $wp_actions or global $wp_filters, depending … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)