What to hook into to check a value before a post is published?

Try function wpse46583_save($post_id,$post) { // verify this is not an auto save routine. if ( defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE ) return; //You should check nonces and permissions here if ( !current_user_can( ‘edit_page’, $post_id ) return; //Get category slugs associated with post $cats =get_the_category($post_id); if(empty($cats)){ //No category assigned – do something here. } return; } add_action(‘save_post’,’wpse46583_save’,10,2);

API for wp menu hacks

There are several of plugins that ads that kind of functionality. They put a checkbox to the admin area, so if you uncheck it its not gonna appear in the menu. Here is a good one: http://wordpress.org/extend/plugins/exclude-pages/

Exposing data using a custom WordPress API

You need a die(); before the closing } of the function and you might want to add the relevant php header to tell the browser it’s content-type I wouldn’t worry about the browser returning the wrong content type. As long as your code loading the data treats it as JSON So for your function try … Read more

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