Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




SCOPER_ABSPATH & symlinks

UserPost

2:55 pm
February 23, 2010


pwarnock

New Member

posts 1

1

I've symlinked my plugins directory and had a problem with the path defined for SCOPER_ABSPATH. The following is a patch that works for me and should be flexible enough to work with any system.

Index: role-scoper/role-scoper.php
===================================================================
— role-scoper/role-scoper.php (revision 16362)
+++ role-scoper/role-scoper.php (working copy)
@@ -135,7 +135,7 @@
 if ( ! defined('WP_CONTENT_DIR') )
        define( 'WP_CONTENT_DIR', str_replace('\\', '/', ABSPATH) . 'wp-content' );
 
-define ('SCOPER_ABSPATH', WP_CONTENT_DIR . '/plugins/' . SCOPER_FOLDER);
+define ('SCOPER_ABSPATH', WP_PLUGINS_DIR.DIRECTORY_SEPARATOR.basename(SCOPER_FOLDER));
 
 define ('ANON_ROLEHANDLE_RS', 'wp_public_reader');
 
@@ -237,4 +237,4 @@
        add_action('set_current_user', 'scoper_maybe_init', 2);
        add_action('init', 'scoper_log_init_action', 1);
 }
-?>
\ No newline at end of file
+?>

4:06 pm
February 23, 2010


Kevin

Admin

posts 2402

2

Thanks. I'll make this conditional on defined( 'WP_PLUGINS_DIR' ) since it's not by default.

10:35 am
February 24, 2010


Kevin

Admin

posts 2402

3

I'm going to use WP_PLUGIN_DIR instead, which is defined by default.

2:25 pm
February 26, 2010


Kevin

Admin

posts 2402

4

This is now implemented in the updated Role Scoper development snapshot and will be included in the next release.


About the Agapetry forum

Currently Online:

10 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1186

Posts: 5409

Members:

There are 1176 members

There are 1 guests


Kevin has made 2402 posts

Top Posters:

metal450 - 159

Ragnar - 105

YikYak - 70

whiteorb - 44

Daisy - 35

Administrator: Kevin | Moderators: Kevin