Losing constants and variables wordpress core
-
Hello,
I’m developing my first plugin. It creates directories and save the path, level (if it is a subdirectory of other created directory) and name in a custom table, created at the activation.
The plugin has an option page where users can manager the files in each directory or create more directories and upload more files. In this option page I had to create a form with action atribute as
"<?php echo EASYDM_PLUGIN_URL; ?>generate-dir.php"
.The problem is when I try to use the constants like WP_CONTENT_URL, ABSPATH wordpress tells me they are undefined constants… just in this page of action atribute. Why?
I tried
//add_action( 'admin_init', 'easydm_register_settings' );
withregister_setting( 'pluginPage', 'easydm_settings' );
and so on, but when I click in submit button the page redirects me to the ‘file.php’ in action but aswp-admin/file.php
. So, neither the first nor the second way are working for me. How can I do that?
- The topic ‘Losing constants and variables wordpress core’ is closed to new replies.