[wp-hackers] [Theme Root Plug-In] Admin Setting for Alternate Path to Themes

Doug Daulton ddaulton at ursastudios.com
Mon Feb 28 07:36:22 GMT 2005


Ryan,

I must be dense. I cannot get this thing to work.  I am using 1.5 Strayhorn.

Assuming my site is http://munkee.com ... the following is true.

Wordpress lives here:

    munkee.com/assets/code/wordpress

Themes (copied from the base install) live here:

    munkee.com/assets/themes

I am running WP from webroot per the configuration described here:

http://wordpress.org/support/topic.php?id=23827

My plugin looks like this:

<?
    /*
    Plugin Name:  Theme Root
    Plugin URI: http://wordpress.org/#
    Description: Set a custom theme root.
    Author: Ryan Boren
    Version: 1.0
    Author URI:
    */

    function tr_set_theme_root($theme_root) {
            return ABSPATH . "assets/themes";
    }

    function tr_set_theme_root_uri($theme_root) {
            return get_settings('siteurl') . "/assets/themes";
    }

    add_filter('theme_root', 'tr_set_theme_root');
    add_filter('theme_root_uri', 'tr_set_theme_root_uri');
?>

****************************************************

When I activate the plug-in, I get a blank screen.  I've tried a bunch 
of different things, including all shape and form of path (with 
leading/trailing slash, etc) and creating new add_filter instances.  So, 
I am a little lost.

Is there a developer debug switch I can throw to see the arrays and such 
being passed?  Then, perhaps, I can sort this out on my own.  If you 
point me in the right direction, I'll write up a doc for the community.

Thanks,

Doug



More information about the hackers mailing list