CRM-16421 Rid Code base of references to 'wp-content'
authorKevin Cristiano <kcristiano@tadpole.cc>
Sat, 17 Oct 2015 17:35:08 +0000 (13:35 -0400)
committerKevin Cristiano <kcristiano@tadpole.cc>
Sat, 17 Oct 2015 17:35:08 +0000 (13:35 -0400)
----------------------------------------
* CRM-16421: Work to get CiviCRM for WordPress in WordPress' official Repository
  https://issues.civicrm.org/jira/browse/CRM-16421

CRM/Utils/System/Base.php
CRM/Utils/System/WordPress.php
templates/CRM/common/civicrm.settings.php.template

index c6af5b0edb6b1e30aa9b140a894c507bc72c66aa..54e6299503e6cdc9435cdbb634c262a8c32e4139 100644 (file)
@@ -632,7 +632,7 @@ abstract class CRM_Utils_System_Base {
       $userFrameworkResourceURL = $baseURL . "components/com_civicrm/civicrm/";
     }
     elseif ($config->userFramework == 'WordPress') {
-      $userFrameworkResourceURL = $baseURL . "wp-content/plugins/civicrm/civicrm/";
+      $userFrameworkResourceURL = CIVICRM_PLUGIN_URL . "civicrm/";
     }
     elseif ($this->is_drupal) {
       // Drupal setting
index 5d744073afb9a8938baec5615a30c3f0bb603820..c5a8816a6d4ed4ff785f6baf97217ab1c30469f6 100644 (file)
@@ -85,9 +85,9 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base {
     $upload_dir      = wp_upload_dir();
     $settingsDir     = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'civicrm' . DIRECTORY_SEPARATOR;
     $settingsURL     = $upload_dir['baseurl'] . DIRECTORY_SEPARATOR . 'civicrm' . DIRECTORY_SEPARATOR;
-    if (is_dir(ABSPATH . 'wp-content/plugins/files/civicrm/')) {
+    if (is_dir(WP_PLUGIN_DIR . '/files/civicrm/')) {
       //for legacy path
-      $filesURL = $baseURL . "wp-content/plugins/files/civicrm/";
+      $filesURL = WP_PLUGIN_URL . "/files/civicrm/";
     }
     elseif (is_dir($settingsDir)) {
       $filesURL = $settingsURL;
index 4224165487a8940757bc22bf04a196af8dd4c459..380da1e8b947090cc83ec7cca8cf73d8fcc272aa 100644 (file)
@@ -129,12 +129,12 @@ if (!defined('CIVICRM_LOGGING_DSN')) {
  *      define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/joomla/media/civicrm/templates_c/');
  *
  * EXAMPLE - WordPress Installations:
- * If the path to the WordPress home directory is /var/www/htdocs/wordpress
+ * If the path to the WordPress home directory is /var/www/htdocs/wordpress and the path to the plugin directory is /var/www/htdocs/wordpress/wp-content/plugins
  * the $civicrm_root setting would be:
  *      $civicrm_root = '/var/www/htdocs/wordpress/wp-content/plugins/civicrm/civicrm/';
  *
  * the CIVICRM_TEMPLATE_COMPILEDIR would be:
- *      define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/wordpress/wp-content/plugins/files/civicrm/templates_c/');
+ *      define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/wordpress/wp-content/uploads/civicrm/templates_c/');
  *
  */