'sanitize_text_field', )); // Frontend/Backend service URLs are fixed (see affirm_get_*_url()) and are // intentionally not registered as settings — users only configure the API key. register_setting('affirm_settings', 'affirm_render_mode', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'sdk', )); register_setting('affirm_settings', 'affirm_signed_url_ttl', array( 'sanitize_callback' => 'absint', 'default' => 2592000, )); } public function enqueue_admin_assets($hook) { if ($hook !== 'toplevel_page_affirmfirst') return; wp_enqueue_style('affirm-admin', AFFIRM_PLUGIN_URL . 'assets/css/admin.css', array(), AFFIRM_VERSION); wp_enqueue_script('affirm-admin', AFFIRM_PLUGIN_URL . 'assets/js/admin.js', array('jquery'), AFFIRM_VERSION, true); wp_localize_script('affirm-admin', 'affirmAdmin', array( 'ajaxUrl' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('affirm_admin_nonce'), 'backendUrl' => affirm_get_backend_url(), 'frontendUrl' => affirm_get_frontend_url(), )); } public function render_admin_page() { // Read-only tab switcher for admin navigation; no state change, nonce not required. // phpcs:ignore WordPress.Security.NonceVerification.Recommended $active_tab = isset($_GET['tab']) ? sanitize_text_field(wp_unslash($_GET['tab'])) : 'dashboard'; ?>
Secure image protection for WordPress
Every image in your vault is added to the WordPress media library automatically. From then on you pick it exactly like any other image — and visitors get the encrypted canvas instead of the file.
Add your API key on the Settings tab first.
Only a low-resolution preview is stored in WordPress so the picker has a thumbnail to show. The full-resolution original stays encrypted in your vault, and the preview is hidden on the frontend before it can be seen.
Loading dashboard...
Upload images directly to your aFFirmFirst vault. They will be encrypted, watermarked, and available for protected embedding.
Drag & drop images here
or click to browse files
Supports: JPG, PNG, WebP, HEIC, AVIF • Max 50MB per file
Loading...
| Preview | Image Source | Post | Size | Status | Actions | |
|---|---|---|---|---|---|---|
| Click "Scan Site Images" to find unprotected images across your site. | ||||||
aFFirmFirst: Please enter your API key in Settings to start protecting your images.