<?php
/*
Plugin Name: Custom Home Page
Description: Replaces the default page which CMS Builder shows you after logging in.
Version: 1.00
Requires at least: 2.05
*/

addFilter('home_content', 'customHome_content');

// 
function customHome_content($content) {
  global $CURRENT_USER;
  ob_start();
  ?>
  
    <p>Please select an option from the menu, or one of these common actions:</p>
    <ul>
      <li><a href="?menu=news&action=add">Add a News Item</a></li>
      <li><a href="?menu=jobs&action=add">Add a Job Listing</a></li>
      <li><a href="?menu=events&action=add">Add an Event</a></li>
    </ul>
    <?php if ($CURRENT_USER['isAdmin']): ?>
      <p><b>Administrators:</b> Use the <a href="?menu=database">Section Editors</a> to add sections and generate PHP viewers.</p>
    <?php endif ?>
  
  <?php
  return ob_get_clean();
}

?>
