Friday, 7 June 2013

Go-Script get_option without theme

Go-Script get_option without theme

i use a go-script into my plugin for redirecting users and needs into this script access to the plugin options.
The Script looks like this:
<?php
define('DOING_AJAX', true);
define('WP_USE_THEMES', false);
define('WP_BASE', !defined('WP_BASE') ? dirname(dirname(dirname(dirname(__FILE)))) : WP_BASE);
global $wp, $wp_query, $wp_the_query, $wp_rewrite, $wp_did_header;
require(WP_BASE.'/wp-load.php');
$options = get_option('slugname');
die(print_r($options));
The die always are empty. I'm sure, i have forget something to load into this script. But what?

No comments:

Post a Comment