Interface

Admin Menu and Settings Pages #

Davix H2I appears in WordPress admin as a top-level menu named Davix H2I. Its main settings page slug is davix-h2i-settings, and the settings submenu uses the same slug. The plugin also registers a hidden log viewer page with slug davix-h2i-log-viewer. The interface is documented as appearing in wp-admin settings screens and in Media Library and attachment-edit modal contexts.

The settings page is rendered by includes/views/settings-page.php. Asset loading for the interface is scoped to:

  • the plugin settings page
  • the log viewer page
  • the Media Library screen upload.php
  • the attachment edit screen post.php when the current post type is attachment

The plugin also adds a Settings link in the Plugins screen through plugin_action_links_{plugin_basename}. The developer reference also documents Support and Documentation links in plugin row meta. The main configuration entry point, however, remains the Davix H2I settings page.

[Image placeholder — Plugins screen showing the Davix H2I row with the Settings link]

Settings Tabs and Subtabs #

The source-backed settings interface includes these top-level tabs:

  • General
  • Image
  • H2I
  • Tools
  • Debug Log
  • Help

Documented subtabs are:

  • Image: Defaults, Auto-Optimize
  • Help: About, Support

The user-guide documentation also defines the purpose of each main tab from the user perspective:

  • General includes API key, auth mode, idempotency, timeout, retry, and H2I payload settings
  • Image includes default chips and fields, output mode and suffix, plus the Auto-Optimize subtab
  • H2I includes default HTML, CSS, size, format, and output settings
  • Tools includes default tool selection and hash/similarity defaults
  • Debug Log includes the logging toggle and an Open Log in New Tab link when logging is enabled
  • Help includes About and Support content

The settings form uses settings_fields( 'davix_h2i_settings' ), and the loaded security/privacy materials confirm that settings values shown in the interface are rendered through escaped output functions.

General Settings Interface #

The General tab is the main configuration screen. The loaded user-facing documentation confirms the presence of these controls:

  • API key
  • auth mode
  • idempotency toggle
  • HTTP timeout
  • retry count
  • H2I maximum payload setting
  • debug logging toggle

The same source also documents visible default examples pulled from option reads in the view, including timeout, retry, and H2I payload defaults. For exact numeric values and limits, use the central Errors and Limits page where relevant.

This page is part of the admin settings interface and is intended for administrators, as settings access requires manage_options.

[Image placeholder — General settings tab showing API key, auth mode, idempotency, timeout, retry count, and H2I max payload fields]

Image Settings Interface #

The Image tab includes default image configuration and the Auto-Optimize subtab. The documentation states that the Image settings area includes default image chips and fields, plus output mode and suffix settings.

The loaded interface documentation also confirms the allowed image chip groups used across the UI:

  • smart
  • format
  • resize
  • crop
  • transform
  • effects
  • padding
  • frame
  • background
  • watermark

These chip groups are relevant in both the settings defaults area and the modal interface, because the plugin filters fields so that only fields belonging to selected chips are sent and accepted.

Auto-Optimize Subtab #

The Auto-Optimize subtab is part of the Image settings area. The user guide confirms the presence of these controls:

  • enable checkbox
  • apply-to-generated checkbox
  • chips and fields selection
  • optional prefix

The documented user-facing behavior is:

  • it runs only when enabled
  • it skips non-image MIME attachments
  • it skips already auto-optimized attachments
  • it can skip Davix-generated files when apply-to-generated is disabled
  • it uses replace behavior when successful

[Image placeholder — Image settings tab with Defaults and Auto-Optimize subtabs]

H2I Settings Interface #

The H2I tab is documented as the place for default H2I configuration, including HTML, CSS, size, format, and output settings.

The interface-related H2I documentation confirms that the H2I UI includes support for:

  • HTML template input
  • CSS input
  • width
  • height
  • format
  • output mode
  • suffix
  • token hints

The same source confirms the supported token list presented to users:

  • {site_name}
  • {site_logo_url}
  • {selected_image_url}
  • {author_name}
  • {date}
  • {post_title}

The H2I settings and modal surfaces also reflect the documented format behavior: defaults sanitize to png or jpeg, and the modal format selector shows those same two values.

[Image placeholder — H2I settings tab showing default HTML, CSS, dimensions, format, output mode, and supported tokens]

Tools Settings Interface #

The Tools settings tab is documented as the place for default tool selection and similarity/hash defaults.

The broader interface documentation confirms that the Tools UI supports selecting:

  • hash
  • similarity

Supported tool-specific interface values are documented as:

  • hash types: phash, md5, sha1, sha256
  • similarity modes: pairs, tofirst

The interface also enforces the documented minimum image-count requirement for similarity analysis: at least two images are required when similarity is selected.

Debug Log Interface #

The Debug Log tab is part of the settings interface and includes the logging toggle plus an Open Log in New Tab link when logging is enabled.

The loaded documentation confirms two user-visible log viewing methods:

  • an embedded log viewer admin page at davix-h2i-log-viewer
  • a standalone new-tab log viewer opened from the Debug Log tab using admin-post.php?action=davix_h2i_log_viewer plus a nonce

Both log-viewing methods refresh through the AJAX action davix_h2i_refresh_logs, with alias davix_h2i_fetch_logs, and require the manage_options capability. The standalone viewer uses nonce action davix_h2i_log_viewer with query key davix_h2i_log_viewer_nonce.

The log content is stored in uploads under davix-h2i/logs/davix-h2i-<token>.log, and the interface documentation confirms that log output is escaped in supported viewing paths.

[Image placeholder — Debug Log tab showing the logging toggle and Open Log in New Tab link]

Help Interface #

The Help tab contains two subtabs:

  • About
  • Support

The appendix identifies includes/views/help-about.php and includes/views/help-support.php as view templates only, which confirms that the Help area is a rendered admin UI surface rather than a REST-driven operational tool.

Media Library Modal Interface #

The plugin injects its modal interface into two WordPress admin contexts:

  • upload.php via admin_footer-upload.php
  • post.php via admin_footer-post.php, only when the current post type is attachment

This modal is defined in includes/views/modal.php. The plugin enqueues its media scripts on upload.php and post.php, but on post.php it exits early unless the screen post type is attachment.

The client-side runtime data object for the modal is DavixH2IData. The loaded documentation confirms that this object includes:

  • restUrl
  • rest_url
  • nonce
  • settingsUrl
  • logViewerUrl
  • tooltipLabel
  • tooltips
  • docsUrls
  • defaults, containing:
    • imageDefaults
    • imageOutput
    • autoOptimize
    • h2iDefaults
    • h2iOutput
    • toolsDefaults

The runtime flow documented for this interface is that admin UI scripts read DavixH2IData, send authenticated REST requests to /davix-h2i/v1/* with x_wp_nonce, and then display preview or persistence results depending on the selected action.

[Image placeholder — Media Library modal showing the Image, H2I, and Tools tabs]

Attachment Edit Screen Interface #

The same modal interface is also available on the attachment edit screen in post.php when the edited post type is attachment. This is not documented as a separate UI system; it is the same modal template injected in a different admin context.

That means the plugin interface is consistent across the Media Library and attachment-edit contexts:

  • same modal template
  • same localized client data object
  • same REST-backed actions
  • same tab structure for Image, H2I, and Tools

Preview and Generate Flows in the Interface #

Image Tab Behavior #

The Image modal tab supports chips, fields, and output mode. The interface documentation confirms:

  • Preview calls /image/preview and returns URLs for preview display
  • Generate calls /image/generate and writes results into the Media Library
  • output mode values are replace and copy
  • the suffix field is shown only when mode is copy

The interface-level output behavior is also documented clearly:

  • replace updates the existing attachment
  • copy inserts a new attachment
  • suffix is applied only in copy mode

H2I Tab Behavior #

The H2I modal tab includes HTML, CSS, format, width, height, output mode, suffix, and token hints. Its documented flow is:

  • Preview returns url in single mode or results in bulk mode
  • Generate downloads and writes attachment results, then returns media references
  • in bulk mode, Generate can reuse preview URLs when those are supplied as preview_results

Tools Tab Behavior #

The Tools modal tab supports hash and similarity. Its response behavior is documented as returning results containing the parsed response body from the upstream tools API.

Bulk Action Interface #

The plugin registers a Media Library bulk action:

  • action key: davix_h2i_edit
  • label: Edit with Davix H2I

When a user selects that bulk action and applies it in the Media Library list table, JavaScript intercepts the action and opens the Davix modal for the selected IDs. This is the documented entry point for multi-item media operations from the list view.

[Image placeholder — Media Library bulk action dropdown showing Edit with Davix H2I]

Log Viewer Access #

The interface exposes log viewing in three documented ways:

  • through the Debug Log tab link
  • through the embedded admin log viewer page
  • through the standalone admin-post viewer opened in a new tab

The log viewer interface refreshes through AJAX and is restricted to users with manage_options. The REST log routes /davix-h2i/v1/logs/read and /davix-h2i/v1/logs/view are also part of the plugin’s interface surface for administrators, but the user-facing admin experience documented here is centered on the Debug Log tab and viewer pages.

Was it helpful ?
Scroll to Top