This plugin allow users of the WordPress CMS to integrate resources which are stored in a ResourceSpace repository in their content. Resources can be embedded directly from the ResourceSpace server, or synchronized and replicated in the local WordPress media library.
Clone the project to a folder within the wp-content/plugins directory of your local WordPress development instance.
Update the dependencies and build the souce using npm.
cd block-editor
sudo npm update
sudo npm update --depth 5 @babel/compat-data
To compile new source code:
npm run build
Repeat the above in each of the following directories:
- block-editor
- admin/js/src/admin-form
- admin/js/src/search-form
- admin/js/src/search-media-library
To create a distributable version of the plugin, use a copy of the project folder without the following directories:
- block-editor/src
- admin/js/src/
- node_modules
Upload the files to the plugins directory of the target WordPress instance, or zip the files for easy distribution.
Note: For users of the self-hosted version, note that this plugin requires ResourceSpace version 9.3 or higher.
- From the WordPress administration panel, visit the ResourceSpace Options screen.
- Under the API Details section, enter the user credentials. The ResourceSpace Key can be retrieved by visiting the host ResourceSpace instance and going to: Admin > Manage users > {username}/Private API Key/{instance}/API
- Save the changes (button at the bottom) to connect to the repository and complete the customization step.
- Under the Role Access section, enable the user roles that will be able to access the remote resources.
- Under the Media Library Fields Map section, use the drop-down selections (right column) to map the Media library fields. This will be used to fill the standard WordPress Media Library fields when importing a resource from the ResourceSpace repository.
- Under the Search Form Setup section, add to the common search fields (left column) by dragging from the list of available custom fields on your ResourceSpace instance (right column).
- Save the changes again.
User can add resources to their pages, posts or other custom content using shortcodes generated from the ResourceSpace panel within the admin section, or from the block or classic editor options. A ResourceSpace tab in the Media Library allow users to copy resources to the local server or to embed a resource using a generated shortcode.
The shortcodes support CSS properties as arguments, if and when those need to be updated manually.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning.
This project is licensed under the MIT License - see the LICENSE.md file for details.