roles as $slug => $info) { $roles[] = ["value" => $slug, "label" => translate_user_role($info["name"])]; } $post_types = []; foreach (get_post_types(["public" => true], "objects") as $pt) { if ($pt->name === "attachment") { continue; } $post_types[] = ["value" => $pt->name, "label" => $pt->labels->name]; } $data = [ "restUrl" => esc_url_raw(get_rest_url()), "restNonce" => wp_create_nonce("wp_rest"), "userName" => wp_get_current_user()->display_name, // Full settings (including secrets) — this page is manage_options-only // and needs to display/edit them. "settings" => Settings::get(), "roles" => $roles, "postTypes" => $post_types, // Real-time result from the license server (see License::status()), // not just whether a key is present — drives the status line under // the License key field (active/invalid/site-limit-reached/etc.). "licenseStatus" => License::status(), ]; ?>