DocsOCodeInsertAdmin Interface
Reference

Admin Interface

OCodeInsertorravo.com/docs/ocodeinsert/admin-interface

Snippets List

Navigate to OCodeInsert in the WordPress sidebar.

Columns: Status toggle · Title · Type badge · Location · Targeting summary · Priority · Actions (Edit / Duplicate / Export JSON / Delete)

Filter toolbar: Live search by title + dropdown filters by Type, Status, Location.

CodeMirror Editor

OCodeInsert uses WordPress's built-in CodeMirror (wp-codemirror) — no external dependencies.

TypeCodeMirror mode
HTMLtext/html (mixed — supports embedded JS + CSS)
JavaScripttext/javascript
CSStext/css

Features: syntax highlighting, line numbers, bracket/tag matching, auto-indent. Mode switches automatically when you change the Type dropdown.

Duplicate

Click the copy icon to duplicate a snippet. The copy gets a new UUID, "(Copy)" appended to the title, and is saved as inactive.

Export (single snippet)

Click the download icon to export a snippet as .json (generated client-side):

json{
  "id":             "uuid-v4",
  "title":          "My Snippet",
  "type":           "js",
  "code":           "console.log('hello');",
  "location":       "head",
  "active":         true,
  "priority":       10,
  "pages":          "",
  "page_types":     ["all"],
  "user_condition": "all",
  "created":        "2025-01-01 12:00:00"
}

Theme toggle

Sun/moon icon in the brand bar toggles dark/light mode. Preference saved in localStorage under oci_theme.

Admin Interface — OCodeInsert Docs — Orravo