PluginProbe
Add Custom Codes – Insert Header, Footer, Custom PHP Snippets, CSS, Javascript / trunk
Add Custom Codes – Insert Header, Footer, Custom PHP Snippets, CSS, Javascript vtrunk
trunk 1.0 2.0 3.0 3.5 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.71 4.80 5.0
add-custom-codes / deactivate / deactivate.php

deactivate.php in Add Custom Codes – Insert Header, Footer, Custom PHP Snippets, CSS, Javascript trunk, at deactivate/deactivate.php

28 lines 909 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // If this file was called directly, abort.
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6 add_action('admin_enqueue_scripts', 'accodes_enqueue_deactivation_feedback');
7 function accodes_enqueue_deactivation_feedback($hook) {
8 if ($hook !== 'plugins.php') {
9 return;
10 }
11
12 $plugin_data = get_file_data(plugin_dir_path(__FILE__) . '../add-custom-codes.php', array('Version' => 'Version'), 'plugin');
13
14 wp_enqueue_script(
15 'accodes-deactivate-feedback',
16 plugins_url('deactivate-feedback.js', __FILE__),
17 array('jquery'),
18 $plugin_data['Version'],
19 true
20 );
21
22 wp_localize_script('accodes-deactivate-feedback', 'accodes_feedback', array(
23 'token' => 'rY9b@F9xM3hPzLw82dKq!xT4',
24 'plugin_version' => $plugin_data['Version'],
25 'wp_version' => get_bloginfo('version'),
26 'php_version' => phpversion()
27 ));
28 }