File: /home/awaldron/_domains/phlibrary.alanwaldron.com/wp-content/themes/phlibrary/admin/admin.php
<?php
add_action( 'admin_menu', 'phlib_admin' );
function phlib_admin() {
add_menu_page( 'Penn Hills Library', 'PH Library', 'edit_others_posts', 'PHLibrary', 'phlib_admin_page', get_stylesheet_directory_uri() . '/img/admin-icon.png');
}
add_action( 'admin_menu', 'phlib_events_admin' );
function phlib_events_admin() {
add_submenu_page('PHLibrary', 'Events', 'Events Manager', 'edit_others_posts', 'phlib_events', 'phlib_events');
}
add_action( 'admin_menu', 'phlib_hours_menu' );
function phlib_hours_menu() {
add_submenu_page('PHLibrary', 'Library Hours', 'Library Hours', 'edit_others_posts', 'phlib_hours', 'phlib_hours');
}
add_action( 'admin_menu', 'phlib_new_noteworthy' );
function phlib_new_noteworthy() {
add_submenu_page('PHLibrary', 'New & Noteworthy', 'New & Noteworthy', 'edit_others_posts', 'phlib_noteworthy', 'phlib_noteworthy');
}
require_once("phlib_noteworthy.php");
require_once("phlib_events.php");
require_once("phlib_hours.php");
function phlib_admin_page() {
echo '
<div class="wrap">
<h1 class="wp-heading">Penn Hills Library Administration</h1>
<hr>
<br><br>
<ul style="font-size:30px;line-height:50px;margin-left:50px;">
<li style="list-style-type: disc;"><a href="/wp-admin/admin.php?page=phlib_events">Events Manager</a></li>
<li style="list-style-type: disc;"><a href="/wp-admin/admin.php?page=phlib_hours">Library Hours</a></li>
<li style="list-style-type: disc;"><a href="/wp-admin/admin.php?page=phlib_noteworthy">New & Noteworthy</a></li>
</ul>
</div>
';
}