WP Manifestindependent plugin directory
manifest / content / lhts-dictionary

LHTS Dictionary

Video-first WordPress dictionary with CSV imports, teacher sign loops, and searchable DataTables-powered listings.

by Zafar Iqbal · github.com/zafarsoomro/lhts-dictionary · website

★ 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/zafarsoomro/lhts-dictionary/archive/refs/heads/main.zip

A video-first dictionary plugin for WordPress that stores words/phrases as a dedicated custom post type, lets staff import large CSV datasets, and exposes a DataTables-powered dashboard plus multiple search shortcodes for the public site.

Highlights

  • ✅ Custom Post Type (word_phrase) with extensive meta fields for multiple teachers, looping sign clips, and rich definitions.
  • 📊 Server-side DataTables dashboard embedded in wp-admin for fast browsing, inline edits, and deletions.
  • 📥 Chunked CSV importer with progress indicator to safely onboard thousands of records without timeouts.
  • 🔍 Front-end shortcodes for an immersive search experience, A–Z filtering, autoplay Vimeo embeds, related signs, and autocomplete search box.
  • 🧩 Alpha taxonomies (alpha_category, alpha_tag) automatically created/updated during imports and edits.

Requirements

  • WordPress 6.0+
  • PHP 7.4+
  • Vimeo clips for teacher/sign assets (or update embeds to suit your stack)

Installation

  1. Copy the plugin folder into wp-content/plugins/lhts-dictionary.
  2. Activate LHTS Dictionary from the Plugins screen.
  3. Visit LHTS Dictionary → Dashboard to access the CSV importer and DataTable UI.

The activation hook creates the optional legacy table (wp_lhts_dictionary), registers the custom post type, and flushes rewrite rules.

Admin Workflow

  1. Export your vocabulary to CSV (26 headers listed in lhts_dictionary_import_chunk).
  2. Upload via the importer; the plugin processes records in batches and downloads remote featured images.
  3. Use the DataTable to spot-check entries, delete, or open the inline editor.
  4. Content editors can also manage entries via the standard WordPress post editor, complete with custom meta boxes.

Shortcodes

Shortcode Description
[lhts_dictionary] Outputs the DataTables table and edit popup on the front end (useful for private portals).
[custom_search] Renders the immersive filter/search UI with Vimeo player, Explore buttons, and pagination.
[search_field] Provides a lightweight autocomplete field you can embed anywhere.
[related_word_phrase] Display 4 random "Additional Signs" cards on single dictionary entries.

Development Notes

  • Main plugin bootstrap: lhts-dictionary.php
  • JavaScript helpers: js/datatables-init.js and js/csv-import-ajax.js
  • All Ajax endpoints live in the main plugin file and are namespaced with the lhts_dictionary_ prefix.
  • To extend imports, update the $header array within lhts_dictionary_import_chunk() and mirror fields in the JS editor.

Useful WP-CLI Snippets

wp post list --post_type=word_phrase --fields=ID,post_title --per_page=20
wp transient delete lhts_csv_import_path

License

Released under the MIT License. See LICENSE.

Contributing

Pull requests are welcome! Please open an issue if you plan a large refactor so we can discuss the best approach for the DataTables UI or importer before you invest time.