- PHP 96.2%
- SCSS 1.8%
- JavaScript 1.5%
- Shell 0.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| assets | ||
| helper | ||
| languages | ||
| model | ||
| post-types | ||
| sync | ||
| taxonomies | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .travis.yml | ||
| build.sh | ||
| ckan-backend.php | ||
| code_standard.xml | ||
| compile_translation_files.sh | ||
| composer.json | ||
| composer.lock | ||
| extract_messages.sh | ||
| gulpfile.js | ||
| LICENSE.txt | ||
| package.json | ||
| README.md | ||
wp-ckan-backend
WordPress plugin to manage datasets, organizations, groups and harvesters in CKAN via its API.
Requirements
- CMB2 v2.2.6 plugin must be installed
Installation
In order to use this plugin you need to define two constants in your wp-config.php file:
define( 'CKAN_API_ENDPOINT', 'http://ckan.example.com/api/3/action/' );
define( 'CKAN_API_KEY', 'f359d6af-a3e8-4c35-aab2-17f6d4198b42' ); // ckan admin user api key
Additionally you have to define an array ($language_priority) with all supported languages in your wp-config.php file.
Please order the languages according to your needs. This order is used to find fallbacks for missing translations:
$language_priority = array(
1 => 'en',
2 => 'de',
3 => 'fr',
4 => 'it'
);
Development
-
Install composer if it isn't installed system wide:
$ curl -sS https://getcomposer.org/installer | php -
Run
php composer.phar installto install dependencies -
add wordpress-standard to phpcs:
./bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs
To check the code style, run the build script:
$ ./build.sh
This script runs on Travis CI as well for every push.
Extract messages / Compile translation files
Run the following script to extract messages from php-files and generate a new wp-ogdch-theme.pot file:
$ ./extract_messages.sh
To compile all .po files to .mo files use the following script:
$ ./compile_translation_files.sh