Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/threadi/random-pictures-in-media-library/releases/download/1.0.0/random-pictures-in-media-library_1.0.0.zipAbout
This repository contains a plugin for WordPress that allows you to store any number of random images in the media library.
These are obtained from various external sources from which you can choose.
Optionally, it is also possible to store the random images in a directory on the hosting server.
Hint
The plugin can actually only be used via WP CLI.
Usage
- Install and activate a release of this plugin.
- Run this command on your console and check its options:
wp rpml import
Usage for developer
After checkout go through the following steps:
- Run
composer update
Release
from local environment with Taskfile
- execute the following command in main directory:
task release -- 1.0.0- adjust the version number. - after that you will find a zip file in the release directory which could be used in WordPress to install it.
on GitHub
- Create a new tag with the new version number.
- The release zip will be created by GitHub action.
Translations
I recommend to use PoEdit to translate texts for this plugin.
generate pot-file
Run in main directory:
wp i18n make-pot . languages/random-pictures-in-media-library --exclude=svn/
update translation-file
- Open .po-file of the language in PoEdit.
- Go to "Translate" > "Update from POT-file".
- After this the new entries are added to the language-file.
export translation-file
- Open .po-file of the language in PoEdit.
- Go to File > Save.
- Upload the generated .mo-file and the .po-file to the plugin-folder languages/
Check for WordPress Coding Standards
Initialize
composer install
Run
vendor/bin/phpcs --standard=ruleset.xml .
Repair
vendor/bin/phpcbf --standard=ruleset.xml .
Generate documentation
vendor/bin/wp-documentor parse app --format=markdown --output=docs/hooks.md --prefix=rpml_
Check for WordPress VIP Coding Standards
Hint: this check runs against the VIP-GO-platform which is not our target for this plugin. Many warnings can be ignored.
Run
vendor/bin/phpcs --extensions=php --ignore=*/attributes/*,*/blocks/*,*/example/*,*/css/*,*/vendor/*,*/node_modules/*,*/svn/* --standard=WordPress-VIP-Go .
Analyse with PHPStan
vendor/bin/phpstan analyse
Releases
1 release. Each count is every asset in that release; expand a row for the breakdown.