PluginProbe
Tag, Category, and Taxonomy Manager – Autotagger Automatically Add Terms / 3.5.1
Tag, Category, and Taxonomy Manager – Autotagger Automatically Add Terms v3.5.1
3.53.0 3.52.0 3.51.0 3.50.0 3.45.0 3.38.0 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.40.0 3.40.1 3.41.0 3.42.0 3.43.0 3.44.0 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 All 177 releases
simple-tags / inc / class.compatibility.php

class.compatibility.php in Tag, Category, and Taxonomy Manager – Autotagger Automatically Add Terms 3.5.1, at inc/class.compatibility.php

39 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class SimpleTags_Compatibility {
4 /**
5 * admin_init hook callback
6 *
7 * @since 0.1
8 */
9 public static function admin_init() {
10 // Not on ajax
11 if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
12 return;
13 }
14
15 // Check activation
16 if ( ! current_user_can( 'activate_plugins' ) ) {
17 return;
18 }
19
20 trigger_error( sprintf( esc_html__('TaxoPress requires PHP version %s or greater to be activated.'), esc_html(STAGS_MIN_PHP_VERSION) ) );
21
22 // Deactive self
23 deactivate_plugins( plugin_basename( STAGS_DIR . '/simple-tags.php' ) );
24
25 unset( $_GET['activate'] );
26
27 add_action( 'admin_notices', array( __CLASS__, 'admin_notices' ) );
28 }
29
30 /**
31 * Notify the user about the incompatibility issue.
32 */
33 public static function admin_notices() {
34 echo '<div class="notice error is-dismissible">';
35 echo '<p>' . esc_html( sprintf( esc_html__('TaxoPress require PHP version %s or greater to be activated. Your server is currently running PHP version %s.'), esc_html(STAGS_MIN_PHP_VERSION), esc_html(PHP_VERSION) ) ) . '</p>';
36 echo '</div>';
37 }
38 }
39