The Accredible platform enables organizations to create, manage and distribute digital credentials as digital certificates or open badges.
An example digital certificate and badge can be viewed here: https://www.credential.net/10000005
This plugin enables you to issue dynamic, digital certificates or open badges on your Wordpress instance.
The plugin also allows you to display certificates and badges to your Wordpress users.
A video walkthrough of the plugin can be viewed here: https://youtu.be/s5krPN6GvTY
Tested on Wordpress 3+.
- Visit https://accredible.com to obtain an API key
- Install the plugin
- Activate the plugin through the 'Plugins' menu in WordPress
- Go to the plugin settings and input your API key
- Add the widget if desired. It will show a list of certificates or badges for a currently signed in user.
- Add the shortcode below to a page or post if desired. It will show certificates and badges for a currently signed in user.
[accredible_credential image="true" limit="10" style="true"]
- Go to the 'Certificates & Badges' page in the Wordpress admin menu.
- On the list of your users, select which students you would like to issue certificates to and then select a group.
- Click 'Create Credentials'
Visit https://www.accredible.com to obtain a free API key.
You can use the widget or shortcode to display badges or certificates that belong to the current Wordpress user.
The shortcode is:
[accredible_credential]
but it accepts a number of options:
[accredible_credential image="true" limit="10" style="true"]
Sure, just post an issue and we'll get to work: https://github.com/accredible/accredible-certificates/issues
- ⚠ Be careful not to UNINSTALL the plugin in this docker environment since WordPress completely removes your local plugin directory on uninstallation including
.git
so you will lose all your work in the directory. (In contrast, activation and deactivation of the plugin do not trigger any dangerous operations.)
Build and run docker containers with docker-compose
.
docker compose up -d
Log into the MySQL container as the root user (password: wordpress
).
docker exec -it accredible-certificates-db-1 mysql -u root -p
Update wordpress
user's privileges to create a test database at Step 3.
mysql> grant ALL PRIVILEGES ON *.* TO 'wordpress';
Log into the WordPress container and go to the plugin directory.
docker exec -it accredible-certificates-wordpress-1 bash
cd $PLUGIN_DIR
Run the following setup commands:
bash bin/install-wp-tests.sh wordpress_test $WORDPRESS_DB_USER $WORDPRESS_DB_PASSWORD $WORDPRESS_DB_HOST $WORDPRESS_VERSION
composer install
After the setup, WordPress should be running on port 8000
of your Docker Host. Open it in a web browser and complete the WordPress installation.
The WordPress container comes with PHP_CodeSniffer and WordPress Coding Standards pre-installed. To check your code against WordPress coding standards:
- First, access the WordPress container:
docker exec -it accredible-certificates-wordpress-1 bash
- Check available WordPress coding standards:
/root/.composer/vendor/bin/phpcs -i
- Run the coding standards check on a specific file:
/root/.composer/vendor/bin/phpcs --standard=WordPress [filename]
/root/.composer/vendor/bin/phpcbf --standard=WordPress [filename]
Note: If you get a "command not found" error, try rebuilding the container to ensure all tools are properly installed:
docker compose down && docker compose up -d --build
The plugin uses PHPUnit for testing. To run the test suite:
- First, access the WordPress container:
docker exec -it accredible-certificates-wordpress-1 bash
- Navigate to the plugin directory:
cd $PLUGIN_DIR
- Run all tests:
./vendor/bin/phpunit
- Run tests with verbose output:
./vendor/bin/phpunit --verbose
- Run a specific test file, reference the class:
./vendor/bin/phpunit --filter Test_Users_List
- Run a specific test case, reference the test method:
./vendor/bin/phpunit --filter test_get_users_with_search
The test environment is automatically set up when you run the initialization script mentioned in the Development setup section. The tests use a separate WordPress test database and include:
- WordPress test framework
- PHPUnit 9.x
- WordPress polyfills for PHPUnit
- Test fixtures in
tests/fixtures/