Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/govright/wp-corpus-utils/archive/refs/heads/master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
GovRight Corpus Utilities
Developer's suite for handling common small tasks like locale data extraction or GovRight Corpus API calls
in WordPress themes and plugins.
Requirements
Tested and works properly with:
WordPress = 4.5
PHP = 5.5
(dev) PHPUnit =4.8.24
(dev) Node.js =5 2. string $languagecode (optional) - language code to extract | array | Extracts locale data from a model instance. If $languagecode is specified - returns corresponding translations if available or a first available otherwise. If $languagecode is not specified - checks if the WPML plugin is activated and tries to extract currently set language, return a first available locale otherwise.
corpusattsstring() | 1. array $atts - attributes array 2. bool $includelocale (optional) - include locale prop | string | Converts $atts array into a string. Includes data-locale prop if $includelocale is true and WPML is activated.
JavaScript API reference
Plugin adds a global GovRight object which has the following properties/methods:
Function/prop | Arguments | Returns | Description
--- | --- | --- | ---
GovRight.corpusApiUrl | - | - | String property that stores Corpus API url. Default value is http://corpus.go