From 88b9e6cf8315fd04fe2b98037579f6f3f76e9b58 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Sat, 7 Nov 2009 12:23:10 -0500 Subject: [PATCH] remove layout stuff --- functions.php | 89 ---------------------------------------- layouts/classic.inc | 19 --------- layouts/three-column.inc | 21 ---------- test/ComicPressTest.php | 52 +---------------------- 4 files changed, 1 insertion(+), 180 deletions(-) delete mode 100644 layouts/classic.inc delete mode 100644 layouts/three-column.inc diff --git a/functions.php b/functions.php index 88721c8..0f80ea6 100644 --- a/functions.php +++ b/functions.php @@ -44,22 +44,6 @@ function __comicpress_init() { } } -function comicpress_init() { - global $post, $comicpress; - - if (!empty($post)) { - if (in_comic_category() && $comicpress->is_multicomic() && !is_index()) { - $comicpress->setup_multicomic_partial_paths($post->ID); - } - } - - $comicpress->partial_paths[] = get_template_directory() . '/partials'; -} - -function comicpress_get_header() { - get_header(); -} - function include_partial($partials = '') { global $comicpress, $post, $nav_comics; @@ -80,9 +64,6 @@ function include_partial($partials = '') { } } -function in_comic_category() { - global $post, $comicpress; -} /** * Display the list of Storyline categories. @@ -127,74 +108,4 @@ function comicpress_list_storyline_categories($args = "") { echo $output; } -/** -* Display the comic transcript -* Transcript must be entered into a custom field named "transcript" -* @param string $displaymode, "raw" (straight from the field), "br" (includes html line breaks), "styled" (fully css styled with JavaScript expander) -*/ -function the_transcript($displaymode = 'raw') { - $transcript = get_post_meta( get_the_ID(), "transcript", true ); - switch ($displaymode) { - case "raw": - echo $transcript; - break; - case "br": - echo nl2br($transcript); - break; - case "styled": - if (!empty($transcript)) { ?> - -
- -
  • -

    Latest Comics

    - -
  • - -
  • -

    ? Random Comic

    -
  • - -
  • - -
  • - diff --git a/layouts/classic.inc b/layouts/classic.inc deleted file mode 100644 index dd6a7e8..0000000 --- a/layouts/classic.inc +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - -
    - -
    - - - - diff --git a/layouts/three-column.inc b/layouts/three-column.inc deleted file mode 100644 index 85dd6c5..0000000 --- a/layouts/three-column.inc +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - -
    - -
    - - - - diff --git a/test/ComicPressTest.php b/test/ComicPressTest.php index e78aa6c..e05481f 100644 --- a/test/ComicPressTest.php +++ b/test/ComicPressTest.php @@ -12,57 +12,7 @@ class ComicPressTest extends PHPUnit_Framework_TestCase { unset($post); $this->cp = new ComicPress(); } - - function providerTestGetLayoutChoices() { - return array( - array( - array(), - array() - ), - array( - array( - 'layout.php' => << << array( - 'Layout Name' => 'Test', - 'Sidebars' => 'left,right', - )) - ), - ); - } - - /** - * @dataProvider providerTestGetLayoutChoices - */ - function testGetLayoutChoices($files, $expected_results) { - $cp = $this->getMock('ComicPress', array('_glob', '_file_get_contents')); - - _set_template_directory('/test'); - - $file_names = array(); - foreach (array_keys($files) as $file) { $file_names[] = '/test/layouts/' . $file; } - - $cp->expects($this->once())->method('_glob')->with('/test/layouts/*')->will($this->returnValue($file_names)); - foreach ($files as $file => $contents) { - $cp->expects($this->once())->method('_file_get_contents')->with('/test/layouts/' . $file)->will($this->returnValue($contents)); - } - - $this->assertEquals($expected_results, $cp->get_layout_choices()); - } - + function providerTestGetSortedPostCategories() { return array( array(