How to do it...

  1. Navigate to the WordPress plugin directory of your development installation.
  2. Navigate to the ch8-bug-tracker directory and edit ch8-bug-tracker.php.
  3. Find the ch8bt_config_page function and locate the bracket that closes out the if statement (<?php } ?>) situated toward the end of its body.
  4. Insert the following code block right before the closing bracket from the if statement identified in the previous step:
<?php } elseif ( isset( $_GET['id'] ) &&                 ( 'new' == $_GET['id'] ||                     is_numeric( $_GET['id'] ) ) ) {                      $bug_id = intval( $_GET['id'] );     $mode = 'new';              // Query database if numeric id is present     if ( $bug_id > 0 ) {         $bug_query = 'select * from ' . $wpdb->get_blog_prefix();  $bug_query .= 'ch8_bug_data where bug_id = ...

Get WordPress Plugin Development Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.