Is there any way to test if a function running only on plugin update is successfully running?

Is there any way to test if a function running only on plugin update is successfully running? Yes. Background When you update a plugin, WordPress does several actions behind the scenes. Download the new version of the plugin Deactivate the old plugin version Delete the old plugin version Extract the new version Activate the new … Read more

use WordPress theme / plugin editor in my plugin

To start with you could use the following code. For security you could also add some nonce check and even use the settings api. Here plugin-test is your plugin folder name. $file = stripslashes(‘plugin-test/style.css’); $plugin_files = get_plugin_files($file); $file = validate_file_to_edit($file, $plugin_files); $real_file = WP_PLUGIN_DIR . “https://wordpress.stackexchange.com/” . $file; if( isset($_POST[‘plugin_test_settings’][‘newcontent’]) ) { $newcontent = stripslashes($_POST[‘plugin_test_settings’][‘newcontent’]); … Read more