/** * Determine which action will be executed * */ function Dispacher() { if (empty($_GET['action'])) { $action = "manage"; } else { $action = $_GET['action']; } $action = esc_attr($action); switch ($action) { case "manage": MF_PostTypePages::ManagePostType(); break; case "add": MF_PostTypePages::AddPostType(); break; case "save": MF_PostTypePages::SavePostType(); } }