File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
55and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
66
7+ ## [ 3.0.4] - 2022-10-21
8+ ### Changed
9+ - Replaced Composer plugin dependency check with runtime check.
10+
711## [ 3.0.3] - 2022-10-07
812### Chore
913- Update dependencies + reference pdc-base plugin from BitBucket to GitHub
Original file line number Diff line number Diff line change 99 }
1010 ],
1111 "type" : " wordpress-plugin" ,
12- "repositories" : [
13- {
14- "type" : " vcs" ,
15- "url" : " git@github.com:OpenWebconcept/plugin-pdc-base.git"
16- }
17- ],
1812 "require" : {
19- "php" : " >=7.0" ,
20- "plugin/pdc-base" : " ^3.0.0"
13+ "php" : " ^7.4|^8.0"
2114 },
2215 "require-dev" : {
2316 "mockery/mockery" : " *" ,
2821 },
2922 "autoload" : {
3023 "psr-4" : {
31- "OWC\\ PDC\\ FAQ \\ " : " ./src/FAQ "
24+ "OWC\\ PDC\\ " : " ./src"
3225 }
3326 },
3427 "autoload-dev" : {
Original file line number Diff line number Diff line change 44 * Plugin Name: PDC FAQ
55 * Plugin URI: https://www.openwebconcept.nl/
66 * Description: Plugin to create the frequently asked questions section for a PDC item.
7- * Version: 3.0.3
7+ * Version: 3.0.4
88 * Author: Yard Digital Agency
99 * Author URI: https://www.yard.nl/
1010 * License: GPL-3.0
3434/**
3535 * manual loaded file: the autoloader.
3636 */
37- require_once __DIR__ . '/autoloader.php ' ;
38- $ autoloader = new Autoloader ();
37+ if (file_exists (__DIR__ . '/vendor/autoload.php ' )) {
38+ require_once __DIR__ . '/vendor/autoload.php ' ;
39+ } else {
40+ require_once __DIR__ . '/autoloader.php ' ;
41+ $ autoloader = new Autoloader ();
42+ }
3943
4044/**
4145 * Begin execution of the plugin
4549 * and wp_loaded action hooks.
4650 */
4751add_action ('plugins_loaded ' , function () {
52+ if (! class_exists ('OWC\PDC\Base\Foundation\Plugin ' )) {
53+ add_action ('admin_notices ' , function () {
54+ $ list = '<p> ' . __ (
55+ 'The following plugins are required to use the PDC FAQ: ' ,
56+ 'pdc-faq '
57+ ) . '</p><ol><li>OpenPDC Base (version >= 3.0.0)</li></ol> ' ;
58+
59+ printf ('<div class="notice notice-error"><p>%s</p></div> ' , $ list );
60+ });
61+
62+ \deactivate_plugins (\plugin_basename (__FILE__ ));
63+
64+ return ;
65+ }
66+
4867 $ plugin = (new Plugin (__DIR__ ))->boot ();
4968}, 10 );
5069
Original file line number Diff line number Diff line change @@ -27,5 +27,5 @@ class Plugin extends BasePlugin
2727 *
2828 * @const string VERSION
2929 */
30- const VERSION = '3.0.3 ' ;
30+ const VERSION = '3.0.4 ' ;
3131}
You can’t perform that action at this time.
0 commit comments