From 376d96ec067e362f4a256513546635a4a6d2ba66 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Sun, 12 Jul 2009 22:41:36 -0400 Subject: [PATCH] a ton of cleanup --- addons/BookmarkWidget/BookmarkWidget.inc | 14 ++ addons/BookmarkWidget/temp.js | 103 +++++++++++++++ addons/Core/Core.inc | 1 - classes/ComicPressComicPost.inc | 1 + functions.php | 161 +---------------------- 5 files changed, 122 insertions(+), 158 deletions(-) create mode 100644 addons/BookmarkWidget/BookmarkWidget.inc create mode 100644 addons/BookmarkWidget/temp.js diff --git a/addons/BookmarkWidget/BookmarkWidget.inc b/addons/BookmarkWidget/BookmarkWidget.inc new file mode 100644 index 0000000..fc07c60 --- /dev/null +++ b/addons/BookmarkWidget/BookmarkWidget.inc @@ -0,0 +1,14 @@ + __('Let your readers save their place via a cookie.', 'comicpress'))); + } + + function render_widget() { + $url_root = bloginfo('template_directory') . '/' . substr(dirname(__FILE__), strlen(realpath(get_stylesheet_directory()))); + var_dump($url_root); + } +} + +?> \ No newline at end of file diff --git a/addons/BookmarkWidget/temp.js b/addons/BookmarkWidget/temp.js new file mode 100644 index 0000000..34aa7e2 --- /dev/null +++ b/addons/BookmarkWidget/temp.js @@ -0,0 +1,103 @@ + + +
+ +
+ diff --git a/addons/Core/Core.inc b/addons/Core/Core.inc index c0fc464..97b2c29 100644 --- a/addons/Core/Core.inc +++ b/addons/Core/Core.inc @@ -24,7 +24,6 @@ class ComicPressAddonCore extends ComicPressAddon { } } - function setup_admin_interface() { add_theme_page(__("ComicPress Core", 'comicpress'), __('ComicPress Core', 'comicpress'), 'edit_themes', basename(__FILE__), array(&$this, 'render_admin')); diff --git a/classes/ComicPressComicPost.inc b/classes/ComicPressComicPost.inc index 4555f4d..d98e7e7 100644 --- a/classes/ComicPressComicPost.inc +++ b/classes/ComicPressComicPost.inc @@ -28,6 +28,7 @@ class ComicPressComicPost { foreach ($this->get_comic_image_attachments() as $attachment) { if (get_post_meta($attachment->ID, "comic_image_type", true) == $type) { echo $this->get_comic_img_tag(wp_get_attachment_url($attachment->ID, ''), $size_type, array('title' => $attachment->post_title)); + echo "
"; $found = true; if (!is_null($limit)) { diff --git a/functions.php b/functions.php index 17088cd..75cdbf4 100644 --- a/functions.php +++ b/functions.php @@ -1,45 +1,15 @@ -// -// Note that it's quite possible to slurp up the wrong file if your expressions are too broad. - -$comic_filename_filters = array(); -$comic_filename_filters['default'] = "{date}*.*"; - -require_once(dirname(__FILE__) . '/options.php'); - // load all of the comic & non-comic category information add_action('init', '__comicpress_init'); function __comicpress_init() { global $comicpress; + if (current_user_can('edit_files')) { + wp_cache_flush(); + } + foreach (glob(dirname(__FILE__) . '/classes/*.inc') as $file) { if (is_file($file)) { require_once($file); } } @@ -198,24 +168,6 @@ if ( isset( $_GET['randomcomic'] ) ) if ( function_exists('register_sidebar') ) register_sidebar(); -/* -function widget_comicpress_calendar() { ?> -
  • - -
  • - -
  • - -
  • -
  • Latest Comics

    @@ -245,111 +197,6 @@ function widget_comicpress_archive_dropdown() { ?>
  • -
    - -
    -