I currently have add_action('admin_notices','my_notice_function'); updating correctly whenever a page is refreshed (it's checking if a certain page has a certain parent) but when using the "Quick Edit" my admin_notices is not fired.

When trying to hook the same function into add_action('save_post','my_notice_function')); it breaks the formatted table and doesn't display the error message in the normal admin_notices section at the top of the page.

Any help would be greatly appreciated.

Code, as it stands:

public function init() {

public function page_check(){

    <div class='alert-message alert-danger' id='page_errors'>
      <h2>A problem has been detected.</h2>
      <ul><?php echo PluginCommon::verifyPages('error'); ?></ul>
  • Could you post the code you are using and clarify what you are trying to achieve? Are you expecting the admin notice to update when you update a post with quick edit? May 16 '12 at 15:58
  • added code. yes, expecting admin notice to show/update when updating a post with quick edit.
    – Bobby
    May 16 '12 at 16:18

The admin_notices hook fires only once per page load, and isn't fired when a post is quick-edited.

You would have to do it browser-side with javascript - that is, listen for when someone edits and saves a post (which is done via AJAX) and use javascript to display a message.

A quick glance at the javascript file responsible for quick editing (wp-admin/js/inline-edit-post.dev.js), and unfortunately there doesn't appear to be a way of knowing when the AJAX response has been received.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.