7,849 reputation
1030
bio website
location 127.0.0.1
age
visits member for 3 years, 5 months
seen 3 hours ago

I sell sea shells by the sea shore.


Apr
5
awarded  Nice Answer
Apr
4
comment Programmatically set thumbnail via URL using DOM and XPATH - Where to add ELSEIF
Can you try logging the $post_id and $post function arguments within your auto_featured_image_publish_post callback when you both publish a post and try to update an already published post and tell us the result of the log statement? Also I'd suggest removing the first code snippet since it is obsolete and clutters this question thread making it harder to understand.
Apr
3
reviewed Approve Insert attachments from front end form
Mar
22
comment WSoD being caused by this piece of code
@Kreation You need to pass the table name to your ref_access function. Since you are calling this function on a hook, you can either hard-code the table name into the function, or pass the table name as a $_POST array key (insecure). If you have no other logical way to get the table name and you have more than one table, send a hidden field from your form with a non-obvious name and value and use that value to lookup the table name held within an array of table names inside your ref_access function. Come see us in WordPress Development Chat if you are still having problems.
Mar
21
comment WSoD being caused by this piece of code
Try add_action('init', ref_access), you still need to get a handle on your $table variable though. I have no idea what your overall code looks like. Paste a copy to pastebin.
Mar
21
revised WSoD being caused by this piece of code
added 328 characters in body
Mar
21
comment WSoD being caused by this piece of code
Where are you calling ref_access() from? You should pass $table to ref_access($table) but don't forget to add $table variable to the function definition.
Mar
21
revised Avoiding “Usage of a direct database call is discouraged”
added 141 characters in body
Mar
21
comment Avoiding “Usage of a direct database call is discouraged”
Can you post the code snippet that the sniff is being reported on? Also you can create a custom ruleset to negate this sniff under certain conditions.
Mar
21
answered Avoiding “Usage of a direct database call is discouraged”
Mar
21
answered Override Theme CSS with CSS from a plugin
Mar
21
answered WSoD being caused by this piece of code
Mar
21
comment Plugin for limiting user registration based on ip with expiry period?
It is common for traffic to be routed through a gateway address, such as that of a cellular network or large organization and even regular ISP, therefore you may not actually be dealing with the specific device (or user).
Mar
21
answered Plugin for limiting user registration based on ip with expiry period?
Mar
16
revised How to remove list view from media library?
added 399 characters in body
Mar
16
comment How to remove list view from media library?
@Simone.p No problem, I've tested the above and it produces the desired effect you are after.
Mar
16
answered How to remove list view from media library?
Mar
16
awarded  Good Answer
Mar
15
comment Inserting a variable into a shortcode inside php
Show us your full shortcode code, the logic that runs your [youtube] shortcode. EDIT Sorry, I just re-read that, are you using a plugin for this shortcode instead? Or did you create it yourself?
Mar
15
comment How to run an activation function when plugin is network activated on multisite?
@henrywright register_activation_hook is just a wrapper around add_action('activate_' . $file, $function) which in itself fires upon, do_action( 'activate_' . $plugin, $network_wide ) of which you can see the variable $network_wide and its value state, one of either true or false is always passed as an argument to the callback. Hence, you have access to this argument in your register_activation_hook and register_deactivation_hook wrappers. For more information see activate_plugin function within wp-admin/includes/plugin.php. Hope that helps.