-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
|
||
use craft\base\FieldInterface; | ||
use craft\fields\Assets; | ||
use craft\wpimport\generators\volumes\Uploads; | ||
use craft\wpimport\generators\volumes\WpContent; | ||
|
||
/** | ||
* @author Pixel & Tonic, Inc. <[email protected]> | ||
|
@@ -23,7 +23,7 @@ protected static function uid(): string | |
|
||
protected static function create(): FieldInterface | ||
{ | ||
$sourceKey = sprintf('volume:%s', Uploads::get()->uid); | ||
$sourceKey = sprintf('volume:%s', WpContent::get()->uid); | ||
$field = new Assets(); | ||
$field->name = 'Media'; | ||
$field->handle = 'media'; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
/** | ||
* @author Pixel & Tonic, Inc. <[email protected]> | ||
*/ | ||
class Uploads extends BaseVolumeGenerator | ||
class WpContent extends BaseVolumeGenerator | ||
{ | ||
protected static function uid(): string | ||
{ | ||
|
@@ -31,8 +31,9 @@ protected static function uid(): string | |
|
||
protected static function populate(Volume $volume): void | ||
{ | ||
$volume->name = 'Uploads'; | ||
$volume->handle = 'uploads'; | ||
$volume->name = 'WordPress Content'; | ||
$volume->handle = 'wpContent'; | ||
$volume->subpath = 'wp-content'; | ||
$volume->setFsHandle(UploadsFs::get()->handle); | ||
} | ||
|
||
|
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