2,417 reputation
1032
bio website blog.ashfame.com
location Delhi, India
age 25
visits member for 3 years, 9 months
seen yesterday

Developer + Entrepreneur + Opensource fanatic!

Working as Dragon Monk for AnattaDesign. We tackle user experience problems by creating products that fix them. We created Awesome Checkout and My Abandoned Carts.

You can get in touch via Twitter or check out my Github


May
29
comment Contents of HTML editor mangled after multiple UPDATES
Looks like a side-effect of some hackery stuff.
May
28
comment Plugin to set all Posts in a certain Category to a certain Post Format
@NitinKhanna My bad! Try this plugin
May
28
comment Plugin Redirect After Activation
If there is any output before the redirection function, it will fail because headers can't be set after the output has been started. Turn WP_DEBUG on in wp-config.php file and test.
May
26
comment Best practice for versioning wp-config.php?
Good to know, wasn't aware of assume-unchanged switch but here are my two points: (1) If you git add the file directly, it will be added to the index. So there is a risk you can accidentally add it at some point. (2) Merging a commit with this flag on will cause the merge to fail gracefully, so that you can handle it manually which makes this as not an elegant solution. It can only be used to temporarily ignore changes while something like a development session. Here read more - gitready.com/intermediate/2009/02/18/…
May
25
comment Plugin to set all Posts in a certain Category to a certain Post Format
@NitinKhanna Don't hesitate to try, nothing is gonna blow up :P Go ahead, it works for name/slug/id.
May
25
comment Fall Back Google CDN in JavaScript
@ChipBennett He is trying to have a fallback mechanism just like we have in HTML5 Boilerplate. Having a fallback is the best way among any other way.
May
25
comment Fall Back Google CDN in JavaScript
This will slow things down a bit and moreover only checks when the PHP actually ran and not everytime when the cached pages are served. Best is to do it on client side by checking if jQuery has been defined just after loading it.
May
25
comment Plugin to set all Posts in a certain Category to a certain Post Format
@NitinKhanna Did you try it? It should work. Because that app will use XMLRPC to publish the post on your WordPress, IMO.
May
25
comment Plugin to set all Posts in a certain Category to a certain Post Format
@Chris_O Thanks! I forgot about the condition while posting the answer
May
23
comment Best practice for versioning wp-config.php?
IMO, everything should be put under versioned control and the system should be able to handle different environments without any hackery stuff along keeping things secure and simple to work with. I just posted on how I do it, that covers all your concerns :) Let me know if you have any questions about my setup.
May
7
comment Can't get CSS Into the Head via add_action
@ChristopherDavis You are right! I changed the hook name to wp_enqueue_scripts because its specifically for that purpose but using any hook before that hook is just not using the JIT (just in time) approach, yet it is correct and works fine. Do you mean to say there is more to it? I have always been using init hook to enqueue/register scripts and styles & never ran into any issue. What say?
May
6
comment Add a Save Button to Custom Meta Box
See how the default submit button does, and mimic that?
May
6
comment How to set the default value of a option in a theme?
IMO, wp_parse_args() is still better because in using the default parameter of get_option(), that kicks in only when get_option() doesn't return anything from database. It won't be useful in the case when you have a subset of options filled in and wants to fill the missing ones from the defaults, like when you are upgrading your plugin, and all existing users of that plugin doesn't have the newly added setting in their database yet. We would want the default to kick in for that.
May
6
comment How to get Post ID with the Add Filter Function
get_the_ID() is still meant to be used inside the loop only. It might work for you well on single pages but a fully reliable way is to access global $post variable only like I said in my answer.
May
5
comment Overide a function that is inside a plugin
+1 And I would fork the code and send the code back to plugin author to see if they are willing to include it in the main plugin code. This way everyone wins and I am least bothered.
May
3
comment is wpdb->replace() already sanitized?
yeah a valid use case. About replace, if you are actually firing your functions when a post is created, then you won't ever have to use replace. No? ;-)
May
3
comment Creating a user's own folder on user registration
Give us more on your intent & we will suggest you a good implementation
May
3
comment is wpdb->replace() already sanitized?
yeah just keep them to minimum. redudancy comes with the extra overhead of keeping multiple copies in sync. Best would be to just store the post ID and nothing else. And even then if you are going to, just update the row. I don't see the need of replacing the row.
May
3
comment is wpdb->replace() already sanitized?
Just use a post ID in your custom table, no need to keep the data you already have in another table. This is just redundancy.
May
3
comment Can a plugin deactivate itself?
Technically speaking, it can but I don't see why someone would build this functionality.