/** * Display all Custom Authors (Wordpress Hook Entry) */ function caa_display_all_custom_authors_page() { $display_text = null; if (isset($_GET["action"]) && $_GET["action"] == "delete" && isset($_GET["profile_id"])) { global $wpdb; $custom_authors_database = new CAA_Profile_DB($wpdb); $profile_id = $_GET["profile_id"]; $custom_authors_database->delete_row_by_profile_id($profile_id); $display_text = caa_return_message("Custom Author Deleted!", "updated"); } caa_display_all_custom_authors($display_text); }
/** * Edit Custom Author (Wordpress Hook Entry) */ function caa_edit_custom_author_page() { $display_text = null; if (!isset($_GET["profile_id"])) { $display_text = caa_return_message("Error, Custom Author does not exist!", "error"); return caa_display_all_custom_authors($display_text); } if (isset($_POST["profile_id"])) { $display_text = caa_save_custom_author_changes(); } $profile_id = $_GET["profile_id"]; caa_edit_custom_author($display_text, $profile_id); }