From 750752f2dfd94f4624344ce2c192f06ddb2850e6 Mon Sep 17 00:00:00 2001 From: Kevin Cristiano Date: Sat, 17 Oct 2015 13:35:08 -0400 Subject: [PATCH] CRM-16421 Rid Code base of references to 'wp-content' ---------------------------------------- * 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 | 2 +- CRM/Utils/System/WordPress.php | 4 ++-- templates/CRM/common/civicrm.settings.php.template | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CRM/Utils/System/Base.php b/CRM/Utils/System/Base.php index c6af5b0edb..54e6299503 100644 --- a/CRM/Utils/System/Base.php +++ b/CRM/Utils/System/Base.php @@ -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 diff --git a/CRM/Utils/System/WordPress.php b/CRM/Utils/System/WordPress.php index 5d744073af..c5a8816a6d 100644 --- a/CRM/Utils/System/WordPress.php +++ b/CRM/Utils/System/WordPress.php @@ -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; diff --git a/templates/CRM/common/civicrm.settings.php.template b/templates/CRM/common/civicrm.settings.php.template index 4224165487..380da1e8b9 100644 --- a/templates/CRM/common/civicrm.settings.php.template +++ b/templates/CRM/common/civicrm.settings.php.template @@ -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/'); * */ -- 2.25.1