diff --git a/CHANGELOG.md b/CHANGELOG.md index 74cc798..49b4b74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Version [2.0.8] + +- Add explanation to 'show on' taxonomy form. + ## Version [2.0.7] ### Refactor diff --git a/languages/openpub-base-nl_NL.mo b/languages/openpub-base-nl_NL.mo index 4759465..a07a8d9 100644 Binary files a/languages/openpub-base-nl_NL.mo and b/languages/openpub-base-nl_NL.mo differ diff --git a/languages/openpub-base-nl_NL.po b/languages/openpub-base-nl_NL.po index 047f140..a46f715 100644 --- a/languages/openpub-base-nl_NL.po +++ b/languages/openpub-base-nl_NL.po @@ -636,3 +636,11 @@ msgstr "Verbindingstype \"%s\" bestaat niet" #~ msgid "This link does not work, go to our website: %s" #~ msgstr "Deze link werkt niet, bekijk onze website: %s" + +#: src/Base/Taxonomy/TaxonomyController.php:21 +msgid "Additional explanation" +msgstr "Aanvullende uitleg" + +#: src/Base/Taxonomy/TaxonomyController.php:22 +msgid "The slug value must be the ID of the blog you want to add as term. The ID is used for displaying the correct openpub-items on every blog." +msgstr "De waarde van de slug moet het ID zijn van de blog die je wilt toevoegen als term. Het ID wordt gebruikt om de juiste openpub-items weer te geven op alle blogs." diff --git a/languages/openpub-base.pot b/languages/openpub-base.pot index 87cbf8c..05147eb 100644 --- a/languages/openpub-base.pot +++ b/languages/openpub-base.pot @@ -422,3 +422,11 @@ msgstr "" #, php-format msgid "Connection type \"%s\" does not exist" msgstr "" + +#: src/Base/Taxonomy/TaxonomyController.php:21 +msgid "Additional explanation" +msgstr "" + +#: src/Base/Taxonomy/TaxonomyController.php:22 +msgid "The slug value must be the ID of the blog you want to add as term. The ID is used for displaying the correct openpub-items on every blog." +msgstr "" diff --git a/openpub-base.php b/openpub-base.php index ed92302..786534a 100644 --- a/openpub-base.php +++ b/openpub-base.php @@ -4,7 +4,7 @@ * Plugin Name: Yard | OpenPub Base * Plugin URI: https://www.openwebconcept.nl/ * Description: Acts as foundation for other OpenPub related content plugins. This plugin implements actions to allow for other plugins to add and/or change Custom Posttypes, Metaboxes, Taxonomies, en Posts 2 posts relations. - * Version: 2.0.7 + * Version: 2.0.8 * Author: Yard | Digital Agency * Author URI: https://www.yard.nl/ * License: GPL-3.0 diff --git a/src/Base/Foundation/Plugin.php b/src/Base/Foundation/Plugin.php index bc4a214..0cf1801 100644 --- a/src/Base/Foundation/Plugin.php +++ b/src/Base/Foundation/Plugin.php @@ -25,7 +25,7 @@ class Plugin * * @var string VERSION */ - const VERSION = '2.0.7'; + const VERSION = '2.0.8'; /** * Path to the root of the plugin. diff --git a/src/Base/Taxonomy/TaxonomyController.php b/src/Base/Taxonomy/TaxonomyController.php new file mode 100644 index 0000000..07556c5 --- /dev/null +++ b/src/Base/Taxonomy/TaxonomyController.php @@ -0,0 +1,25 @@ + +
' . __('The slug value must be the ID of the blog you want to add as term. The ID is used for displaying the correct openpub-items on every blog.', 'openpub-base') . '
+ '; + } +} diff --git a/src/Base/Taxonomy/TaxonomyServiceProvider.php b/src/Base/Taxonomy/TaxonomyServiceProvider.php index 236933d..1695a46 100644 --- a/src/Base/Taxonomy/TaxonomyServiceProvider.php +++ b/src/Base/Taxonomy/TaxonomyServiceProvider.php @@ -20,10 +20,24 @@ class TaxonomyServiceProvider extends ServiceProvider public function register(): void { $this->plugin->loader->addAction('init', $this, 'registerTaxonomies'); + + if ($this->plugin->settings->useShowOn()) { + $this->showOnFormFields(); + } + } + + /** + * Add elements to the taxonomy form. + * + * @return void + */ + protected function showOnFormFields() + { + $this->plugin->loader->addAction('openpub-show-on_add_form_fields', TaxonomyController::class, 'addShowOnExplanation'); } /** - * Register custom taxonomies via extended_cpts + * Register custom taxonomies via extended_cpts. * * @return void */