Created
July 27, 2011 21:50
-
-
Save grafikchaos/1110455 to your computer and use it in GitHub Desktop.
Patch for correctly naming the WPCF7_PLUGIN_NAME constant using the basename() function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/wp-content/plugins/contact-form-7/wp-contact-form-7.php b/wp-content/plugins/contact-form-7/wp-contact-form-7.php | |
index ea9427f..b8549e2 100644 | |
--- a/wp-content/plugins/contact-form-7/wp-contact-form-7.php | |
+++ b/wp-content/plugins/contact-form-7/wp-contact-form-7.php | |
@@ -30,8 +30,9 @@ define( 'WPCF7_VERSION', '2.4.6' ); | |
if ( ! defined( 'WPCF7_PLUGIN_BASENAME' ) ) | |
define( 'WPCF7_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); | |
-if ( ! defined( 'WPCF7_PLUGIN_NAME' ) ) | |
- define( 'WPCF7_PLUGIN_NAME', trim( dirname( WPCF7_PLUGIN_BASENAME ), '/' ) ); | |
+if (!defined('WPCF7_PLUGIN_NAME')) { | |
+ define('WPCF7_PLUGIN_NAME', trim(basename(dirname(WPCF7_PLUGIN_BASENAME)), '/') ); | |
+} | |
if ( ! defined( 'WPCF7_PLUGIN_DIR' ) ) | |
define( 'WPCF7_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . WPCF7_PLUGIN_NAME ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment