Dashboard Widget Form

That if(‘POST’…) just alone -in the middle of the plugin code- doesn’t seem right. You can hook into load-$pagenow and process the form submission there: add_action( ‘load-index.php’, ‘check_posted_data’ ); function check_posted_data() { if( ‘POST’ == $_SERVER[‘REQUEST_METHOD’] && !empty( $_POST[‘my_prefix_message’] ) ) { wp_die( “I’m here! {$_POST[‘my_prefix_message’]}” ); } } Please note that you’re missing security … Read more

Tracking Disqus comments on Google Analytics

You can use that snippet just anywhere where it can be rendered on single pages. For example, you can paste this under functions.php of your theme: function hook_disqus_config(){ if( ! is_singular() ) return; ?> <script type=”text/javascript”> function disqus_config() { this.callbacks.onNewComment = [function(comment) { _gaq.push([‘_trackEvent’, ‘Disqus’, ‘New Comment’, comment.id]); }]; } </script> <?php } add_action( ‘wp_footer’, … Read more

Ajax with jQuery UI dialog not working

Assuming your javascript and ajax action code are otherwise correct, target admin-ajax.php with the correct path by localizing your enqueued script: wp_localize_script( ‘your_script_handle’, ‘script_data’, array( ‘admin_ajax’ => admin_url( ‘admin-ajax.php’ ) ) ); Then in your javascript, reference that URL with: url: script_data.admin_ajax EDIT- ah, missed this the first time: $wpdb->feedmanager isn’t set unless you’ve explicitly … Read more

Distributing and packaging plugins

Well, not quite sure if I understood this, but I see that you want to ‘simulate’ pages using a plugin, and my best bet is to build your own posts on-the-fly using WordPress queries and rewrite rules. Let’s try this: Create a variable to respond to your view. add_action( ‘query_vars’, ‘add_query_vars’ ); function add_query_vars( $vars … Read more

Plugin is available to update when its not

WordPress’ update checker is known to be quite greedy. To prevent these notices: use a unique name for your plugin use a unique directory name filter http_request_args and prevent your plugin from being checked (example)