/** * ifcrush_display_frats - this is an admin function **/ function ifcrush_display_frats() { // if ( false == is_user_admin() ) { // echo "sorry you must be an admin to view fraternities"; // return; // } global $wpdb; $allfrats = ifcrush_get_all_frats(); if ($allfrats) { create_frat_table_header(); foreach ($allfrats as $frat) { create_frat_table_row($frat); } create_frat_table_footer(); } else { ?> <h2>No Frats to display!</h2><?php } }
/** * ifcrush_display_frats - this is an admin function **/ function ifcrush_display_frats() { if (!is_user_logged_in()) { echo "sorry you must be logged in to view fraternities"; return; } global $wpdb; $allfrats = get_all_frats(); if ($allfrats) { create_frat_table_header(); foreach ($allfrats as $frat) { create_frat_table_row($frat); } create_frat_table_footer(); } else { ?> <h2>No Frats!</h2><?php } }