Browse files

Use wp_content_dir() in mgs_core.

For greater compatibility with future WordPress releases the mgs_core
curl and cdir attributes now use wp_content_dir().

**This requires users on single-site setups to drag their /webcomic
directory from /wp-content into /wp-content/uploads.** Networked setups
should be unaffected (needs further testing).
  • Loading branch information...
1 parent ba4da97 commit 08703397056dbd6841d811d18105ab9202ceaf46 Michael Sisk committed Sep 22, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 webcomic-includes/mgs-core.php
View
6 webcomic-includes/mgs-core.php
@@ -57,9 +57,11 @@
if ( !$this->file ) $this->file = __FILE__;
if ( !$this->type ) $this->type = 'plugin';
+ $upload = wp_upload_dir();
+
$this->base = ( 'plugin' == $this->type ) ? plugin_basename( $this->file ) : dirname( $this->file );
- $this->cdir = ( is_multisite() ) ? BLOGUPLOADDIR : WP_CONTENT_DIR;
- $this->curl = ( is_multisite() ) ? trailingslashit( get_bloginfo( 'url' ) ) . 'files' : WP_CONTENT_URL;
+ $this->cdir = $upload[ 'basdir' ];
+ $this->curl = $upload[ 'baseurl' ];
$this->update = array();
$this->errors = array();
$this->options = $this->option();

0 comments on commit 0870339

Please sign in to comment.