Skip to content

Commit

Permalink
Use WordPress' built-in plugin/url functions so as not to break thing…
Browse files Browse the repository at this point in the history
…s (ssl in particular)
  • Loading branch information
jtsternberg committed Sep 4, 2015
1 parent f750262 commit cb11a44
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 1 addition & 8 deletions include/config.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<?php
/**
* Remember plugin path & URL
*/
define( 'MUCD_PATH', plugin_basename( realpath( dirname( __FILE__ ).'/..' ) ) );
define( 'MUCD_COMPLETE_PATH', WP_PLUGIN_DIR.'/'.MUCD_PATH );
define( 'MUCD_URL', WP_PLUGIN_URL.'/'.MUCD_PATH );

/**
* Domaine
*/
Expand All @@ -27,4 +20,4 @@
* Environment constants
*/
define( 'MUCD_PRIMARY_SITE_ID', 1 );
define( 'MUCD_MAX_NUMBER_OF_SITE', 5000 );
define( 'MUCD_MAX_NUMBER_OF_SITE', 5000 );
9 changes: 8 additions & 1 deletion multisite-clone-duplicator.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
}

if ( ! class_exists( 'MUCD' ) ) {
/**
* Remember plugin path & URL
*/
define( 'MUCD_PATH', plugin_basename( realpath( dirname( __FILE__ ).'/..') ) );
define( 'MUCD_COMPLETE_PATH', str_replace( '/include/', '', plugin_dir_path( __FILE__ ) ) );
define( 'MUCD_URL', str_replace( '/include/', '', plugin_dir_url( __FILE__ ) ) );

// Load configuration
require_once realpath( dirname( __FILE__ ) ) . '/include/config.php';

Expand Down Expand Up @@ -105,4 +112,4 @@ public static function init() {
}
}
MUCD::hooks();
}
}

0 comments on commit cb11a44

Please sign in to comment.