| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | /* |
| 3 | 3 | Plugin Name: VikBooking |
| 4 | 4 | Plugin URI: https://vikwp.com/plugin/vikbooking |
| 5 | 5 | Description: Certified Booking Engine for Hotels and Accommodations. |
| 6 | -Version: 1.8.11 | |
| 6 | +Version: 1.8.16 | |
| 7 | 7 | Author: E4J s.r.l. |
| 8 | 8 | Author URI: https://vikwp.com |
| 9 | 9 | License: GPL2 |
| 10 | 10 | License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| @@ -868,8 +868,46 @@ | ||
| 868 | 868 | </p> |
| 869 | 869 | </div> |
| 870 | 870 | </div> |
| 871 | 871 | <?php |
| 872 | +}); | |
| 873 | + | |
| 874 | +/** | |
| 875 | + * Detect outdated VCM versions. | |
| 876 | + * | |
| 877 | + * @since 1.8.13 | |
| 878 | + */ | |
| 879 | +add_action('admin_notices', function() | |
| 880 | +{ | |
| 881 | + global $pagenow; | |
| 882 | + | |
| 883 | + if (wp_doing_ajax()) | |
| 884 | + { | |
| 885 | + // nothing to check | |
| 886 | + return; | |
| 887 | + } | |
| 888 | + | |
| 889 | + $option = JFactory::getApplication()->input->get('option'); | |
| 890 | + $inPlugins = in_array($option, ['com_vikbooking', 'com_vikchannelmanager']); | |
| 891 | + | |
| 892 | + if (!$inPlugins && $pagenow != 'plugins.php') | |
| 893 | + { | |
| 894 | + // nothing to check | |
| 895 | + return; | |
| 896 | + } | |
| 897 | + | |
| 898 | + if (!defined('VIKCHANNELMANAGER_SOFTWARE_VERSION') || version_compare(VIKCHANNELMANAGER_SOFTWARE_VERSION, VIKCHANNELMANAGER_MINIMUM_VERSION, '>=')) | |
| 899 | + { | |
| 900 | + // check passed | |
| 901 | + return; | |
| 902 | + } | |
| 903 | + | |
| 904 | + echo JLayoutHelper::render( | |
| 905 | + 'html.vcm.version', | |
| 906 | + ['page' => $inPlugins ? preg_replace('/^com_/', '', $option) : $pagenow], | |
| 907 | + null, | |
| 908 | + ['component' => 'com_vikbooking'] | |
| 909 | + ); | |
| 872 | 910 | }); |
| 873 | 911 | |
| 874 | 912 | /** |
| 875 | 913 | * Downloads the RSS feeds after loading the dashboard of VikBooking. |