AdminAjaxController.php
4 years ago
MetaController.php
4 years ago
NoticeController.php
4 years ago
PostTypeController.php
4 years ago
SettingsController.php
4 years ago
UpgradeController.php
4 years ago
UpgradeController.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | namespace RT\ThePostGrid\Controllers\Admin; |
| 4 | |
| 5 | |
| 6 | class UpgradeController { |
| 7 | |
| 8 | public static function check_plugin_version() { |
| 9 | if ( version_compare( RT_TPG_PRO_VERSION, '5.1.0', '<' ) ) { |
| 10 | add_action( 'admin_notices', |
| 11 | function () { |
| 12 | $class = 'notice notice-error'; |
| 13 | $text = esc_html__( 'The Post Grid Pro', 'the-post-grid' ); |
| 14 | $link_pro = 'https://www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/'; |
| 15 | |
| 16 | printf( '<div class="%1$s"><p><a target="_blank" href="%2$s"><strong>The Post Grid Pro</strong></a> is not working properly, You need to update <strong>%3$s</strong> version to 5.1.0 or more to get the pro features.</p></div>', |
| 17 | $class, |
| 18 | $link_pro, |
| 19 | $text ); |
| 20 | } ); |
| 21 | |
| 22 | return false; |
| 23 | } |
| 24 | return true; |
| 25 | } |
| 26 | |
| 27 | } |
| 28 |