<?php
namespace NeoLibraryBeta\NeoGlobal; if (!defined("ABSPATH")) { die("neoWP direct access not allowed"); }




function register_backend_page($get_query_param, $html_output_callback) {
    if (!str_starts_with($get_query_param, "neo-")) { \NeoLibraryBeta\NeoGlobal\throw_global_exception("GET parameter of the registered backend page must start with 'neo-' to avoid conflicts with other GET parameters."); }
    if (\NeoLibraryBeta\NeoGlobal\query_param($get_query_param) === null) { return; }
    \NeoLibraryBeta\NeoGlobal\add_action_hook("current_screen:0", function () use ($html_output_callback) {
        $html_output_callback();
        exit;
    });
}

function get_backend_page_url($get_query_param) { return admin_url("?$get_query_param"); }
