Plugin Development: Inconsistent file include sources.
|Reported by:||sterlo||Owned by:|
Story: I was building a plugin and created an options page.
Here are the relevant functions:
In the constructor:
add_action( 'admin_menu' , array( &$this , 'add_menu' ) , 1 );
In the function:
add_options_page( 'XXX_options' , 'XXX' , 'manage_options' , 'XXX_options' , array( &$this , 'options' ) );
In the other function:
include( 'options.php' );
Results: Instead of including /wp-content/plugins/myplugin/options.php it includes /wp-admin/options.php
If I change the include path to this:
include( 'afolderinmyplugin/options.php' );
Then it now pulls from /wp-content/plugins/myplugin/afolderinmyplugin/options.php
Seems like inconsistent functionality to me and should probably be fixed.