Read-only mirror of https://github.com/opendata-swiss/wp-ckan-backend — opendata.swiss. Issues & pull requests at the source.
  • PHP 96.2%
  • SCSS 1.8%
  • JavaScript 1.5%
  • Shell 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2018-11-22 16:16:31 +01:00
assets Fix wrong selector names 2018-11-22 16:12:24 +01:00
helper fix user organisation filter 2017-12-19 14:24:35 +01:00
languages Fix encoding issue 2018-11-15 14:06:12 +01:00
model initialize empty arrays to make sure that we always return all fields 2018-07-20 11:13:22 +02:00
post-types Fix wrong selector names 2018-11-22 16:12:24 +01:00
sync remove ckan_synced meta field / move harvester dashboard link to post type 2018-02-21 14:11:20 +01:00
taxonomies Rename textdomain to ogdch-backend 2016-11-24 16:00:20 +01:00
.gitignore add gulp dependency 2017-12-15 15:32:27 +01:00
.gitlab-ci.yml Add build to this plugin 2015-07-31 14:48:35 +02:00
.travis.yml enable travis build 2016-12-09 15:42:21 +01:00
build.sh enable travis build 2016-12-09 15:42:21 +01:00
ckan-backend.php Disable delete buttons until checkbox is clicked 2018-11-14 10:57:41 +01:00
code_standard.xml Add build to this plugin 2015-07-31 14:48:35 +02:00
compile_translation_files.sh Add translations to plugin 2016-11-24 16:00:20 +01:00
composer.json Add build to this plugin 2015-07-31 14:48:35 +02:00
composer.lock Add build to this plugin 2015-07-31 14:48:35 +02:00
extract_messages.sh Add translations to plugin 2016-11-24 16:00:20 +01:00
gulpfile.js add gulp dependency 2017-12-15 15:32:27 +01:00
LICENSE.txt Use GPL template 2016-12-20 11:00:19 +01:00
package.json add gulp dependency 2017-12-15 15:32:27 +01:00
README.md update cmb2 version 2017-12-15 10:48:04 +01:00

wp-ckan-backend

Build Status

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

  1. Install composer if it isn't installed system wide:

    $ curl -sS https://getcomposer.org/installer | php
    
  2. Run php composer.phar install to install dependencies

  3. 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