upload path
This commit is contained in:
parent
9bfedbe0c9
commit
cc1044392d
@ -120,6 +120,8 @@ class ComicPressBackendFilesystemFactory {
|
|||||||
|
|
||||||
function _replace_type($post, $type) { return $type; }
|
function _replace_type($post, $type) { return $type; }
|
||||||
|
|
||||||
|
function _replace_upload_path($post, $type) { return get_option('upload_path'); }
|
||||||
|
|
||||||
function _replace_type_folder($post, $type) {
|
function _replace_type_folder($post, $type) {
|
||||||
$comicpress = ComicPress::get_instance();
|
$comicpress = ComicPress::get_instance();
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<h3><?php _e('URL Backend Configuration', 'comicpress') ?></h3>
|
<h3><?php _e('Filesystem Backend Configuration', 'comicpress') ?></h3>
|
||||||
<div id="comicpress-url-backend-configuration" class="comicpress-holder">
|
<div id="comicpress-url-backend-configuration" class="comicpress-holder">
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
<?php _e('URL Pattern:', 'comicpress') ?>
|
<?php _e('Filesystem Pattern:', 'comicpress') ?>
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<input style="font-size: 1.5em; width: 100%" type="text" name="cp[backend_options][filesystem][search_pattern]" value="<?php echo $pattern ?>" />
|
<input style="font-size: 1.5em; width: 100%" type="text" name="cp[backend_options][filesystem][search_pattern]" value="<?php echo $pattern ?>" />
|
||||||
|
@ -117,6 +117,7 @@ class ComicPressBackendFilesystemFactoryTest extends PHPUnit_Framework_TestCase
|
|||||||
),
|
),
|
||||||
2
|
2
|
||||||
),
|
),
|
||||||
|
array('%wordpress%/%upload-path%/comic/%date-Y%/%date-Y-m-d%*.jpg', array('/wordpress/upload/comic/2009/2009-01-01*.jpg')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,6 +141,8 @@ class ComicPressBackendFilesystemFactoryTest extends PHPUnit_Framework_TestCase
|
|||||||
wp_set_post_categories(1, array(2));
|
wp_set_post_categories(1, array(2));
|
||||||
wp_set_post_categories(2, array(4));
|
wp_set_post_categories(2, array(4));
|
||||||
|
|
||||||
|
update_option('upload_path', 'upload');
|
||||||
|
|
||||||
$fs->search_string = $string;
|
$fs->search_string = $string;
|
||||||
|
|
||||||
$comicpress = ComicPress::get_instance(true);
|
$comicpress = ComicPress::get_instance(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user