Changeset 1986911
- Timestamp:
- 12/06/2018 03:20:23 PM (7 years ago)
- File:
-
- 1 edited
-
easycoder/trunk/easycoder.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easycoder/trunk/easycoder.php
r1986787 r1986911 12 12 exit; 13 13 } 14 14 15 // The EasyCoder library 15 16 add_action('wp_enqueue_scripts', 'easycoder_enqueue_script', 2); … … 19 20 } 20 21 21 add_action('init', 'check_easycoder_plugins', 1 ); 22 function check_easycoder_plugins() { 22 // Set up default plugin and REST scripts 23 add_action('init', 'setup_default_files', 1 ); 24 function setup_default_files() { 23 25 $pluginDir = plugin_dir_path( __FILE__ ); 24 26 if (!file_exists($pluginDir . 'plugins.js')) { 25 27 rename($pluginDir . 'plugins-sample.js', $pluginDir . 'plugins.js'); 26 28 } 29 if (!file_exists($pluginDir . 'rest-local.php')) { 30 rename($pluginDir . 'rest-local-sample.php', $pluginDir . 'rest-local.php'); 31 } 27 32 } 28 33
Note: See TracChangeset
for help on using the changeset viewer.