How to do it...

  1. Browse to the Plugins section of the administration section of your site and deactivate the Chapter 2 - Page Header Output plugin.
  2. Navigate to the ch2-page-header-output folder of the WordPress plugin directory of your development installation.
  3. Copy the file ch2-page-header-output.php to ch2-page-header-output-metaboxes.php.
  4. Open the ch2-page-header-output-metaboxes.php file in a text editor.

 

  1. Change the plugin name in the header from Chapter 2 - Page Header Output to Chapter 2 - Page Header Output Meta Boxes.
  2. Right under the top plugin header comment, add a line of code to declare a global variable to hold the identifier for the options page:
global $options_page;
  1. Find the ch2pho_settings_menu function in the existing ...

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.