[buddypress-trac] [BuddyPress] #959: BP_PLUGIN_URL - "define" enhancement for partial SSL-enabled BP sites [Has Patch] (was: BP_PLUGIN_URL - "define" enhancement for partial SSL-enabled BP sites)

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Sep 4 15:08:47 UTC 2009


#959: BP_PLUGIN_URL - "define" enhancement for partial SSL-enabled BP sites [Has
Patch]
------------------------------+---------------------------------------------
Reporter:  r-a-y              |       Owner:  jason_jm
    Type:  defect             |      Status:  accepted
Priority:  minor              |   Milestone:  1.1     
Keywords:  SSL, plug-in, url  |  
------------------------------+---------------------------------------------
Changes (by Jason_JM):

  * type:  enhancement => defect


Comment:

 R-a-y is right on this one.

 ==Trace of what goes on now==
 [bp-core.php TRUNK @ 09.04.2009 ]
 8:      define( 'BP_PLUGIN_URL', WP_PLUGIN_URL . '/buddypress' );

 [wp-settings.php TRUNK @ 09.04.2009]
 410:    if ( !defined('WP_PLUGIN_URL') )
 411:            define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); //
 full url, no trailing slash

 [wp-settings.php TRUNK @ 09.04.2009]
 391:    if ( !defined('WP_CONTENT_URL') )
 392:            define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-
 content'); // full url - WP_CONTENT_DIR is defined further up

 It is this call to "get_option('siteurl')" which obtains an hard-coded
 value from the database (put there during install time) to be http.  The
 desired scheme may not always be http.

 ==R-A-Y's proposal==
 Replacing the line in bp-core.php with the one recommended by R-A-Y should
 work well.

 [bp-core.php PROPOSAL]
 8:      define( 'BP_PLUGIN_URL', plugins_url($path = '/buddypress');

 plugins_url as of [TRUNK @ 09.04.2009] does a proper scheme lookup based
 on is_ssl().

 ==Patch==
 Patch provided.  Thanks R-A-Y!

-- 
Ticket URL: <http://trac.buddypress.org/ticket/959#comment:4>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list