/** * Show the club information. * * @param integer $id * @return string */ public function get_club_information($id = NULL) { global $wpdb; $db = new PHPLeague_Database(); // League not found in the database if ($db->is_club_unique($id, 'id') === TRUE) { return; } $info = $db->get_club_information($id); if ($info->creation == 0) { $creation = ''; } else { $creation = (int) $info->creation; } $output = '<table id="phpleague"><caption>' . esc_html($info->name) . __(' Factfile', 'phpleague') . '</caption><tbody>'; $output .= '<tr><th rows="2">' . __('Details', 'phpleague') . '</th></tr>'; $output .= '<tr><td><strong>' . __('Name: ', 'phpleague') . '</strong></td><td>' . esc_html($info->name) . '</td></tr>'; $output .= '<tr><td><strong>' . __('Coach: ', 'phpleague') . '</strong></td><td>' . esc_html($info->coach) . '</td></tr>'; $output .= '<tr><td><strong>' . __('Venue: ', 'phpleague') . '</strong></td><td>' . esc_html($info->venue) . '</td></tr>'; $output .= '<tr><td><strong>' . __('Website: ', 'phpleague') . '</strong></td><td><a href="' . esc_html($info->website) . '">' . esc_html($info->website) . '</a></td></tr>'; $output .= '<tr><td><strong>' . __('Creation: ', 'phpleague') . '</strong></td><td>' . $creation . '</td></tr>'; $output .= '</tbody></table>'; return $output; }