Skip to content

Commit

Permalink
Use wp_content_dir() in mgs_core.
Browse files Browse the repository at this point in the history
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
Michael Sisk committed Sep 22, 2011
1 parent ba4da97 commit 0870339
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webcomic-includes/mgs-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ final function __construct() {
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();
Expand Down

0 comments on commit 0870339

Please sign in to comment.