Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: delete_post

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
462      if (! wp_delete_post($post_id))
463           die( __('Error in deleting...') );
465      $sendback = $_SERVER['HTTP_REFERER'];
466      if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post.php';
467      $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
468      header ('Location: ' . $sendback);
469      generate_page_rewrite_rules();
470      do_action('delete_post', $post_id);
471      break;
473 case 'editcomment':
474      $title = __('Edit Comment');
475      $parent_file = 'edit.php';
476      require_once ('admin-header.php');
478      get_currentuserinfo();