Skip to content
Benoit Alessandroni edited this page Nov 11, 2017 · 14 revisions

Welcome to the WPLDP wiki!

The aim of this project is to provide a LDP based plugin for Wordpress. This wiki will help you installing and using this plugin, by providing as much information as possible.

If you want to understand the context or contribute (why this plugin, business model, governance, how to contributute, etc.) you can open this link (in french) : http://91.134.140.110:8080/index.php/WordPress_LDP

Installation

See here: https://github.com/assemblee-virtuelle/wpldp/wiki/Installation

Architecture

The architecture of the plugin is still in progress, as some important issues are raised. To make a quick overview of the plugin, it contains:

  • A languages directory storing all the translations file
  • A library folder storing all the JavaScript resources
  • A models folder storing all the default model files related to the virtual assembly ontology
  • A public folder exposing a default view application to explore the available Linked data
  • A resources folder storing the CSS files
  • A tests file storing some unit tests automated using TravisCI
  • A wpldp.php file which contains
    • The definitions of the custom content type we use (ldp_resource)
    • All the initialization functions needed for the plugin to work
  • A class-api.php defining the available endpoints
  • A class-container-taxonomy.php which handles everything related with the LDP container custom taxonomy
  • A class-settings.php defining all the admin pages and settings options associated with the plugin
  • A class-site-taxonomy.php which handles everything related with the LDP site custom taxonomy and the federation process it allows
  • A class-utils.php file exposing some utilities functions

When creating a resource using the dedicated menu, the definition of the associated metadata fields are retrieved from the ldp_models and displayed to the user as form inputs. Once the resource is saved, those data are saved into the wp_postmeta table, when the Resource itself is saved in the wp_posts table.

Once saved, you can access its json-ld formatted definition using a permalink with the following structure: http://localhost/my-site/api/ldp/v1/*container_name*/*resource_name*

You can also access the list of json-ld formatted resources definitions at the url: http://localhost/my-site/api/ldp/v1/schema/

Here is a schema of the current architecture of the plugin:

Plugin architecture schema

Usage

See here: https://github.com/assemblee-virtuelle/wpldp/wiki/The-first-usage

Clone this wiki locally