I’ve the next downside. I’ve created a plugin for WordPress. Within the first variations of the plugin I compelled customers to auto replace utilizing this perform:
perform my_plugin_auto_update ( $replace, $merchandise ) {
$plugins = array ( 'my_plugin' );
if ( in_array( $item->slug, $plugins ) ) {
// replace plugin
return true
} else {
// use default settings
return $replace;
}
}
add_filter( 'auto_update_plugin', 'my_plugin_auto_update ', 10, 2 );
The consumer had no technique to disable auto-update.
At present the plugin is already steady and I do not wish to pressure customers to auto-update anymore. After I take away the above perform, the consumer can allow/disable auto-update from the Plugins tab. Nonetheless by default this auto-update is disabled. Easy methods to make that after putting in new model of my plugin auto-update is enabled by default but in addition consumer may disable it?