Perhaps you'd be better off using plugin_dir_path(__FILE__);?

Example:

&lt;?php
define( 'MYPLUGINNAME_PATH', plugin_dir_path(__FILE__) );
require MYPLUGINNAME_PATH . 'includes/class-metabox.php';
require MYPLUGINNAME_PATH . 'includes/class-widget.php';
?&gt;


[EDIT - 06/29/2012]

I believe you have your PHP OOP logic incorrect, but I could be wrong. You're defining a property in a child class which extends a parent class. You then call the parent constructor inside the child constructor. 

The code you provided shows that you assign the child class property $plugin_basename, but then you don't do anything with it after that.

I'm assuming you're trying to set a property $plugin_basename for the parent class to handle. However, if that's the case, then you need to either define the property within the parent class, OR you need to call the parent method which makes use the property $plugin_basename. 

If that's NOT the case, then you need to be sure you make use of the property $plugin_basename, within the child class, AFTER it's been assigned like so: $this-&gt;child_class_method_name($this-&gt;plugin_basename);

You could access the parent class method which handles the property $plugin_basename, and pass the property assigned by the child class to the parent class method like so: $this-&gt;parent_class_method_name($this-&gt;plugin_basename);

I'm not really too certain how you have your plugin setup, given the minimal amount of code you provided. 

If you could provide more of an idea of what you do with the property $plugin_basename, after it's been assigned, I could possibly be of more assistance.

PHP Fatal error: Call to undefined function plugin_basename
Can anybody show me how to make divider by 3 frequency using flip flop and logic gate ?

Does anyone here have any good suggestions ?
