4 better formatting
source | link

How about this code to suppress hello.php (Hello Dolly) if WP < 8.5:

 add_action( 'activate_plugin', '_20170113_superess_activate' , 10, 2);
 

    function _20170113_superess_activate($plugin, $network_wide){
      global $wp_version;

      if ( $wp_version < 8.5 && 'hello.php' == $plugin ) {
        error_log("WordPress 'WordPress need to be at least 8.5"5' );      
        $args = var_export( func_get_args(), true );
        error_log( $args );
        wp_die( 'WordPress need to be at least 8.5 to activate this plugin' );
      }
 
    }

I think this is good because it doesn't force you to create admin notices. You will simply get the feedback about the reason for abortion of the plugin install.

I added this code for HelloDolly, but you will need to adjust.

How about this code to suppress hello.php (Hello Dolly) if WP < 8.5:

 add_action( 'activate_plugin', '_20170113_superess_activate' , 10, 2);
 

    function _20170113_superess_activate($plugin, $network_wide){
      global $wp_version;

      if ( $wp_version < 8.5 && 'hello.php' == $plugin ) {
        error_log("WordPress need to be at least 8.5");      
        $args = var_export( func_get_args(), true);
        error_log($args);
        wp_die('WordPress need to be at least 8.5 to activate this plugin');
      }
 
    }

I think this is good because it doesn't force you to create admin notices. You will simply get the feedback about the reason for abortion of the plugin install.

I added this code for HelloDolly, but you will need to adjust.

How about this code to suppress hello.php (Hello Dolly) if WP < 8.5:

 add_action( 'activate_plugin', '_20170113_superess_activate' , 10, 2);

 function _20170113_superess_activate($plugin, $network_wide){
      global $wp_version;

      if ( $wp_version < 8.5 && 'hello.php' == $plugin ) {
        error_log( 'WordPress need to be at least 8.5' );      
        $args = var_export( func_get_args(), true );
        error_log( $args );
        wp_die( 'WordPress need to be at least 8.5 to activate this plugin' );
      }
 }

I think this is good because it doesn't force you to create admin notices. You will simply get the feedback about the reason for abortion of the plugin install.

I added this code for HelloDolly, but you will need to adjust.

3 added 211 characters in body
source | link

How about this amateur code to suppress hello.php (Hello Dolly) if WP < 8.5:

 add_action( 'activate_plugin', '_20170113_superess_activate' , 10, 2);


    function _20170113_superess_activate($plugin, $network_wide){
      global $wp_version;

      if ( $wp_version < 8.5 && 'hello.php' == $plugin ) {
        error_log("WordPress need to be at least 8.5");      
        $args = var_export( func_get_args(), true);
        error_log($args);
        wp_die('WordPress need to be at least 8.5 to activate this plugin');
      }

    }

I think this is good because it doesn't force you to create admin notices. You will simply get the feedback about the reason for abortion of the plugin install.

I added this code for HelloDolly, but you will need to adjust.

How about this amateur code to suppress hello.php (Hello Dolly) if WP < 8.5:

 add_action( 'activate_plugin', '_20170113_superess_activate' , 10, 2);


    function _20170113_superess_activate($plugin, $network_wide){
      global $wp_version;

      if ( $wp_version < 8.5 && 'hello.php' == $plugin ) {
        error_log("WordPress need to be at least 8.5");      
        $args = var_export( func_get_args(), true);
        error_log($args);
        wp_die('WordPress need to be at least 8.5 to activate this plugin');
      }

    }

How about this code to suppress hello.php (Hello Dolly) if WP < 8.5:

 add_action( 'activate_plugin', '_20170113_superess_activate' , 10, 2);


    function _20170113_superess_activate($plugin, $network_wide){
      global $wp_version;

      if ( $wp_version < 8.5 && 'hello.php' == $plugin ) {
        error_log("WordPress need to be at least 8.5");      
        $args = var_export( func_get_args(), true);
        error_log($args);
        wp_die('WordPress need to be at least 8.5 to activate this plugin');
      }

    }

I think this is good because it doesn't force you to create admin notices. You will simply get the feedback about the reason for abortion of the plugin install.

I added this code for HelloDolly, but you will need to adjust.

2 added 48 characters in body
source | link

How about this amateur code to suppress hello.php (Hello Dolly) if WP < 8.5:

 add_action( 'activate_plugin', '_20170113_superess_activate' , 10, 2);


    function _20170113_superess_activate($plugin, $network_wide){
      global $wp_version;

      if ( $wp_version < 8.5 && 'hello.php' == $plugin ) {
        error_log("WordPress need to be at least 8.5");      
        $args = var_export( func_get_args(), true);
        error_log($args);
        exitwp_die("Cannot'WordPress pass"need to be at least 8.5 to activate this plugin');
      }

    }

How about this amateur code to suppress hello.php (Hello Dolly) if WP < 8.5:

 add_action( 'activate_plugin', '_20170113_superess_activate' , 10, 2);


    function _20170113_superess_activate($plugin, $network_wide){
      global $wp_version;

      if ( $wp_version < 8.5 && 'hello.php' == $plugin ) {
        error_log("WordPress need to be at least 8.5");      
        $args = var_export( func_get_args(), true);
        error_log($args);
        exit("Cannot pass");
      }

    }

How about this amateur code to suppress hello.php (Hello Dolly) if WP < 8.5:

 add_action( 'activate_plugin', '_20170113_superess_activate' , 10, 2);


    function _20170113_superess_activate($plugin, $network_wide){
      global $wp_version;

      if ( $wp_version < 8.5 && 'hello.php' == $plugin ) {
        error_log("WordPress need to be at least 8.5");      
        $args = var_export( func_get_args(), true);
        error_log($args);
        wp_die('WordPress need to be at least 8.5 to activate this plugin');
      }

    }
1
source | link