Skip to content
franz-josef-kaiser edited this page Jan 16, 2013 · 1 revision

Internal structure

We have three JSON files in our plugin:

  • uncompressed
  • compressed/minified
  • native

The uncompressed file is what is used during development and will be in use by the plugin when there's the $dev class var set to true.

The minified file is used in production when one is actually running the plugin.

The native file contains the local/native word in the native language and alphabet and gets automerged during building the uncompressed file.

Updating the JSON file contents

First you need to set the $dev property (temporarily) to true inside the class. Then you need to go to your admin UI dashboard page. There you enter example.dev/wp-admin/?wcm_dev_tools=fetch_json into your browsers URL bar. Finally copy the "Uncompressed" text out of the textarea and add it to the lang_codes.json file. Now we only need to call example.dev/wp-admin/?wcm_dev_tools=compress_json, take the compressed output of the dashboard widgets textarea and copy/paste it into the compressed file.

Done.

Clone this wiki locally