Return $post_id when DOING_AUTOSAVE?

The ‘save_post’ action was added to core in 2.0, and has always been an action. Looking through the current autosave procedures, it doesn’t appear to call the ‘save_post’ action directly at any time. So the short answer is, no. There is no reason, and has never been any reason, to return any value on this … Read more

Metaboxes not saving data

There were three issues: The first wasn’t visible in the code presented. a wp_register_styles call was put into the constructor, which caused errors and somehow prevented saving post metadata. Second, the date field was a HTML5 date field, which conflisted with jQuery’s datepicker. Changing it to a text field fixed that. Third, the final if … Read more

Problem with executing a function on saving a post

The action save_post is also called during AJAX auto-save requests. But your value is not sent then, so you save an empty value for something that isn’t set. Start your save function with: if ( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE ) return; See basic examples with more checks here and here.

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