From 20efe6d7a178ee7466dd7427f580d281c6122d24 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 16 Nov 2009 12:46:53 -0500 Subject: [PATCH] complete switch over to plugin --- comicpress-core.php | 55 ++++++++++++++++++++++++++++++++++ functions.php => functions.inc | 47 +---------------------------- test/FunctionsTest.php | 2 +- 3 files changed, 57 insertions(+), 47 deletions(-) create mode 100644 comicpress-core.php rename functions.php => functions.inc (74%) diff --git a/comicpress-core.php b/comicpress-core.php new file mode 100644 index 0000000..34f6918 --- /dev/null +++ b/comicpress-core.php @@ -0,0 +1,55 @@ +init(); + + $comicpress_admin = new ComicPressAdmin(); + $comicpress_admin->init(); + $comicpress_admin->handle_update(); + + $comicpress_filters = new ComicPressFilters(); + $comicpress_filters->init(); +} + + diff --git a/functions.php b/functions.inc similarity index 74% rename from functions.php rename to functions.inc index 1189a3d..e48be3b 100644 --- a/functions.php +++ b/functions.inc @@ -1,40 +1,6 @@ init(); - - $comicpress_admin = new ComicPressAdmin(); - $comicpress_admin->init(); - $comicpress_admin->handle_update(); - - $comicpress_filters = new ComicPressFilters(); - $comicpress_filters->init(); -} +// Global template functions for ComicPress function F($name, $path, $override_post = null) { global $post; @@ -45,17 +11,6 @@ function F($name, $path, $override_post = null) { return $comicpress->find_file($name, $path, $comic_post->find_parents()); } -/** - * Finish rendering this template and shove the output into application.php. - */ -function finish_comicpress() { - $content = ob_get_clean(); - - include(F('application.php', '')); -} - -// @codeCoverageIgnoreEnd - /** * Protect global $post and $wp_query. */ diff --git a/test/FunctionsTest.php b/test/FunctionsTest.php index d237b26..7678072 100644 --- a/test/FunctionsTest.php +++ b/test/FunctionsTest.php @@ -2,7 +2,7 @@ require_once('PHPUnit/Framework.php'); require_once('MockPress/mockpress.php'); -require_once(dirname(__FILE__) . '/../functions.php'); +require_once(dirname(__FILE__) . '/../functions.inc'); class FunctionsTest extends PHPUnit_Framework_TestCase { function providerTestM() {