I’m trying to include the global $shortcodes variable into one of my plugin files. The file is a tinymce popup plugin… and hence isn’t initialized from within wordpress.
So, what is the best way to “call” wordpress so that I can include the
wp-adminfile which is needed for definition of my shortcodes list.
I was using:
$file = dirname(__FILE__); $file = substr($file, 0, stripos($file, "wp-content") ); $file2 = dirname(__FILE__); $file2 = substr($file2, 0, stripos($file2, "wp-content") ); require( $file . "/wp-load.php"); require( $file2 . "/wp-admin/admin.php");
But, this results in this notice:
Notice: Undefined offset: 1
What is the best way to access wordpress global variables from within a plugin file, under this circumstance?
- The topic ‘Wordpres Variables from outside file’ is closed to new replies.