more cleanup
This commit is contained in:
parent
b0d1d42118
commit
39a88d8a60
|
@ -186,6 +186,11 @@ class ComicPressComicPost {
|
|||
$attachment = array_merge($attachment, $info['children']);
|
||||
$remove_from_list = array_merge($remove_from_list, array_values($info['children']));
|
||||
}
|
||||
foreach ($comicpress->comicpress_options['image_types'] as $type => $info) {
|
||||
if (!isset($attachment[$type])) {
|
||||
$attachment[$type] = $attachment[$default_type];
|
||||
}
|
||||
}
|
||||
$attachments_with_children[] = $attachment;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,12 @@
|
|||
After uploading an image, check <strong>Let ComicPress treat this image as a comic media file</strong>. This will enable ComicPress management of the file.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Uploaded media needs to be attached to a post so that ComicPress can work with it. You'll see all of the attached images under the <strong>Gallery</strong> tab.
|
||||
If you want to use an image in your Media Library that isn't attached to the post, find the image in your Library, enable the option <strong>Change Parent?</strong>,
|
||||
and save the changes. A file can only be attached to one image at a time.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<code><img title></code> hovertext, a common way to add an additional punchline or comment to a comic, can be added on the <strong>Caption</strong> line.
|
||||
If not empty, it will automatically be inserted in the correct way into the image tag.
|
||||
|
@ -72,7 +78,7 @@
|
|||
</p>
|
||||
|
||||
<p>
|
||||
If you attach new images using the <em>Media Uploader</em>, click the <em>Refersh</em> button to reload the ordering. Any changes not saved via <em>Update post</em> will be lost.
|
||||
If you attach new images using the <em>Media Uploader</em>, click the <em>Refresh</em> button to reload the ordering. Any changes not saved via <em>Update post</em> will be lost.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -138,7 +138,7 @@ R('previous', 'comic');
|
|||
// only search the children of the comic category
|
||||
R('previous', array('child_of' => 'comic', '!only' => 'comic'));
|
||||
|
||||
// get the previos post relative to the provided post
|
||||
// get the previous post relative to the provided post
|
||||
R('previous', null, $other_post);
|
||||
</pre>
|
||||
|
||||
|
|
|
@ -152,6 +152,21 @@ function RL($restrictions = null, $override_post = null) {
|
|||
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
function In_R($restrictions = null, $override_post = null) {
|
||||
global $post;
|
||||
$post_to_use = !is_null($override_post) ? $override_post : $post;
|
||||
|
||||
$post_categories = wp_get_post_categories($post_to_use->ID);
|
||||
if (is_array($post_categories)) {
|
||||
$category_id = reset($post_categories);
|
||||
if (is_numeric($category_id)) {
|
||||
return in_array($category_id, RL($restrictions, $post_to_use));
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function M($override_post = null) {
|
||||
global $post, $__attachments;
|
||||
$post_to_use = !is_null($override_post) ? $override_post : $post;
|
||||
|
|
|
@ -195,8 +195,8 @@ class ComicPressComicPostTest extends PHPUnit_Framework_TestCase {
|
|||
'test-4' => array('enabled' => false),
|
||||
),
|
||||
array(
|
||||
array('comic' => 'test-1', 'default' => 'test-1'),
|
||||
array('comic' => 'test-2', 'default' => 'test-2')
|
||||
array('default' => 'test-1', 'comic' => 'test-1', 'rss' => 'test-1'),
|
||||
array('default' => 'test-2', 'comic' => 'test-2', 'rss' => 'test-2')
|
||||
)
|
||||
),
|
||||
array(
|
||||
|
|
|
@ -223,4 +223,8 @@ class FunctionsTest extends PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals($expected_result, $result->term_id);
|
||||
}
|
||||
}
|
||||
|
||||
function testIs_R() {
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue