Browse files

Remove legacy plugin.

Because Webcomic 4 was rebuilt from scratch we need to remove all of
the old plugin files.
  • Loading branch information...
1 parent c357675 commit d95380da9d80f034e9d86dc9ad3bd30c0ec9439b Michael Sisk committed Jun 1, 2012
View
65 readme.md
@@ -1,7 +1,60 @@
-Webcomic is a plugin for the WordPress publishing platform that adds a number of features related to creating, managing, and sharing webcomics. Key features include:
+# Webcomic - Comic publishing power for the web.
-- **Integration:** Turn any WordPress theme into a Webcomic site with the flip of a switch. Webcomic 3's new integration option makes getting up and running easier than ever.
-- **Management:** Manage webcomic posts, files, storylines, characters, print selling options, collection access, age restrictions, transcribing, buffers, and more.
-- **Multiplicity:** Manage any number of collections on a single WordPress site or a network of sites.
-- **Internationalization:** If Webcomic isn't already available in your language you can translate it into any language you speak using WordPress' own internationalization functions.
-- **Extensibility:** Build your own Webcomic-powered WordPress themes using a collection of new template tags, or modify the way Webcomic works using action and filter hooks.
+Webcomic is a plugin for [WordPress](//wordpress.org) that provides a host of features for creating, managing, and sharing webcomics. Take control of your webcomic with multi-comic management, theme integration, dynamic navigation, and more.
+
+## [✮ New in Webcomic 4 ✮](//vimeo.com/channels/webcomic)
+
+_**Everything!**_ Webcomic has been rebuilt to provide you with leaner, meaner webcomic management. Highlights include:
+
+- [OpenGraph](//ogp.me) support for any Webcomic-related page.
+- [Twitter](//twitter.com) integration for automatically tweeting new webcomics.
+- File management handled through the WordPress Media Library.
+- Each collection is now a custom post type with unique storyline and character taxonomies.
+- More collection-specific settings provide greater control over each webcomic on your site.
+- Transcripts are now a custom post type, taking full advantage of the administrative features WordPress provides.
+- Improved theme integration makes it easier than ever to start using Webcomic right away with almost any WordPress theme.
+- New and refactored template tags, widgets, and shortcodes for greater control and customization of your Webcomic-powered site.
+
+[**Existing Webcomic users should read this before upgrading.**](//webcomic.nu/upgrade)
+
+## Installation
+
+You can install Webcomic from the **Plugins > Add New** page in the administrative dashboard. Just do a search for `webcomic` and the first result should be the one you're looking for.
+
+### Manual Installation
+
+1. Download and extract Webcomic from the WordPress plugin directory.
+2. Upload the `webcomic` directory to your `wp-content/plugins` directory.
+3. Activate Webcomic through the **Plugins > Installed Plugins** page in the administrative dashboard.
+
+## Frequently Asked Questions
+
+### How do I use Webcomic?
+
+Once installed and activated you can use Webcomic in one of three ways:
+
+1. Turn on the **Integrate** option found on the **Settings > Webcomic** page in the administrative dashboard.
+2. Use an [official Webcomic theme](//webcomic.nu/download) to get the most out of Webcomic's features with minimal hassle.
+3. Leverage Webcomic's new template tags, widgets, and shortcodes to [modify an existing theme](//wordpress.org/extend/themes) or [build your own](//codex.wordpress.org/Theme_Development).
+
+### Where can I get help with Webcomic?
+
+- [Video Tutorials](//vimeo.com/channels/webcomic)
+- [Support Forum](//webcomic.nu/support)
+- [Technical Documentation](//webcomic.nu/docs)
+- [Issue Tracker](//github.com/mgsisk/webcomic/issues)
+- [Email Support](mailto:support@webcomic.nu)
+
+## Special Thanks
+
+To BigBagel, Miluette, LordRembo, Vaslittlecrow, Fesworks, Naomiyaki, MatthewEbel, and Kuipou for prerelease testing and feedback, and to the thousands of users that share their amazing work with Webcomic.
+
+---
+
+Copyright 2008 - 2012 Michael Sisk (contact@mgsisk.com)
+
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
View
82 readme.txt 100644 → 100755
@@ -1,52 +1,76 @@
=== Webcomic ===
Contributors: mgsisk
-Donate link: http://mgsisk.com/webcomicms.net/
-Tags: webcomic, comic, multiple comics, storylines, chapters, library, management, themes, posts, publish, custom post type, custom taxonomy, template tags, widgets
-Requires at least: 3.0
-Tested up to: 3.3.1
-Stable tag: 3.0.10
+Donate link: //webcomic.nu
+Tags: webcomics, archives, widgets, shortcodes, template tags, custom taxonomies, custom post types, media library, transcripts, characters, storylines, twitter, facebook, opengraph, paypal
+Requires at least: 3.3
+Tested up to: 3.4
+Stable tag: 4
+License: GPL2
+License URI: //www.gnu.org/licenses/gpl-2.0.html
-Comic publishing power for WordPress.
+Comic publishing power for the web.
== Description ==
-Please see the [official Webcomic site](http://mgsisk.com/webcomicms.net/) for the users manual, video tutorials, support forum, bug reports, and feature requests. For more direct assistance, contact [support@webcomicms.net](mailto:support@webcomicms.net).
+Webcomic provides a host of features for creating, managing, and sharing webcomics. Take control of your webcomic with multi-comic management, theme integration, dynamic navigation, and more.
-= ✮ Inkblot & Archimedes Users ✮ =
-
-*If you are upgrading from Webcomic 3.0.4* you must update your theme functions.php file and the mgs_core.php file found in the theme `/includes` directory after updating. You can download the latest versions of both Inkblot and Archimedes at [http://mgsisk.com/webcomicms.net/themes/](http://mgsisk.com/webcomicms.net/themes/).
-
-= Upgrading from Webcomic 1 or 2? =
+[vimeo http://vimeo.com/12500716]
-**Back up everything.** WordPress has a really handy export tool you can use to backup your data that we highly suggest you use before you attempt to upgrade. Upgrading directly from Webcomic 1 is *not* supported. Please upgrade to Webcomic 2 before you attempt to upgrade to Webcomic 3. You should also take note of the order of your chapters and anything else you'd really hate to lose, and watch this video:
+= ✮ New in Webcomic 4 ✮ =
-[vimeo http://vimeo.com/12500716]
+_**Everything!**_ Webcomic has been rebuilt to provide you with leaner, meaner webcomic management. Highlights include:
-Webcomic adds a number of features related to creating, managing, and sharing webcomics. Key features include:
+- [OpenGraph](//ogp.me) support for any Webcomic-related page.
+- [Twitter](//twitter.com) integration for automatically tweeting new webcomics.
+- File management handled through the WordPress Media Library.
+- Each collection is now a custom post type with unique storyline and character taxonomies.
+- More collection-specific settings provide greater control over each webcomic on your site.
+- Transcripts are now a custom post type, taking full advantage of the administrative features WordPress provides.
+- Improved theme integration makes it easier than ever to start using Webcomic right away with almost any WordPress theme.
+- New and refactored template tags, widgets, and shortcodes for greater control and customization of your Webcomic-powered site.
-- **Integration:** Turn any WordPress theme into a Webcomic site with the flip of a switch. Webcomic 3's new integration option makes getting up and running easier than ever.
-- **Management:** Manage webcomic posts, files, storylines, characters, print selling options, collection access, age restrictions, transcribing, buffers, and more.
-- **Multiplicity:** Manage any number of collections on a single WordPress site or a network of sites.
-- **Internationalization:** If Webcomic isn't already available in your language you can translate it into any language you speak using WordPress' own internationalization functions.
-- **Extensibility:** Build your own Webcomic-powered WordPress themes using a collection of new template tags, or modify the way Webcomic works using action and filter hooks.
+[**Existing Webcomic users should read this before upgrading.**](//webcomic.nu/upgrade)
== Installation ==
-Once you've confirmed with your web host that you're working with PHP 5 and have the latest version of WordPress up and running you can install Webcomic from the *Install Plugins* page. Just do a search for "webcomic" and the first result should be the one you're looking for.
+You can install Webcomic from the **Plugins > Add New** page in the administrative dashboard. Just do a search for `webcomic` and the first result should be the one you're looking for.
= Manual Installation =
-If you can't use the *Install Plugins* page for whatever reason, follow these steps to manually install Webcomic:
+1. Download and extract Webcomic from the WordPress plugin directory.
+2. Upload the `webcomic` directory to your `wp-content/plugins` directory.
+3. Activate Webcomic through the **Plugins > Installed Plugins** page in the administrative dashboard.
+
+== Frequently Asked Questions ==
+
+= How do I use Webcomic? =
+
+Once installed and activated you can use Webcomic in one of three ways:
-1. Download and extract Webcomic from the [WordPress plugin directory](http://wordpress.org/extend/plugins/webcomic).
-2. Upload the `webcomic` directory to the `/wp-content/plugins` directory. To install Webcomic as a special multisite plugin upload the contents of the `webcomic` directory to the `/wp-content/mu-plugins` directory.
-3. Activate the plugin through the *Manage Plugins* page in WordPress (not required if you've installed Webcomic in the `wp-content/mu-plugins` directory).
+1. Turn on the **Integrate** option found on the **Settings > Webcomic** page in the administrative dashboard.
+2. Use an [official Webcomic theme](//webcomic.nu/download) to get the most out of Webcomic's features with minimal hassle.
+3. Leverage Webcomic's new template tags, widgets, and shortcodes to [modify an existing theme](//wordpress.org/extend/themes) or [build your own](//codex.wordpress.org/Theme_Development).
-= Using Webcomic =
+= Where can I get help with Webcomic? =
-Webcomic's *Integrate* feature allows it to be used with any WordPress theme right out of the box, but to get the most out of Webcomic you may want to check out one of the [official Webcomic themes](http://mgsisk.com/webcomicms.net/support/manual/themes) or build your own theme using Webcomic's extensive selection of widgets, template tags, actions, and filters.
+- [Video Tutorials](//vimeo.com/channels/webcomic)
+- [Support Forum](//webcomic.nu/support)
+- [Technical Documentation](//webcomic.nu/docs)
+- [Issue Tracker](//github.com/mgsisk/webcomic/issues)
+- [Email Support](mailto:support@webcomic.nu)
+
+== Changelog ==
+
+= GitHub =
+
+All Webcomic changes can be followed at [the master fork on GitHub](//github.com/mgsisk/webcomic/commits/master)
== Upgrade Notice ==
-= 3.0.6 =
-- Query strings for secure directory obfuscation are no longer used. Webcomic now attempts to create index files to hide directory contents instead.
+= 4 =
+
+Existing Webcomic users should read this before upgrading: [webcomic.nu/upgrade](//webcomic.nu/upgrade)
+
+== Special Thanks ==
+
+To BigBagel, Miluette, LordRembo, Vaslittlecrow, Fesworks, Naomiyaki, MatthewEbel, and Kuipou for prerelease testing and feedback, and to the thousands of users that share their amazing work with Webcomic.
View
282 webcomic-includes/admin-walker.php
@@ -1,282 +0,0 @@
-<?php
-////
-// Walkers
-//
-// These classes extend WordPress' Walker class
-// and are intended for use internaly by Webcomic
-// on administrative pages.
-////
-
-/**
- * Returns the file list for a given collection.
- *
- * @package webcomic
- * @since 3
- */
-class webcomic_Walker_AdminFileList extends Walker {
- var $tree_type = 'webcomic_post';
- var $db_fields = array( 'parent' => 'post_parent', 'id' => 'ID' );
-
- public function start_el( &$output, $obj, $depth, $args ) {
- global $current_user, $webcomic;
- static $i = 0;
-
- $webcomic->domain();
-
- $post = get_post( $obj->ID );
- $files = $webcomic->retrieve( $post->ID, 'post', $args[ 'src' ], true );
- $alt = ( !( $i % 2 ) ) ? ' class="alt"' : '';
- $thide = ( in_array( 'thumbnails', $args[ 'hidden' ] ) ) ? ' style="display:none"' : '';
- $phide = ( in_array( 'post', $args[ 'hidden' ] ) ) ? ' style="display:none"' : '';
- $shide = ( in_array( 'storylines', $args[ 'hidden' ] ) ) ? ' style="display:none"' : '';
- $chide = ( in_array( 'characters', $args[ 'hidden' ] ) ) ? ' style="display:none"' : '';
- $mhide = ( in_array( 'comments', $args[ 'hidden' ] ) ) ? ' style="display:none"' : '';
- $dhide = ( in_array( 'date', $args[ 'hidden' ] ) ) ? ' style="display:none"' : '';
- $flist = $img = '';
-
- if ( !empty( $files ) ) {
- $post_meta = current( get_post_meta( $post->ID, 'webcomic' ) );
- $wc = current( wp_get_object_terms( $post->ID, 'webcomic_collection' ) );
-
- foreach ( $files[ 'full' ] as $k => $v ) {
- $faction = '';
-
- if ( !empty( $files[ 'small' ][ $k ] ) )
- $file = $files[ 'small' ][ $k ];
- elseif ( !empty( $files[ 'medium' ][ $k ] ) )
- $file = $files[ 'medium' ][ $k ];
- elseif ( !empty( $files[ 'large' ][ $k ] ) )
- $file = $files[ 'large' ][ $k ];
- else
- $file = $v;
-
- $reg = ( in_array( $files[ 'full' ][ $k ][ 'mime' ], array( 'image/jpeg', 'image/gif', 'image/png' ) ) ) ? '| <a href="' . wp_nonce_url( $args[ 'view' ] . '&amp;action=regen_webcomic_file&amp;webcomic_key=' . $k . '&amp;post=' . $post->ID, 'regen_webcomic_file' ) . '">' . __( 'Regenerate Thumbnails', 'webcomic' ) . '</a> | ' : '';
- $bind = ( empty( $post_meta[ 'files' ] ) ) ? '<a href="' . wp_nonce_url( $args[ 'view' ] . '&amp;action=bind_webcomic_file&amp;post=' . $post->ID, 'bind_webcomic_file' ) . '">' . __( 'Bind', 'webcomic' ) . '</a> | ' : '<a href="' . wp_nonce_url( $args[ 'view' ] . '&amp;action=unbind_webcomic_file&amp;webcomic_key=' . $k . '&amp;post=' . $post->ID, 'bind_webcomic_file' ) . '">' . __( 'Unbind', 'webcomic' ) . '</a> | ';
- $faction = ( current_user_can( 'edit_others_posts' ) || $current_user->ID == $post->post_author ) ? '<a href="' . admin_url( 'admin.php?page=webcomic_tools&subpage=edit_files&type=post&src=' . $wc->slug . '&id=' . $post->ID . '&key=' . $k ) . '">' . __( 'Edit', 'webcomic' ) . '</a>' . $reg . $bind . '<span class="delete"><a href="' . wp_nonce_url( $args[ 'view' ] . '&amp;action=delete_webcomic_file&amp;webcomic_key=' . $k . '&amp;post=' . $post->ID, 'delete_webcomic_file' ) . '" onclick="if(confirm(\'' . esc_js( sprintf( __( "You are about to delete '%s'\n 'Cancel' to stop, 'OK' to delete.", "webcomic" ), $files[ 'full' ][ $k ][ 'basename' ] ) ) . '\')){return true;}return false;">' . __( 'Delete', 'webcomic' ) . '</a> | </span><span class="view"><a href="' . $files[ 'full' ][ $k ][ 'url' ] . '" target="_blank">' . __( 'View', 'webcomic' ) . '</a></span>' : '<span class="view"><a href="' . $files[ 'full' ][ $k ][ 'url' ] . '" target="_blank">' . __( 'View', 'webcomic' ) . '</a></span>';
- $flist .= '<a href="' . admin_url( 'admin.php?page=webcomic_tools&subpage=edit_files&type=post&src=' . $wc->slug . '&id=' . $post->ID . '&key=' . $k ) . '" title="' . __( 'Edit this file', 'webcomic' ) . '" class="row-title">' . $files[ 'full' ][ $k ][ 'filename' ] . '</a><br>' . $files[ 'full' ][ $k ][ 'mime' ] . '<p class="row-actions">' . $faction . '</p>';
- $img .= ( 'application/x-shockwave-flash' == $file[ 'mime' ] ) ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="webcomic-file-' . hash( 'md5', $file[ 'url' ] ) . '" height="' . $webcomic->option( 'small_h' ) . '" width="' . $webcomic->option( 'small_w' ) . '"><param name="movie" value="' . $file[ 'url' ] . '"><!--[if !IE]>--><object type="application/x-shockwave-flash" data="' . $file[ 'url' ] . '" height="' . $webcomic->option( 'small_h' ) . '" width="' . $webcomic->option( 'small_w' ) . '"><!--<![endif]--><p>' . $file[ 'full' ][ $k ][ 'filename' ] . '</p><!--[if !IE]>--></object><!--<![endif]--></object><script type="text/javascript">swfobject.registerObject("webcomic-file-' . hash( 'md5', $file[ 'url' ] ) . '","9");</script><br>' : '<img src="' . $file[ 'url' ] . '" alt="' . $files[ 'full' ][ $k ][ 'basename' ] . '" ' . $file[ 3 ] . '><br>';
- }
- }
-
- $title = ( 'trash' != $post->post_status && ( current_user_can( 'edit_others_posts' ) || $current_user->ID == $post->post_author ) ) ? '<a href="post.php?action=edit&amp;post_type=webcomic_post&amp;post=' . $post->ID . '" title="' . __( 'Edit this post', 'webcomic' ) . '" class="row-title">' . $post->post_title . '</a>' : '<span class="row-title">' . $post->post_title . '</span>';
- $author = get_userdata( $post->post_author );
- $state = $cterms = $sterms = array();
- $cbox = ( current_user_can( 'edit_others_posts' ) || $current_user->ID == $post->post_author ) ? '<input type="checkbox" name="bulk[]" value="' . $post->ID . '">' : '';
-
- if ( 'trash' == $post->post_status )
- $paction = ( current_user_can( 'delete_others_posts' ) || $current_user->ID == $post->post_author ) ? '<span class="untrash"><a href="' . wp_nonce_url( $args[ 'view' ] . '&amp;action=undelete_webcomic_post&amp;post=' . $post->ID, 'undelete_webcomic_post' ) . '">' . __( 'Restore', 'webcomic' ) . '</a></span> | <span class="delete"><a href="' . wp_nonce_url( $args[ 'view' ] . '&amp;action=delete_webcomic_post&amp;post=' . $post->ID, 'delete_webcomic_post' ) . '">' . __( 'Delete Permanently', 'webcomic' ) . '</a></span>' : '';
- else
- $paction = ( current_user_can( 'edit_others_posts' ) || $current_user->ID == $post->post_author ) ? '<a href="post.php?action=edit&amp;post_type=webcomic_post&amp;post=' . $post->ID . '">' . __( 'Edit', 'webcomic' ) . '</a> | <span class="delete"><a href="' . wp_nonce_url( $args[ 'view' ] . '&amp;action=delete_webcomic_post&amp;post=' . $post->ID, 'delete_webcomic_post' ) . '">' . __( 'Trash', 'webcomic' ) . '</a></span> | <span class="view"><a href="' . get_permalink( $post->ID ) . '" target="_blank">' . __( 'View', 'webcomic' ) . '</a></span>' : '<span class="view"><a href="' . get_permalink( $post->ID ) . '">' . __( 'View', 'webcomic' ) . '</a></span>';
-
- if ( !empty( $post->post_password ) )
- $state[] = __( 'Password Protected', 'webcomic' );
- elseif ( 'private' == $post->post_status )
- $state[] = __( 'Private', 'webcomic' );
-
- if ( 'pending' == $post->post_status )
- $state[] = __( 'Pending', 'webcomic' );
-
- if ( 'draft' == $post->post_status )
- $state[] = __( 'Draft', 'webcomic' );
-
- if ( is_sticky( $post->ID ) )
- $state[] = __( 'Sticky', 'webcomic' );
-
- $state = ( !empty( $state ) ) ? ' - <strong>' . implode( ', ', $state ) . '</strong>' : '';
-
- $storylines = wp_get_object_terms( $post->ID, 'webcomic_storyline' );
-
- if ( !empty( $storylines ) && !is_wp_error( $storylines ) ) {
- foreach ( $storylines as $storyline )
- $sterms[] = '<a href="' . $args[ 'view' ] . '&amp;webcomic_storyline=' . $storyline->term_id . '">' . $storyline->name . '</a>';
- } else
- $sterms = array( __( 'No Storylines', 'webcomic' ) );
-
- $characters = wp_get_object_terms( $post->ID, 'webcomic_character' );
-
- if ( !empty( $characters ) && !is_wp_error( $characters ) ) {
- foreach ( $characters as $character )
- $cterms[] = '<a href="' . $args[ 'view' ] . '&amp;webcomic_character=' . $character->term_id . '">' . $character->name . '</a>';
- } else
- $cterms = array( __( 'No Characters', 'webcomic' ) );
-
- if ( '0000-00-00 00:00:00' == $post->post_date )
- $t_time = $h_time = __( 'Unpublished', 'webcomic' );
- else {
- $t_time = get_the_time( __( 'Y/m/d g:i:s A', 'webcomic' ), $post->ID );
- $m_time = $post->post_date;
- $time = get_post_time( 'G', true, $post );
- $d_time = time() - $time;
-
- if ( ( 'future' == $post->post_status ) )
- $h_time = ( $d_time <= 0 ) ? sprintf( __( '%s from now', 'webcomic' ), human_time_diff( $time ) ) : $t_time;
- elseif( $d_time > 0 && $d_time < 86400 )
- $h_time = sprintf( __( '%s ago', 'webcomic' ), human_time_diff( $time ) );
- else
- $h_time = mysql2date( __( 'Y/m/d', 'webcomic' ), $m_time);
-
- $missed = ( $h_time == $t_time ) ? true : false;
- }
-
- if ( 'publish' == $post->post_status )
- $status = __( 'Published', 'webcomic' );
- elseif ( 'future' == $post->post_status && $missed )
- $status = '<strong class="attention">' . __( 'Missed Schedule', 'webcomic' ) . '</strong>';
- elseif ( 'future' == $post->post_status )
- $status = __( 'Scheduled', 'webcomic' );
- else
- $status = __( 'Last Modified', 'webcomic' );
-
- $output .= '<tr' . $alt . '>
- <th scope="row" class="check-column">' . $cbox . '</th>
- <td class="thumbnails column-thumbnails"' . $thide . '>' . $img . '</td>
- <td class="post column-post"' . $phide . '>' . $title . $state . '<br>' . $author->display_name . '<p class="row-actions">' . $paction . '</p></td>
- <td class="file column-file">' . $flist . '</td>
- <td class="storylines column-storylines"' . $shide . '>' . implode( ', ', $sterms ) . '</td>
- <td class="characters column-characters"' . $chide . '>' . implode( ', ', $cterms ) . '</td>
- <td class="comments column-comments"' . $mhide . '><a href="edit-comments.php?p=' . $post->ID . '" title="' . sprintf( __( '%s pending', 'webcomic' ), number_format( get_pending_comments_num( $post->ID ) ) ) . '" class="post-com-count"><span class="comment-count">' . $post->comment_count . '</span></a></td>
- <td class="date column-date"' . $dhide . '><abbr title="' . $t_time . '">' . $h_time . '</abbr><br>' . $status . '</td>
- </tr>';
-
- $i++;
- }
-}
-
-/**
- * Returns the term list for a given collection.
- *
- * @package webcomic
- * @since 3
- */
-class webcomic_Walker_AdminTermList extends Walker {
- var $tree_type = 'webcomic_term';
- var $db_fields = array( 'parent' => 'parent', 'id' => 'term_id' );
-
- public function start_el( &$output, $term, $depth, $args ) {
- global $webcomic;
-
- static $i = 0;
-
- $webcomic->domain();
-
- $alt = ( !( $i % 2 ) ) ? ' class="alt"' : '';
- $chide = ( in_array( 'cover', $args[ 'hidden' ] ) ) ? ' style="display:none"' : '';
- $shide = ( in_array( 'slug', $args[ 'hidden' ] ) ) ? ' style="display:none"' : '';
- $hhide = ( in_array( 'characters', $args[ 'hidden' ] ) ) ? ';display:none' : '';
- $thide = ( in_array( 'storylines', $args[ 'hidden' ] ) ) ? ';display:none' : '';
- $phide = ( in_array( 'posts', $args[ 'hidden' ] ) ) ? ' style="display:none"' : '';
- $img = $default = $delete = '';
-
- if ( $term->webcomic_default ) {
- $style = ' style="background:#fffeeb"';
- $label = ( 'webcomic_collection' == $args[ 'page' ] ) ? __( 'Remove as Default', 'webcomic' ) : __( 'Remove from Defaults', 'webcomic' );
- $switch = 'off';
- } else {
- $style = '';
- $label = ( 'webcomic_collection' == $args[ 'page' ] ) ? __( 'Set as Default', 'webcomic' ) : __( 'Add to Defaults', 'webcomic' );
- $switch = 'on';
- }
-
- if ( !empty( $term->webcomic_files ) ) {
- if ( $term->webcomic_files[ 'small' ] )
- $file = $term->webcomic_files[ 'small' ];
- elseif ( $term->webcomic_files[ 'medium' ] )
- $file = $term->webcomic_files[ 'medium' ];
- elseif ( $term->webcomic_files[ 'large' ] )
- $file = $term->webcomic_files[ 'large' ];
- else
- $file = $term->webcomic_files[ 'full' ];
-
- foreach ( $file as $f )
- $img .= ( isset( $file[ 'mime' ] ) && 'application/x-shockwave-flash' == $file[ 'mime' ] ) ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="webcomic-file-' . hash( 'md5', $f[ 'url' ] ) . '" height="' . $webcomic->option( 'small_h' ) . '" width="' . $webcomic->option( 'small_w' ) . '"><param name="movie" value="' . $f[ 'url' ] . '"><!--[if !IE]>--><object type="application/x-shockwave-flash" data="' . $f[ 'url' ] . '" height="' . $webcomic->option( 'small_h' ) . '" width="' . $webcomic->option( 'small_w' ) . '"><!--<![endif]--><p>' . $term->name . '</p><!--[if !IE]>--></object><!--<![endif]--></object><script type="text/javascript">swfobject.registerObject("webcomic-file-' . hash( 'md5', $f[ 'url' ] ) . '","9");</script><br>' : '<img src="' . $f[ 'url' ] . '" alt="' . $term->name . '" ' . $f[ 3 ] . '><br>';
- }
-
- $move = ( 'webcomic_storyline' == $args[ 'page' ] ) ? '<a href="' . wp_nonce_url( $args[ 'view' ] . '&amp;action=move_webcomic_term&amp;webcomic_term=' . $term->term_id . '&amp;direction=up', 'move_webcomic_term' ) . '"> &uarr; </a><a href="' . wp_nonce_url( $args[ 'view' ] . '&amp;action=move_webcomic_term&amp;webcomic_term=' . $term->term_id . '&amp;direction=dn', 'move_webcomic_term' ) . '"> &darr; </a> ' : '';
- $coll = ( 'webcomic_collection' != $args[ 'page' ] ) ? '&amp;webcomic_collection=' . $term->term_group : '';
- $char = ( 'webcomic_collection' == $args[ 'page' ] ) ? '<td class="characters column-characters" style="text-align:center' . $hhide . '"><a href="admin.php?page=webcomic_character&amp;' . $args[ 'page' ] . '=' . $term->term_id . '">' . get_terms( 'webcomic_character', 'hide_empty=0&fields=count&term_group=' . $term->term_id ) . '</a></td>' : '';
- $stor = ( 'webcomic_collection' == $args[ 'page' ] ) ? '<td class="storylines column-storylines" style="text-align:center' . $thide . '"><a href="admin.php?page=webcomic_storyline&amp;' . $args[ 'page' ] . '=' . $term->term_id . '">' . get_terms( 'webcomic_storyline', 'hide_empty=0&fields=count&term_group=' . $term->term_id ) . '</a></td>' : '';
-
- if ( !( 'webcomic_collection' == $args[ 'page' ] && $term->webcomic_default ) ) {
- $default = ' | <a href="' . wp_nonce_url( $args[ 'view' ] . '&amp;action=default_webcomic_term&amp;webcomic_term=' . $term->term_id . '&amp;switch=' . $switch, 'default_webcomic_term' ) . '">' . $label . '</a>';
- $delete = ' | <span class="delete"><a href="' . wp_nonce_url( $args[ 'view' ] . '&amp;action=delete_webcomic_term&amp;webcomic_term=' . $term->term_id, 'delete_webcomic_term' ) . '" onclick="if (confirm(\'' . esc_js( sprintf( __( "You are about to delete %s.\n 'Cancel' to stop, 'OK' to delete.", "webcomic" ), $term->name ) ) . '\')){return true;}return false;">' . __( 'Delete', 'webcomic' ) . '</a></span>';
- }
-
- $output .= '<tr' . $alt . $style . '>
- <th scope="row" class="check-column"><input type="checkbox" name="bulk[]" value="' . $term->term_id . '"></th>
- <td class="cover column-cover"' . $chide . '>' . $img . '</td>
- <td class="name column-name"><a href="' . $args[ 'view' ] . '&amp;subpage=edit_webcomic_term&amp;webcomic_term=' . $term->term_id . '" title="' . sprintf( __( 'Edit &#8220;%s&#8221;', 'webcomic' ), $term->name ) . '" class="row-title">' . str_repeat( '&mdash; ', $depth ) . $term->name . '</a><div class="row-actions">' . $move . '<a href="' . $args[ 'view' ] . '&amp;subpage=edit_webcomic_term&amp;webcomic_term=' . $term->term_id . '">' . __( 'Edit', 'webcomic' ) . '</a>' . $default . $delete . '</div></td>
- <td class="slug column-slug"' . $shide . '>' . $term->slug . '</td>' . $char . $stor . '
- <td class="posts column-posts"' . $phide . '><a href="admin.php?page=webcomic_files' . $coll . '&amp;' . $args[ 'page' ] . '=' . $term->term_id . '">' . $term->count . '</a></td>
- </tr>';
-
- $i++;
- }
-}
-
-/**
- * Returns the dropdown term list for a given collection.
- *
- * @package webcomic
- * @since 3
- */
-class webcomic_Walker_AdminTermDropdown extends Walker {
- var $tree_type = 'webcomic_collection';
- var $db_fields = array( 'parent' => 'parent', 'id' => 'term_id' );
-
- public function start_el( &$output, $term, $depth, $args ) {
- $output .= '<option value="' . $term->term_id . '"';
-
- if ( ( ( empty( $args[ 'selected' ] ) && !$args[ 'no_def' ] && $term->webcomic_default ) || in_array( $term->term_id, $args[ 'selected' ] ) ) )
- $output .= ' selected';
-
- $output .= '>' . str_repeat( '&nbsp;', $depth * 3 ) . $term->name . '</option>';
- }
-}
-
-/**
- * Returns the dropdown parent term list for a given collection.
- *
- * @package webcomic
- * @since 3
- */
-class webcomic_Walker_AdminTermParent extends Walker {
- var $tree_type = 'webcomic_term';
- var $db_fields = array( 'parent' => 'parent', 'id' => 'term_id' );
-
- public function start_el( &$output, $term, $depth, $args ) {
- $output .= '<option value="' . $term->term_id . '"';
-
- if ( $term->term_id == $args[ 'parent' ] )
- $output .= ' selected';
-
- $output .= '>' . str_repeat( '&nbsp;', $depth * 3 ) . $term->name . '</option>';
- }
-}
-
-/**
- * Returns term meta with normalized orders.
- *
- * @package webcomic
- * @since 3
- */
-class webcomic_Walker_AdminTermNormalize extends Walker {
- var $tree_type = 'webcomic_term';
- var $db_fields = array( 'parent' => 'parent', 'id' => 'term_id' );
-
- public function start_el( &$output, $term, $depth, $args ) {
- global $webcomic;
-
- static $x = array();
-
- if ( empty( $output ) )
- $output = $args[ 'term_meta' ];
-
- if ( empty( $x[ $term->parent . '_' . $depth ] ) )
- $x[ $term->parent . '_' . $depth ] = 1;
-
- $output[ 'storyline' ][ $term->term_id ][ 'order' ] = $x[ $term->parent . '_' . $depth ];
-
- $x[ $term->parent . '_' . $depth ]++;
- }
-}
-?>
View
4,424 webcomic-includes/admin.php
0 additions, 4,424 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN webcomic-includes/icon-small.png
Deleted file not rendered
View
BIN webcomic-includes/icon.png
Deleted file not rendered
View
70 webcomic-includes/metabox.js
@@ -1,70 +0,0 @@
-<script type="text/javascript">
-jQuery( document ).ready( function( $ ) {
- // Enable file uploads during post publish/save.
- $( 'form#post' ).attr( 'enctype', 'multipart/form-data' ).attr( 'encoding', 'multipart/form-data' );
-
- // Enable dynamic character/storyline loading.
- $( 'select#webcomic_collection' ).change( function() {
- $( 'input[name=webcomic_ajax]' ).val( 'collection' );
-
- var params = $( 'form' ).serialize();
-
- $( '#webcomic_terms' ).load( '<?php echo $_SERVER[ 'PHP_SELF' ]; ?>', params );
- $( 'input[name=webcomic_ajax]' ).val( 'orphans' );
-
- var params = $( 'form' ).serialize();
-
- $( '#webcomic_orphans' ).load( '<?php echo $_SERVER[ 'PHP_SELF' ]; ?>', params );
- $( 'input[name="webcomic_ajax"]' ).val(0);
- } ).change();
-
- // Enable multiple individual file uploads.
- $( '#add_webcomic_file' ).click( function() {
- $( '#webcomic_files' ).append( '<br><input type="file" name="webcomic_file[]">' );
- } );
-
- // Enable multiple transcript languages.
- $( '#webcomic_transcript_language' ).change( function() {
- var x=$(this).val();
- $('[id*="webcomic_lang_"]').hide();
- $('[id*="[webcomic_lang_'+x+']"]').show();
- } ).change();
-} );
-
-// Paypal price function.
-jQuery('select[name*=webcomic_paypal],input[name*=webcomic_paypal]').change(function(){
- var i,x,p,m,f,a,t,s,c,cost_d,cost_i,cost_o,ship_d,ship_i,ship_o,currency;
-
- i = jQuery( this ) . attr( 'name' ) . lastIndexOf( '_price' );
- cost_d = <?php echo $this->price( $this->option( 'paypal_price_d' ), array( $wc->webcomic_paypal[ 'price_d' ], $price_d ) ); ?>;
- cost_i = <?php echo $this->price( $this->option( 'paypal_price_i' ), array( $wc->webcomic_paypal[ 'price_i' ], $price_i ) ); ?>;
- cost_o = <?php echo $this->price( $this->option( 'paypal_price_o' ), array( $wc->webcomic_paypal[ 'price_o' ], $price_o ) ); ?>;
- ship_d = <?php echo $this->price( $this->option( 'paypal_shipping_d' ), array( $wc->webcomic_paypal[ 'shipping_d' ], $shipping_d ) ); ?>;
- ship_i = <?php echo $this->price( $this->option( 'paypal_shipping_i' ), array( $wc->webcomic_paypal[ 'shipping_i' ], $shipping_i ) ); ?>;
- ship_o = <?php echo $this->price( $this->option( 'paypal_shipping_o' ), array( $wc->webcomic_paypal[ 'shipping_o' ], $shipping_o ) ); ?>;
- currency = ' <?php echo $this->option( 'paypal_currency' ); ?>';
-
- if ( 0 < jQuery(this).attr('name').lastIndexOf('_d') ) {
- x = 'd';
- c = cost_d;
- s = ship_d;
- } else if ( 0 < jQuery( this ).attr( 'name' ).lastIndexOf( '_i' ) ) {
- x = 'i';
- c = cost_i;
- s = ship_i;
- } else {
- x = 'o';
- c = cost_o;
- s = ship_o;
- }
-
- a = ( i > 0 ) ? 'webcomic_paypal_price_' + x : 'webcomic_paypal_shipping_' + x;
- t = ( i > 0 ) ? 'webcomic_paypal_price_type_' + x : 'webcomic_paypal_shipping_type_' + x;
- p = ( i > 0 ) ? c : s;
- m = p * ( Math.abs( jQuery( 'input[name=' + a + ']' ).val() ) / 100 );
- f = ( 'sub' == jQuery( 'select[name=' + t + ']' ).val() ) ? p - m : p + m;
- f = ( f <= .01 ) ? '<span class="error">!</span>' : f.toFixed( 2 ) + currency;
-
- jQuery( '.' + a ).html( f );
-} );
-</script>
View
215 webcomic-includes/mgs-core.php
@@ -1,215 +0,0 @@
-<?php
-/**
- * WordPress plugin and theme framework.
- *
- * As an abstract class, the framework cannot
- * be directly instantiated; it must be extended
- * by another class that defines the actual
- * plugin or theme.
- */
-abstract class mgs_core {
- /** Variables used internally by the framework. */
- protected $name, $version, $file, $type;
- static $base, $cdir, $curl, $dir, $url, $update, $errors, $options;
-
- /**
- * Initialize the framework.
- *
- * The following class variables should be redefined
- * by any class that directly extends the framework:
- *
- * 'name' = The name of the plugin or theme. Should be slug-like,
- * with no spaces or special characters.
- * 'version' = The version of the plugin or theme. Defaults to the
- * framework version.
- * 'file' = Full path and filename of the main plugin or theme file.
- * Use of the PHP magic constant __FILE__ is encouraged.
- * 'type' = One of 'plugin' or 'theme'. Defaults to 'plugin'.
- *
- * These class variables are static and cannot be redefined:
- *
- * 'base' = The filename (for plugins) or directory name (for themes).
- * 'cdir' = Absolute path to the WordPress content directory.
- * 'curl' = URL to the WordPress content directory.
- * 'dir' = Absolute path to the plugin or theme directory.
- * 'url' = URL to the plugin or theme directory.
- * 'options' = Plugin or theme options. Use the 'option' method to interact with this variable (see below).
- *
- * The 'errors' and 'update' variables are intended for storing
- * notifications presented to users in the adminsitrative panel.
- * It's up to the individual plugin or theme to decide how to
- * best utilize these varaibles.
- *
- * Hooks and shortcodes can be added automatically be prefixing
- * function names with either "hook_" and the name of the hook
- * or "short_" and the name to be used for the new shortcode.
- * You can specifiy hook priority by ending function names
- * with a number, like:
- *
- * function hook_the_content_42() { ... }
- *
- * @package mgs_core
- * @version 1
- */
- final public function __construct() {
- if ( !$this->name ) $this->name = 'mgs_core';
- if ( !$this->version ) $this->version = 1;
- if ( !$this->file ) $this->file = __FILE__;
- if ( !$this->type ) $this->type = 'plugin';
-
- //$upload = wp_upload_dir();
-
- $this->base = ( 'plugin' == $this->type ) ? plugin_basename( $this->file ) : dirname( $this->file );
- //$this->cdir = $upload[ 'basedir' ];
- //$this->curl = $upload[ 'baseurl' ];
- $this->cdir = is_multisite() ? BLOGUPLOADDIR : WP_CONTENT_DIR;
- $this->curl = is_multisite() ? trailingslashit( get_bloginfo( 'url' ) ) . 'files' : WP_CONTENT_URL;
- $this->update = array();
- $this->errors = array();
- $this->options = $this->option();
-
- if ( 'plugin' == $this->type ) {
- $this->dir = ( realpath( dirname( $this->file ) ) !== realpath( WPMU_PLUGIN_DIR ) ) ? trailingslashit( WP_PLUGIN_DIR ) . dirname( $this->base ) : WPMU_PLUGIN_DIR;
- $this->url = ( realpath( dirname( $this->file ) ) !== realpath( WPMU_PLUGIN_DIR ) ) ? trailingslashit( WP_PLUGIN_URL ) . str_replace( '/' . basename( $this->file ), '', $this->base ) : trailingslashit( WPMU_PLUGIN_URL ) . str_replace( '/' . basename( $this->file ), '', $this->base );
- } else {
- $this->dir = TEMPLATEPATH;
- $this->url = get_template_directory_uri();
- }
-
- $class = new ReflectionClass( get_class( $this ) );
- $methods = $class->getMethods();
-
- foreach ( $methods as $method ) {
- if ( 0 === strpos( $method->name, 'hook_' ) ) {
- $hook = substr( $method->name, 5 );
- $prio = array_pop( explode( '_', $hook ) );
-
- if ( is_numeric( $prio ) )
- $hook = substr( $hook, 0, - ( strlen( '_' . $prio ) ) );
- else
- $prio = 10;
-
- add_filter( $hook, array( &$this, $method->name ), $prio, $method->getNumberOfParameters() );
- } elseif ( 0 === strpos( $method->name, 'short_' ) ) {
- $short = substr( $method->name, 6 );
- add_shortcode( $short, array( &$this, $method->name ) );
- }
- } unset( $class, $methods, $hook, $prio );
-
- if ( empty( $this->options ) )
- add_filter( 'init', array( &$this, 'install' ) );
- elseif ( $this->options[ 'version' ] < $this->version )
- add_filter( 'init', array( &$this, 'upgrade' ) );
- elseif ( $this->options[ 'version' ] > $this->version )
- add_filter( 'init', array( &$this, 'downgrade' ) );
- elseif ( !empty( $this->options[ 'uninstall' ] ) && 'plugin' == $this->type )
- register_deactivation_hook( $this->file, array( &$this, 'deactivate' ) );
- }
-
- /**
- * Deactivation function for plugins.
- *
- * Deletes plugin options when the plugin is deactivated.
- * The uninstall function (which classes using the
- * framework must define) should remove any additional
- * information, as well as add the 'uninstall' option
- * which triggers the deactivation hook.
- *
- * @package mgs_core
- * @since 1
- */
- final public function deactivate( $t = false ) {
- $this->option( null );
- }
-
- /**
- * Load text domain for translations.
- *
- * Plugins need to call this function anytime
- * strings can be translated in a function. Themes
- * should usually call this function once in a
- * hook_after_setup_theme() function.
- *
- * @package mgs_core
- * @since 1
- */
- final public function domain() {
- if ( 'plugin' == $this->type && realpath( dirname( $this->file ) ) !== realpath( WPMU_PLUGIN_DIR ) )
- load_muplugin_textdomain( $this->name, $this->dir . '/' . $this->name . '-includes/languages' );
- elseif ( 'plugin' == $this->type )
- load_plugin_textdomain( $this->name, $this->dir . '/' . $this->name . '-includes/languages', dirname( $this->base ) );
- elseif ( 'theme' == $this->type ) {
- load_theme_textdomain( $this->name, $this->dir . '/' . 'languages' );
-
- $l = get_locale();
- $lf = $this->dir . "/languages/$l.php";
-
- if ( is_readable( $lf ) ) require_once( $lf );
- } else
- return false;
- }
-
- /**
- * Add, retrieve, update, or delete an option or options.
- *
- * Options are stored in a single database entry as an array
- * and loaded into the framework $options variable during
- * initialization.
- *
- * @package mgs_core
- * @since 1
- *
- * @param str|arr|null The name of the option to return, an array of new options to save, or null (deletes all existing options).
- * @param str|null The new value for the option specified in $o, or null to delete the option.
- * @return Return all options, the specified options, true when updating options, or false on error.
- */
- final public function option( $o = false, $v = false ) {
- if ( false === $o ) {
- return get_option( $this->name . '_options', array() );
- } elseif ( null === $o ) {
- $this->options = $o;
- return delete_option( $this->name . '_options' );
- } elseif ( is_array( $o ) ) {
- $this->options = $o;
- return update_option( $this->name . '_options', $o );
- } elseif ( array_key_exists( $o, $this->options ) ) {
- if ( false === $v )
- return $this->options[ $o ];
- elseif ( null === $v )
- unset ( $this->options[ $o ] );
- else
- $this->options[ $o ] = $v;
-
- return update_option( $this->name . '_options', $this->options );
- }
-
- return false;
- }
-
- /**
- * Abstract functions that must be defined.
- *
- * These abstract functions must be defined in any class
- * extending the framework, even if they're unused:
- *
- * Install is a run-once function that should, at the very least,
- * set plugin or theme options with a 'version' key.
- *
- * Upgrade is run if the class $version is greater than the version
- * stored in the plugin or theme options.
- *
- * Downgrade is run if the class $version is less than the version
- * stored in the plugin or theme options.
- *
- * Uninstall must be called by another class method and should, at the
- * very least, set the 'uninstall' option to true.
- *
- * @package mgs_core
- * @since 1
- */
- abstract public function install();
- abstract public function upgrade();
- abstract public function downgrade();
- abstract public function uninstall();
-}
-?>
View
32 webcomic-includes/scripts.js
@@ -1,32 +0,0 @@
-/**
- * This document contains javascript necessary to enhance certain Webcomic functions.
- *
- * @package webcomic
- * @since 3
- */
-jQuery( document ) . ready( function( $ ) {
- /** Load transcripts for improvement */
- $( 'select[name=webcomic_transcript_language]' ) . change(
- function() {
- $( this ) . parents( 'form' ) . find( 'input[name=webcomic_ajax]' ) . val( 1 );
- var params = $( this ) . parents( 'form' ) . serialize();
- $( this ) . parents( 'form' ) . find( 'textarea[name=webcomic_transcript_text]' ) . load( window.location.pathname, params );
- $( this ) . parents( 'form' ) . find( 'input[name=webcomic_ajax]' ) . val( 0 );
- }
- ) . change();
-
- /** Enable keyboard shortcuts */
- $( '.webcomic-kbd-shortcut' ) . click( function() { if ( $( this ) . attr( 'href' ) ) window . location = $( this ) . attr( 'href' ); } );
- $.hotkeys.add( 'right', { disableInInput: true }, function() { $( '.next-webcomic-link.webcomic-kbd-shortcut' ) . click(); } );
- $.hotkeys.add( 'left', { disableInInput: true }, function() { $( '.previous-webcomic-link.webcomic-kbd-shortcut' ) . click(); } );
- $.hotkeys.add( 'shift+left', { disableInInput: true }, function() { $( '.first-webcomic-link.webcomic-kbd-shortcut' ) . click(); } );
- $.hotkeys.add( 'shift+right', { disableInInput: true }, function() { $( '.last-webcomic-link.webcomic-kbd-shortcut' ) . click(); } );
- $.hotkeys.add( 'shift+up', { disableInInput: true }, function() { $( '.purchase-webcomic-link.webcomic-kbd-shortcut' ) . click(); } );
- $.hotkeys.add( 'shift+down', { disableInInput: true }, function() { $( '.random-webcomic-link.webcomic-kbd-shortcut' ) . click(); } );
- $.hotkeys.add( 'ctrl+shift+up', { disableInInput: true }, function() { $( '.remove-webcomic-link.webcomic-kbd-shortcut' ) . click(); } );
- $.hotkeys.add( 'ctrl+shift+left', { disableInInput: true }, function() { $( '.return-webcomic-link.webcomic-kbd-shortcut' ) . click(); } );
- $.hotkeys.add( 'ctrl+shift+down', { disableInInput: true }, function() { $( '.bookmark-webcomic-link.webcomic-kbd-shortcut' ) . click(); } );
-
- /** Jump to the selected url */
- $( '.webcomic-posts,.related-webcomic-posts,.webcomic-post-terms,.webcomic-terms,.webcomic-archive' ) . change ( function() { if ( $( this ) . attr( 'value' ) != 0 ) window . location = $( this ) . attr( 'value' ); } );
-} );
View
50 webcomic-includes/tags-legacy.php
@@ -1,50 +0,0 @@
-<?php
-////
-// Legacy Template Tags
-//
-// These template tags are provided for compatibility with
-// themes designed for versions of Webcomic prior to 3.
-// This file can be safely deleted if you don't need these.
-////
-
-function comic_loop( $num = 1, $dep1 = false, $q = false ) { global $webcomic; $args = '&posts_per_page=' . $num . $q; return new WP_Query( 'post_type=webcomic_post' . $args ); }
-function ignore_comics() { return false; }
-function in_comic_category( $terms = false, $id = false ) { global $webcomic; return $webcomic->in_webcomic_term( 'webcomic_collection', $terms, $id ); }
-function in_comic_chapter( $terms = false, $id = false ) { global $webcomic; return $webcomic->in_webcomic_term( 'webcomic_storyline', $terms, $id ); }
-function get_the_comic( $id = false, $dep1 = false, $dep2 = false ) { global $webcomic; return $webcomic->get_webcomic_post( $id ); }
-function get_the_chapter( $id ) { return get_term( $id, 'webcomic_storyline' ); }
-function get_comic_object( $id = false, $size = false, $dep1 = false ) { global $webcomic; $size = ( 'thumb' == $size ) ? 'small' : $size; return $webcomic->get_webcomic_object( $size, 'post', false, $id ); }
-function get_comic_buffer( $term = false ) { global $webcomic; return $webcomic->get_webcomic_buffer( $term ); }
-function the_comic( $size = 'full', $link = false, $terms = false ) { global $webcomic; $size = ( 'thumb' == $size ) ? 'small' : $size; $taxonomy = ( $terms ) ? 'webcomic_storyline' : false; echo $webcomic->get_the_webcomic_object( $size, $link, $taxonomy, $terms, false, false ); }
-function the_comic_embed( $size = 'small', $format = 'shtml' ) { global $webcomic; echo $webcomic->get_the_webcomic_embed( $format, $size ); }
-function the_comic_series( $label = false ) { global $webcomic; if ( 'full' == $label || 'large' == $label || 'medium' == $label || 'small' == $label || 'thumb' == $label ) { $label = ( 'thumb' == $label ) ? 'small' : $label; $image = '&image=' . $label; } echo $webcomic->get_the_webcomic_post_terms( 'webcomic_collection', 'separator=, ' . $image ); }
-function transcript_template( $file = false ) { global $webcomic; $webcomic->webcomic_transcripts_template( $file ); }
-function transcript_id_fields( $captcha = false ) { global $webcomic; echo $webcomic->get_webcomic_transcribe_form_fields(); }
-function have_transcript( $status = false ) { global $webcomic; return $webcomic->have_webcomic_transcripts( $status ); }
-function comics_nav_link( $args = false ) { global $webcomic; $defaults = array( 'sep' => false, 'label' => '%label', 'fstlabel' => '%label', 'prelabel' => '%label', 'nxtlabel' => '%label', 'lstlabel' => '%label' ); $args = wp_parse_args( $args, $defaults ); if ( $args[ 'label' ] ) $args[ 'fstlabel' ] = $args[ 'prelabel' ] = $args[ 'nxtlabel' ] = $args[ 'lstlabel' ] = $args[ 'label' ]; extract( $args ); $sep = ( $sep ) ? $sep : ''; echo $webcomic->get_relative_webcomic_link( 'first', '%link', $fstlabel ) . $sep . $webcomic->get_relative_webcomic_link( 'previous', '%link', $prelabel ) . $sep . $webcomic->get_relative_webcomic_link( 'next', '%link', $nxtlabel ) . $sep . $webcomic->get_relative_webcomic_link( 'last', '%link', $lstlabel ); }
-function first_comic_link( $link = '%label', $dep1 = false, $dep2 = false ) { global $webcomic; if ( 'title' == $link || 'full' == $link || 'large' == $link || 'medium' == $link || 'small' == $link || 'thumb' == $link ) { $link = ( 'thumb' == $link ) ? 'small' : $link; $link = ( 'title' == $link ) ? '%'. $link : '%thumb-' . $link; } echo $webcomic->get_relative_webcomic_link( 'first', '%link', $link, false, false ); }
-function last_comic_link( $link = '%label', $dep1 = false, $dep2 = false ) { global $webcomic; if ( 'title' == $link || 'full' == $link || 'large' == $link || 'medium' == $link || 'small' == $link || 'thumb' == $link ) { $link = ( 'thumb' == $link ) ? 'small' : $link; $link = ( 'title' == $link ) ? '%'. $link : '%thumb-' . $link; } echo $webcomic->get_relative_webcomic_link( 'last', '%link', $link, false, false ); }
-function previous_comic_link( $link = '%label', $dep1 = false, $dep2 = false ) { global $webcomic; if ( 'title' == $link || 'full' == $link || 'large' == $link || 'medium' == $link || 'small' == $link || 'thumb' == $link ) { $link = ( 'thumb' == $link ) ? 'small' : $link; $link = ( 'title' == $link ) ? '%'. $link : '%thumb-' . $link; } echo $webcomic->get_relative_webcomic_link( 'previous', '%link', $link, false, false ); }
-function next_comic_link( $link = '%label', $dep1 = false, $dep2 = false ) { global $webcomic; if ( 'title' == $link || 'full' == $link || 'large' == $link || 'medium' == $link || 'small' == $link || 'thumb' == $link ) { $link = ( 'thumb' == $link ) ? 'small' : $link; $link = ( 'title' == $link ) ? '%'. $link : '%thumb-' . $link; } echo $webcomic->get_relative_webcomic_link( 'next', '%link', $link, false, false ); }
-function random_comic_link( $link = '%label', $dep1 = false, $dep2 = false ) { global $webcomic; if ( 'title' == $link || 'full' == $link || 'large' == $link || 'medium' == $link || 'small' == $link || 'thumb' == $link ) { $link = ( 'thumb' == $link ) ? 'small' : $link; $link = ( 'title' == $link ) ? '%'. $link : '%thumb-' . $link; } echo $webcomic->get_relative_webcomic_link( 'random', '%link', $link, false, false ); }
-function bookmark_comic( $sep = false, $bookmark = false, $return = false, $clear = false ) { global $webcomic; $sep = ( $sep ) ? '<span class="bookmark-comic-separator">' . $sep . '</span>' : ''; echo '<div>' . $webcomic->get_bookmark_webcomic_link( 'bookmark', '%link', $bookmark ) . $sep . $webcomic->get_bookmark_webcomic_link( 'return', '%link', $return ) . $sep . $webcomic->get_bookmark_webcomic_link( 'remove', '%link', $clear ) . '</div>'; }
-function chapters_nav_link( $args = false ) { global $webcomic; $defaults = array( 'sep' => false, 'label' => false, 'fstlabel' => false, 'prelabel' => false, 'nxtlabel' => false, 'lstlabel' => false ); $args = wp_parse_args( $args, $defaults ); if ( $args[ 'label' ] ) $args[ 'fstlabel' ] = $args[ 'prelabel' ] = $args[ 'nxtlabel' ] = $args[ 'lstlabel' ] = $args[ 'label' ]; extract( $args ); echo $webcomic->get_relative_webcomic_term_link( 'first', 'webcomic_storyline', '%link', $fstlabel, false, false ) . $sep . $webcomic->get_relative_webcomic_term_link( 'previous', 'webcomic_storyline', '%link', $prelabel, false, false ) . $sep . $webcomic->get_relative_webcomic_term_link( 'next', 'webcomic_storyline', '%link', $nxtlabel, false, false ) . $sep . $webcomic->get_relative_webcomic_term_link( 'last', 'webcomic_storyline', '%link', $lstlabel, false, false ); }
-function first_chapter_link( $link = '%label', $dep1 = false, $dep2 = false, $dep3 = false ) { global $webcomic; if ( 'title' == $link || 'full' == $link || 'large' == $link || 'medium' == $link || 'small' == $link || 'thumb' == $link ) { $link = ( 'thumb' == $link ) ? 'small' : $link; $link = ( 'title' == $link ) ? '%'. $link : '%thumb-' . $link; } echo $webcomic->get_relative_webcomic_term_link( 'first', 'webcomic_storyline', '%link', $link, false, false ); }
-function last_chapter_link( $link = '%label', $dep1 = false, $dep2 = false, $dep3 = false ) { global $webcomic; if ( 'title' == $link || 'full' == $link || 'large' == $link || 'medium' == $link || 'small' == $link || 'thumb' == $link ) { $link = ( 'thumb' == $link ) ? 'small' : $link; $link = ( 'title' == $link ) ? '%'. $link : '%thumb-' . $link; } echo $webcomic->get_relative_webcomic_term_link( 'last', 'webcomic_storyline', '%link', $link, false, false ); }
-function previous_chapter_link( $link = '%label', $dep1 = false, $dep2 = false, $dep3 = false ) { global $webcomic; if ( 'title' == $link || 'full' == $link || 'large' == $link || 'medium' == $link || 'small' == $link || 'thumb' == $link ) { $link = ( 'thumb' == $link ) ? 'small' : $link; $link = ( 'title' == $link ) ? '%'. $link : '%thumb-' . $link; } echo $webcomic->get_relative_webcomic_term_link( 'previous', 'webcomic_storyline', '%link', $link, false, false ); }
-function next_chapter_link( $link = '%label', $dep1 = false, $dep2 = false, $dep3 = false ) { global $webcomic; if ( 'title' == $link || 'full' == $link || 'large' == $link || 'medium' == $link || 'small' == $link || 'thumb' == $link ) { $link = ( 'thumb' == $link ) ? 'small' : $link; $link = ( 'title' == $link ) ? '%'. $link : '%thumb-' . $link; } echo $webcomic->get_relative_webcomic_term_link( 'next', 'webcomic_storyline', '%link', $link, false, false ); }
-function the_chapter_link( $label = false, $dep1 = false, $dep2 = false ) { global $webcomic; if ( 'full' == $label || 'large' == $label || 'medium' == $label || 'small' == $label || 'thumb' == $label ) { $label = ( 'thumb' == $label ) ? 'small' : $label; $image = '&image=' . $label; } echo $webcomic->get_the_webcomic_post_terms( 'webcomic_storyline', 'separator=, ' . $image ); }
-function single_chapter_title( $dep1 = false, $display = true ) { global $webcomic; if ( $display ) echo $webcomic->get_webcomic_term_info( 'name', 'webcomic_storyline' ); else return $webcomic->get_webcomic_term_info( 'name', 'webcomic_storyline' ); }
-function chapter_description( $term = false ) { global $webcomic; return $webcomic->get_webcomic_term_info( 'description', 'webcomic_storyline', $term ); }
-function recent_comics( $number = 5, $label = false, $limit = false ) { global $webcomic; if ( 'full' == $label || 'large' == $label || 'medium' == $label || 'small' == $label || 'thumb' == $label ) { $label = ( 'thumb' == $label ) ? 'small' : $label; $image = '&image=' . $label; } $limit = ( $limit ) ? '&term_group=' . current( explode( ',', $limit ) ) : ''; echo $webcomic->get_the_webcomic_archive( 'limit=' . $number . $image . $limit ); }
-function dropdown_comics( $args = false ) { global $webcomic; $defaults = array( 'format' => 'dropdown' ); $args = wp_parse_args( $args, $defaults ); $args[ 'order' ] = $args[ 'post_order' ]; $args[ 'group' ] = ( $args[ 'groupby' ] ) ? 'storyline' : false; echo $webcomic->get_the_webcomic_archive( $args ); }
-function comic_archive( $args = false ) { global $webcomic; $defaults = array( 'format' => 'grid', 'last_only' => true ); $args = wp_parse_args( $args, $defaults ); if ( 'chapter' == $args[ 'groupby' ] ) $args[ 'format' ] = 'olist'; $args[ 'order' ] = $args[ 'post_order' ]; $args[ 'group_order' ] = $args[ 'order' ]; $args[ 'show_description' ] = $args[ 'descriptions' ]; $args[ 'show_count' ] = $args[ 'pages' ]; echo $webcomic->get_the_webcomic_archive( $args ); }
-
-/* These functions have no direct equivalent in Webcomic 3 */
-function random_comic() { return false; }
-function get_post_comic_category() { return false; }
-function get_comic_category() { return false; }
-function get_the_collection( $args = false ) { return arrray(); }
-function the_comic_buffer( $i = false, $terms = false ) { return false; }
-function transcript_form_title( $new = false, $improve =false ) { return false; }
-?>
View
106 webcomic-includes/tags.php
@@ -1,106 +0,0 @@
-<?php
-////
-// Template Tags
-//
-// All template tags reference functions in the Webcomic
-// class or existing WordPress functions. Please see the
-// main webcomic.php file or the relevant WordPress core
-// file for inline documentation.
-////
-function get_webcomic_post( $id = false ) { global $webcomic; return $webcomic->get_webcomic_post( $id ); }
-function get_webcomic_object( $size = 'full', $type = false, $key = false, $id = false, $format = false ) { global $webcomic; return $webcomic->get_webcomic_object( $size, $type, $key, $id, $format ); }
-function the_webcomic_object( $size = 'full', $link = false, $taxonomy = false, $terms = false, $key = false, $id = false ) { global $webcomic; echo $webcomic->get_the_webcomic_object( $size, $link, $taxonomy, $terms, $key, $id ); }
-function get_webcomic_embed( $format = 'shtml', $size = 'small', $key = false, $id = false ) { global $webcomic; return $webcomic->get_webcomic_embed( $format, $size, $key, $id ); }
-function the_webcomic_embed( $format = 'shtml', $size = 'small', $key = false, $id = false ) { global $webcomic; echo $webcomic->get_the_webcomic_embed( $format, $size, $key, $id ); }
-function random_webcomic_url( $taxonomy = false, $terms = false, $id = false, $global = false ) { global $webcomic; echo $webcomic->get_relative_webcomic_url( 'random', $taxonomy, $terms, $id, $global ); }
-function first_webcomic_url( $taxonomy = false, $terms = false, $id = false, $global = false ) { global $webcomic; echo $webcomic->get_relative_webcomic_url( 'first', $taxonomy, $terms, $id, $global ); }
-function last_webcomic_url( $taxonomy = false, $terms = false, $id = false, $global = false ) { global $webcomic; echo $webcomic->get_relative_webcomic_url( 'last', $taxonomy, $terms, $id, $global ); }
-function previous_webcomic_url( $taxonomy = false, $terms = false, $id = false, $global = false ) { global $webcomic; echo $webcomic->get_relative_webcomic_url( 'previous', $taxonomy, $terms, $id, $global ); }
-function next_webcomic_url( $taxonomy = false, $terms = false, $id = false, $global = false ) { global $webcomic; echo $webcomic->get_relative_webcomic_url( 'next', $taxonomy, $terms, $id, $global ); }
-function purchase_webcomic_url( $id = false ) { global $webcomic; echo $webcomic->get_purchase_webcomic_url( $id ); }
-function bookmark_webcomic_url( $id = false ) { global $webcomic; echo $webcomic->get_bookmark_webcomic_url( 'bookmark', $id ); }
-function return_webcomic_url( $id = false ) { global $webcomic; echo $webcomic->get_bookmark_webcomic_url( 'return', $id ); }
-function remove_webcomic_url( $id = false ) { global $webcomic; echo $webcomic->get_bookmark_webcomic_url( 'remove', $id ); }
-function random_webcomic_link( $format = '%link', $link = '%label', $taxonomy = false, $terms = false, $id = false, $global = false ) { global $webcomic; echo $webcomic->get_relative_webcomic_link( 'random', $format, $link, $taxonomy, $terms, $id, $global ); }
-function first_webcomic_link( $format = '%link', $link = '%label', $taxonomy = false, $terms = false, $id = false, $global = false ) { global $webcomic; echo $webcomic->get_relative_webcomic_link( 'first', $format, $link, $taxonomy, $terms, $id, $global ); }
-function last_webcomic_link( $format = '%link', $link = '%label', $taxonomy = false, $terms = false, $id = false, $global = false ) { global $webcomic; echo $webcomic->get_relative_webcomic_link( 'last', $format, $link, $taxonomy, $terms, $id, $global ); }
-function previous_webcomic_link( $format = '%link', $link = '%label', $taxonomy = false, $terms = false, $id = false, $global = false ) { global $webcomic; echo $webcomic->get_relative_webcomic_link( 'previous', $format, $link, $taxonomy, $terms, $id, $global ); }
-function next_webcomic_link( $format = '%link', $link = '%label', $taxonomy = false, $terms = false, $id = false, $global = false ) { global $webcomic; echo $webcomic->get_relative_webcomic_link( 'next', $format, $link, $taxonomy, $terms, $id, $global ); }
-function purchase_webcomic_link( $format = '%link', $link = '%label', $id = false ) { global $webcomic; echo $webcomic->get_purchase_webcomic_link( $format, $link, $id ); }
-function boookmark_webcomic_link( $format = '%link', $link = '%label', $id = false ) { global $webcomic; echo $webcomic->get_bookmark_webcomic_link( 'bookmark', $format, $link, $id ); }
-function return_webcomic_link( $format = '%link', $link = '%label', $id = false ) { global $webcomic; echo $webcomic->get_bookmark_webcomic_link( 'return', $format, $link, $id ); }
-function remove_webcomic_link( $format = '%link', $link = '%label', $id = false ) { global $webcomic; echo $webcomic->get_bookmark_webcomic_link( 'remove', $format, $link, $id ); }
-function get_related_webcomics( $storylines = true, $characters = true, $id = false ) { global $webcomic; return $webcomic->get_related_webcomics( Sstorylines, $characters, $id ); }
-function get_the_related_webcomics( $args = false ) { global $webcomic; echo $webcomic->get_the_related_webcomics( $args ); }
-function get_buffer_webcomics( $terms = false, $taxonomy = false ) { global $webcomic; return $webcomic->get_buffer_webcomics( $terms, $taxonomy ); }
-function the_buffer_webcomics( $args = false ) { global $webcomic; echo $webcomic->get_the_buffer_webcomics( $args ); }
-function webcomic_verify( $type = false, $id = false ) { global $webcomic; return $webcomic->verify( $type, $id ); }
-function webcomic_verify_form( $label = false ) { global $webcomic; echo $webcomic->get_webcomic_verify_form( $label ); }
-function webcomic_verify_age( $id = false ) { global $webcomic; echo $webcomic->get_webcomic_verify_age( $id ); }
-function the_webcomic_donation_amount( $dec = false, $sep = false ) { global $webcomic; echo $webcomic->get_the_webcomic_donation_amount( $dec, $sep ); }
-function webcomic_donation_fields() { global $webcomic; echo $webcomic->get_webcomic_donation_fields(); }
-function webcomic_donation_form( $label = false ) { global $webcomic; echo $webcomic->get_webcomic_donation_form( $label ); }
-function webcomic_prints_open( $id = false, $original = false ) { global $webcomic; return $webcomic->webcomic_prints_open( $id, $original ); }
-function get_purchase_webcomic_cost( $cost = 'price', $type = 'domestic', $id = false ) { global $webcomic; return $webcomic->get_purchase_webcomic_cost( $cost, $type, $id ); }
-function the_purchase_webcomic_cost( $cost = 'price', $type = 'domestic', $dec = false, $sep = false, $id = false ) { global $webcomic; echo $webcomic->get_the_purchase_webcomic_cost( $cost, $type, $dec, $sep, $id ); }
-function get_purchase_webcomic_adjustment( $adjustment = 'collection', $type = 'domestic', $id = false ) { global $webcomic; return $webcomic->get_purchase_webcomic_adjustment( $adjustment, $type, $id ); }
-function the_purchase_webcomic_adjustment( $adjustment = 'collection', $type = 'domestic', $dec = false, $sep = false, $id = false ) { global $webcomic; echo $webcomic->get_the_purchase_webcomic_adjustment( $adjustment, $type, $dec, $sep, $id ); }
-function purchase_webcomic_fields( $type = 'domestic', $id = false ) { global $webcomic; echo $webcomic->get_purchase_webcomic_fields( $type, $id ); }
-function purchase_webcomic_form( $type = 'dmoestic', $label = false, $id = false ) { global $webcomic; echo $webcomic->get_purchase_webcomic_form( $type, $label, $id ); }
-function webcomic_transcripts_template( $file = false ) { global $webcomic; $webcomic->webcomic_transcripts_template( $file ); }
-function have_webcomic_transcripts( $status = false ) { global $webcomic; return $webcomic->have_webcomic_transcripts( $status ); }
-function list_webcomic_transcripts( $args = false ) { global $webcomic; $webcomic->list_webcomic_transcripts( $args ); }
-function webcomic_transcripts_open() { global $webcomic; return $webcomic->webcomic_transcripts_open(); }
-function webcomic_transcribe_form( $args = false ) { global $webcomic; $webcomic->webcomic_transcribe_form( $args ); }
-function webcomic_transcribe_form_fields() { global $webcomic; echo $webcomic->get_webcomic_transcribe_form_fields(); }
-function webcomic_transcribe_form_languages() { global $webcomic; echo $webcomic->get_webcomic_transcribe_form_languages(); }
-function webcomic_transcript_info( $i = false ) { global $webcomic; echo $webcomic->get_webcomic_transcript_info( $i ); }
-function webcomic_transcript_class( $class = false ) { global $webcomic; echo $webcomic->get_webcomic_transcript_class( $class ); }
-function in_webcomic_collection( $terms = false, $id = false ) { global $webcomic; return $webcomic->in_webcomic_term( 'webcomic_collection', $terms, $id ); }
-function the_webcomic_post_collections( $args = false ) { global $webcomic; echo $webcomic->get_the_webcomic_post_terms( 'webcomic_collection', $args ); }
-function get_webcomic_collection_info( $i = false, $term = false ) { global $webcomic; echo $webcomic->get_webcomic_term_info( $i, 'webcomic_collection', $term ); }
-function the_webcomic_collections( $args = false ) { global $webcomic; echo $webcomic->get_the_webcomic_terms( 'webcomic_collection', $args ); }
-function random_webcomic_collection_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'random', 'webcomic_collection', $term, $orderby, $hide_empty ); }
-function first_webcomic_collection_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'first', 'webcomic_collection', $term, $orderby, $hide_empty ); }
-function last_webcomic_collection_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'last', 'webcomic_collection', $term, $orderby, $hide_empty ); }
-function previous_webcomic_collection_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'previous', 'webcomic_collection', $term, $orderby, $hide_empty ); }
-function next_webcomic_collection_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'next', 'webcomic_collection', $term, $orderby, $hide_empty ); }
-function random_webcomic_collection_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'random', 'webcomic_collection', $format, $link, $term, $orderby, $hide_empty ); }
-function first_webcomic_collection_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'first', 'webcomic_collection', $format, $link, $term, $orderby, $hide_empty ); }
-function last_webcomic_collection_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'last', 'webcomic_collection', $format, $link, $term, $orderby, $hide_empty ); }
-function previous_webcomic_collection_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'previous', 'webcomic_collection', $format, $link, $term, $orderby, $hide_empty ); }
-function next_webcomic_collection_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'next', 'webcomic_collection', $format, $link, $term, $orderby, $hide_empty ); }
-function in_webcomic_storyline( $terms = false, $id = false ) { global $webcomic; return $webcomic->in_webcomic_term( 'webcomic_storyline', $terms, $id ); }
-function the_webcomic_post_storylines( $args = false ) { global $webcomic; echo $webcomic->get_the_webcomic_post_terms( 'webcomic_storyline', $args ); }
-function get_webcomic_storyline_info( $i = false, $term = false ) { global $webcomic; echo $webcomic->get_webcomic_term_info( $i, 'webcomic_storyline', $term ); }
-function the_webcomic_storylines( $args = false ) { global $webcomic; echo $webcomic->get_the_webcomic_terms( 'webcomic_storyline', $args ); }
-function random_webcomic_storyline_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'random', 'webcomic_storyline', $term, $orderby, $hide_empty ); }
-function first_webcomic_storyline_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'first', 'webcomic_storyline', $term, $orderby, $hide_empty ); }
-function last_webcomic_storyline_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'last', 'webcomic_storyline', $term, $orderby, $hide_empty ); }
-function previous_webcomic_storyline_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'previous', 'webcomic_storyline', $term, $orderby, $hide_empty ); }
-function next_webcomic_storyline_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'next', 'webcomic_storyline', $term, $orderby, $hide_empty ); }
-function random_webcomic_storyline_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'random', 'webcomic_storyline', $format, $link, $term, $orderby, $hide_empty ); }
-function first_webcomic_storyline_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'first', 'webcomic_storyline', $format, $link, $term, $orderby, $hide_empty ); }
-function last_webcomic_storyline_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'last', 'webcomic_storyline', $format, $link, $term, $orderby, $hide_empty ); }
-function previous_webcomic_storyline_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'previous', 'webcomic_storyline', $format, $link, $term, $orderby, $hide_empty ); }
-function next_webcomic_storyline_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'next', 'webcomic_storyline', $format, $link, $term, $orderby, $hide_empty ); }
-function in_webcomic_character( $terms = false, $id = false ) { global $webcomic; return $webcomic->in_webcomic_term( 'webcomic_character', $terms, $id ); }
-function the_webcomic_post_characters( $args = false ) { global $webcomic; echo $webcomic->get_the_webcomic_post_terms( 'webcomic_character', $args ); }
-function webcomic_character_info( $i = false, $term = false ) { global $webcomic; echo $webcomic->get_webcomic_term_info( $i, 'webcomic_character', $term ); }
-function the_webcomic_characters( $args = false ) { global $webcomic; echo $webcomic->get_the_webcomic_terms( 'webcomic_character', $args ); }
-function random_webcomic_character_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'random', 'webcomic_character', $term, $orderby, $hide_empty ); }
-function first_webcomic_character_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'first', 'webcomic_character', $term, $orderby, $hide_empty ); }
-function last_webcomic_character_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'last', 'webcomic_character', $term, $orderby, $hide_empty ); }
-function previous_webcomic_character_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'previous', 'webcomic_character', $term, $orderby, $hide_empty ); }
-function next_webcomic_character_url( $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_url( 'next', 'webcomic_character', $term, $orderby, $hide_empty ); }
-function random_webcomic_character_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'random', 'webcomic_character', $format, $link, $term, $orderby, $hide_empty ); }
-function first_webcomic_character_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'first', 'webcomic_character', $format, $link, $term, $orderby, $hide_empty ); }
-function last_webcomic_character_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'last', 'webcomic_character', $format, $link, $term, $orderby, $hide_empty ); }
-function previous_webcomic_character_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'previous', 'webcomic_character', $format, $link, $term, $orderby, $hide_empty ); }
-function next_webcomic_character_link( $format = '%link', $link = '%label', $term = false, $orderby = false, $hide_empty = true ) { global $webcomic; echo $webcomic->get_relative_webcomic_term_link( 'next', 'webcomic_character', $format, $link, $term, $orderby, $hide_empty ); }
-function webcomic_archive( $args = false ) { global $webcomic; echo $webcomic->get_the_webcomic_archive( $args ); }
-
-/* Deprecated */
-function get_webcomic_post_collections( $id = false ) { return get_the_terms( $id, 'webcomic_collection' ); }
-function get_webcomic_post_storylines( $id = false ) { return get_the_terms( $id, 'webcomic_storyline' ); }
-function get_webcomic_post_characters( $id = false ) { return get_the_terms( $id, 'webcomic_character' ); }
View
77 webcomic-includes/template-purchase-print.php
@@ -1,77 +0,0 @@
-<?php
-/**
- * The default "paypal purchase" template for Webcomic.
- *
- * This template is displayed if a user clicks a "buy print"
- * link for a webcomic. Themes should provide their own template,
- * but this generic template will be loaded if they don't. Template
- * based on the single.php template from TwentyTen.
- *
- * @package webcomic
- * @since 3
- */
-
-global $webcomic; $webcomic->domain();
-?>
-
-<?php the_post(); get_header(); ?>
-
-<div id="container">
- <div id="content">
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <h1 class="entry-title"><?php printf( 'Buy Print - %s', get_the_title() ); ?></h1>
- <div class="entry-meta">
- <span class="meta-prep meta-prep-author"><?php _e( 'Posted by ', 'webcomic' ); ?></span>
- <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'webcomic' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
- <span class="meta-sep"><?php _e( ' on ', 'webcomic' ); ?> </span>
- <a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
- <?php edit_post_link( __( 'Edit', 'webcomic' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t" ); ?>
- </div><!-- .entry-meta -->
- <div class="entry-content">
- <div class="wp-caption"><?php the_webcomic_object( 'medium', 'self' ); ?></div>
- <div class="nav-previous"><strong><?php _e( 'Domestic:', 'webcomic' ); ?></strong> <?php echo $webcomic->get_purchase_webcomic_cost( 'price', 'domestic' ); ?> <sup>+ <?php echo $webcomic->get_purchase_webcomic_cost( 'shipping', 'domestic' ); _e( ' shipping', 'webcomic' ); ?></sup><?php echo $webcomic->get_purchase_webcomic_form( 'domestic' ); ?></div>
- <div class="nav-next"><strong><?php _e( 'International:', 'webcomic' ); ?></strong> <?php echo $webcomic->get_purchase_webcomic_cost( 'price', 'international' ); ?> <sup>+ <?php echo $webcomic->get_purchase_webcomic_cost( 'shipping', 'international' ); _e( ' shipping', 'webcomic' ); ?></sup><?php echo $webcomic->get_purchase_webcomic_form( 'international' ); ?></div>
- <?php the_content(); ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'webcomic' ), 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
- <?php if ( get_the_author_meta( 'description' ) ) { ?>
- <div id="entry-author-info">
- <div id="author-avatar">
- <?php echo get_avatar( get_the_author_meta( 'user_email' ), 60 ); ?>
- </div><!-- #author-avatar -->
- <div id="author-description">
- <h2><?php _e( 'About ', 'webcomic' ); ?><?php the_author(); ?></h2>
- <?php the_author_meta( 'description' ); ?>
- <div id="author-link">
- <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'webcomic' ), get_the_author() ); ?>"><?php _e( 'View all posts by ', 'webcomic' ); ?><?php the_author(); ?> &rarr;</a>
- </div><!-- #author-link -->
- </div><!-- #author-description -->
- </div><!-- .entry-author-info -->
- <?php } ?>
- <div class="entry-utility">
- <?php
- $tag_list = get_the_tag_list('', ', ');
-
- if ( '' != $tag_list )
- $utility_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%5$s" title="Comments RSS to %4$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'webcomic' );
- else
- $utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%5$s" title="Comments RSS to %4$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'webcomic' );
-
- printf(
- $utility_text,
- get_the_category_list( ', ' ),
- $tag_list,
- get_permalink(),
- the_title_attribute( 'echo=0' ),
- get_post_comments_feed_link()
- );
-
- edit_post_link( __( 'Edit', 'webcomic' ), '<span class="edit-link">', '</span>' );
- ?>
- </div><!-- .entry-utility -->
- </div><!-- #post-<?php the_ID(); ?> -->
- <?php comments_template( '', true ); ?>
- </div><!-- #content -->
-</div><!-- #container -->
-
-<?php get_sidebar(); get_footer(); ?>
View
35 webcomic-includes/template-transcripts.php
@@ -1,35 +0,0 @@
-<?php
-/**
- * The default "transcript" template for Webcomic.
- *
- * This template displays any existing transcripts
- * and/or the submit transcript form for a webcomic.
- * Themes should provide their own template, but this
- * generic template will be loaded if they don't.
- * Template based on the comments.php template from TwentyTen.
- *
- * @package webcomic
- * @since 3
- *
- * new teags: webcomic_transcripts_template, webcomic_have_transcripts, webcomic_list_transcripts, webcomic_transcripts_open, webcomic_transcript_form
- */
-
-global $webcomic, $post; $webcomic->domain();
-?>
-
-<div id="webcomic-transcript">
-<?php if ( post_password_required() ) { ?>
- <div class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any transcripts.', 'webcomic' ); ?></div>
-</div><!-- #webcomic-transcript -->
- <?php return; } ?>
- <?php if ( $webcomic->have_webcomic_transcripts() ) { ?>
- <h3 id="transcript-title"><?php _e( 'Transcripts', 'webcomic' ); ?></h3>
- <?php $webcomic->list_webcomic_transcripts(); ?>
- <?php } else { //Displayed if there are no transcripts so far ?>
- <?php if ( $webcomic->webcomic_transcripts_open() ) { //If transcribing is enabled, but there are no transcripts ?>
-
- <?php } else { //If transcribing is disabled ?>
-
- <?php } ?>
- <?php } echo $webcomic->webcomic_transcribe_form(); ?>
-</div><!-- #webcomic-transcript -->
View
33 webcomic-includes/template-verify-age.php
@@ -1,33 +0,0 @@
-<?php
-/**
- * The default age verification template for Webcomic.
- *
- * This template is displayed if a user attempts to view
- * an age-restricted webcomic or webcomic-related page and
- * no age information can be found. Themes should provide
- * their own template, but this generic template will be
- * loaded if they don't. Template based on the 404.php
- * template from TwentyTen.
- *
- * @package webcomic
- * @since 3
- */
-
-global $webcomic; $webcomic->domain();
-?>
-
-<?php the_post(); get_header(); ?>
-
-<div id="container">
- <div id="content">
- <div id="post-0" class="post error404 not-found">
- <h1 class="entry-title"><?php _e( 'Restricted', 'webcomic' ); ?></h1>
- <div class="entry-content wp-caption">
- <p><?php _e( 'This webcomic is age restricted. Please enter your birth date to proceed:', 'webcomic' ); ?></p>
- <?php echo $webcomic->get_webcomic_verify_form(); ?>
- </div><!-- .entry-content -->
- </div><!-- #post-0 -->
- </div><!-- #content -->
-</div><!-- #container -->
-
-<?php get_footer(); ?>
View
31 webcomic-includes/template-verify-fail.php
@@ -1,31 +0,0 @@
-<?php
-/**
- * The default "failed verification" template for Webcomic.
- *
- * This template is displayed if a user has filled out their
- * birthday and is not old enough to view the current webcomic
- * or webcomic-related page. Themes should provide their own
- * template, but this generic template will be loaded if they
- * don't. Template based on the 404.php template from TwentyTen.
- *
- * @package webcomic
- * @since 3
- */
-
-global $webcomic; $webcomic->domain();
-?>
-
-<?php the_post(); get_header(); ?>
-
-<div id="container">
- <div id="content">
- <div id="post-0" class="post error404 not-found">
- <h1 class="entry-title"><?php _e( 'Restricted', 'webcomic' ); ?></h1>
- <div class="entry-content">
- <p><?php _e( 'Sorry, this content is age restricted.', 'webcomic' ); ?></p>
- </div><!-- .entry-content -->
- </div><!-- #post-0 -->
- </div><!-- #content -->
-</div><!-- #container -->
-
-<?php get_footer(); ?>
View
275 webcomic-includes/walker.php
@@ -1,275 +0,0 @@
-<?php
-////
-// Walkers
-//
-// These classes extend WordPress' Walker class
-// and are intended for use internaly by Webcomic
-// in template tag functions.
-////
-
-/**
- * Returns a formatted list of webcomic terms.
- *
- * @package webcomic
- * @since 3
- */
-class webcomic_Walker_TermList extends Walker {
- var $tree_type = 'webcomic_term';
- var $db_fields = array( 'parent' => 'parent', 'id' => 'term_id' );
-
- public function start_lvl( &$output, $depth, $args ) {
- if ( !$args[ 'separator' ] )
- $output .= '<' . $args[ 'x' ] . 'l class="children">';
- }
-
- public function end_lvl( &$output, $depth, $args ) {
- if ( !$args[ 'separator' ] )
- $output .= '</' . $args[ 'x' ] . 'l>';
- }
-
- public function end_el( &$output, $page, $depth, $args ) {
- if ( $args[ 'separator' ] )
- $output .= $args[ 'separator' ];
- else
- $output .= '</li>';
- }
-
- public function start_el( &$output, $term, $depth, $args ) {
- global $webcomic;
-
- $webcomic->domain();
-
- $term_name = esc_attr( $term->name );
-
- $link = '<a href="' . get_term_link( ( int ) $term->term_id, $args[ 'taxonomy' ] ) . '"';
- $link .= ( isset( $args[ 'use_count_for_title' ] ) && false !== $args[ 'use_count_for_title' ] ) ? ' title="' . sprintf( __( '%d webcomics', 'webcomic' ), $term->count ) . '">' : '>';
-
- if ( $args[ 'image' ] && !empty( $term->webcomic_files[ $args[ 'image' ] ] ) ) {
- foreach ( $term->webcomic_files[ $args[ 'image' ] ] as $v )
- $link .= ( $webcomic->option( 'secure_toggle' ) ) ? $v[ 'shtml' ] : $v[ 'html' ];
- } else
- $link .= '<span>' . $term_name . '</span>';
-
- $link .= '</a>';
-
- if ( ( !empty( $args[ 'feed_image' ] ) ) || ( !empty( $args[ 'feed' ] ) ) ) {
- $link .= ( empty( $args[ 'feed_image' ] ) ) ? ' (' : ' ';
- $link .= '<a href="' . $webcomic->get_term_feed_link( $term, $args[ 'taxonomy' ], $args[ 'feed_type' ] ) . '">';
-
- if ( empty( $args[ 'feed' ] ) )
- $alt = ' alt="' . sprintf( __( 'Feed for all %s webcomics', 'webcomic' ), $term_name ) . '"';
- else {
- $title = ' title="' . $args[ 'feed' ] . '"';
- $alt = ' alt="' . $args[ 'feed' ] . '"';
- $name = $args[ 'feed' ];
- $link .= $title;
- }
-
- $link .= ( empty( $args[ 'feed_image' ] ) ) ? $name . '</a>)' : '<img src="' . $feed_image . '" ' . $alt . $title . '></a>';
- }
-
- if ( $args[ 'show_count' ] )
- $link .= ' (' . intval( $term->count ) . ')';
-
- $_term = ( isset( $args[ 'selected' ] ) && $args[ 'selected' ] ) ? get_term( $args[ 'selected' ], $args[ 'taxonomy' ] ) : false;
-
- if ( !$args[ 'separator' ] ) {
- $class = 'webcomic-term-item ' . $args[ 'taxonomy' ] . '-item ' . $args[ 'taxonomy' ] . '-item-' . $term->term_id;
-
- if ( $args[ 'selected' ] && ( $term->term_id == $args[ 'selected' ] ) )
- $class .= 'current-webcomic-term current-' . $args[ 'taxonomy' ];
- elseif ( $_term && ( $term->term_id == $_term->parent ) )
- $class .= 'current-webcomic-term-parent current-' . $args[ 'taxonomy' ] . '-parent';
-
- $output .= '<li class="' . $class . '">' . $link;
- } else
- $output .= $link;
- }
-}
-
-/**
- * Returns a formatted select element of webcomic terms.
- *
- * @package webcomic
- * @since 3
- */
-class webcomic_Walker_TermDropdown extends Walker {
- var $tree_type = 'webcomic_term';
- var $db_fields = array ( 'parent' => 'parent', 'id' => 'term_id' );
-
- public function start_el( &$output, $term, $depth, $args ) {
- $term_name = esc_attr( $term->name );
-
- $output .= '<option class="level-' . $depth . ' webcomic-term-item webcomic-' . $args[ 'taxonomy' ] . '-item webcomic-' . $args[ 'taxonomy' ] . '-item-' . $term->term_id . '" value="' . get_term_link( ( int ) $term->term_id, $args[ 'taxonomy' ] ) . '"';
- $output .= ( $term->term_id == $args[ 'selected' ] ) ? ' selected>' . str_repeat( '&nbsp;', $depth * 3 ) . $term_name: '>' . str_repeat( '&nbsp;', $depth * 3 ) . $term_name;
- $output .= ( $args[ 'show_count' ] ) ? ' (' . $term->count . ')</option>' : '</option>';
- }
-}
-
-/**
- * Returns a formatted list of webcomic posts.
- *
- * @package webcomic
- * @since 3
- */
-class webcomic_Walker_ArchiveList extends Walker {
- var $tree_type = 'webcomic_term';
- var $db_fields = array ( 'parent' => 'parent', 'id' => 'term_id' );
-
- public function start_lvl( &$output, $depth, $args ) {
- if ( !$args[ 'separator' ] || ( 'collection' == $args[ 'group' ] || 'storyline' == $args[ 'group' ] || 'character' == $args[ 'group' ] ) )
- $output .= '<' . $args[ 'x' ] . 'l class="children">';
- }
-
- public function end_lvl( &$output, $depth, $args ) {
- if ( !$args[ 'separator' ] || ( 'collection' == $args[ 'group' ] || 'storyline' == $args[ 'group' ] || 'character' == $args[ 'group' ] ) )
- $output .= '</' . $args[ 'x' ] . 'l>';
- }
-
- public function end_el( &$output, $page, $depth, $args ) {
- if ( $args['separator'] && !( 'collection' == $args[ 'group' ] || 'storyline' == $args[ 'group' ] || 'character' == $args[ 'group' ] ) )
- $output .= $args[ 'separator' ];
- else
- $output .= '</li>';
- }
-
- public function start_el( &$output, $term, $depth, $args ) {
- global $webcomic;
-
- $webcomic->domain();
-
- if ( $args[ 'group_image' ] ) {
- $link = $img = false;
-
- $wc = ( 'collection' == $args[ 'group' ] ) ? get_term( $term->term_id, 'webcomic_collection' ) : get_term( $term->term_group, 'webcomic_collection' );
-
- if ( $img = $webcomic->retrieve( $term->term_id, $args[ 'group' ], $wc->slug, true ) )
- foreach ( $img[ $args[ 'group_image' ] ] as $v )
- $link .= ( $webcomic->option( 'secure_toggle' ) ) ? $v[ 'shtml' ] : $v[ 'html' ];
- } else
- $link = $term->name;
-
- $output .= '<li class="webcomic-archive-' . $args[ 'group' ] . ' webcomic-archive-' . $args[ 'group' ] . '-' . $term->slug . '"><a href="' . get_term_link( ( int ) $term->term_id, $term->taxonomy ) . '"><span>' . $link;
- $output .= ( $args[ 'show_count' ] ) ? ' (' . $term->count . ')</span></a>' : '</span></a>';
- $output .= ( $args[ 'show_description' ] ) ? $term->description : '';
- $children = ( $args[ 'last_only' ] ) ? get_term_children( $term->term_id, $term->taxonomy ) : array();
-
- if ( ( !empty( $args[ 'last_only' ] ) && empty( $children ) ) || empty( $args[ 'last_only' ] ) ) {
- if ( ( $posts = get_objects_in_term( $term->term_id, "webcomic_$args[group]" ) ) ) {
- usort( $posts, array( $webcomic, 'usort_term_objects_by_date' ) );
-
- if ( !empty( $args[ 'limit' ] ) )
- $posts = array_slice( $posts, 0, $args[ 'limit' ] );
-
- if ( $args[ 'separator' ] ) {
- $format = false;
- $output .= '<span class="webcomic-archive-items">';
- } else {
- $format = true;
- $output .= '<' . $args[ 'x' ] . 'l class="webcomic-archive-items">';
- }
-
- foreach ( $posts as $p ) {
- if ( 'publish' != get_post_status( $p ) )
- continue;
-
- $wc = ( isset( $wc ) ) ? $wc : current( wp_get_object_terms( $p, 'webcomic_collection' ) );
-
- if ( $args[ 'image' ] ) {
- $link = $img = false;
-
- if ( $img = $webcomic->retrieve( $p, 'post', $wc->slug, true ) )
- foreach ( $img[ $args[ 'image' ] ] as $v )
- $link .= ( $webcomic->option( 'secure_toggle' ) ) ? $v[ 'shtml' ] : $v[ 'html' ];
- } else
- $link = get_the_title( $p );
-
- $output .= ( $format ) ? '<li class="webcomic-archive-item webcomic-archive-item-' . $p . '"><a href="' . get_permalink( $p ) . '"><span>' . $link . '</span></a></li>' : '<a href="' . get_permalink( $p ) . '" class="webcomic-archive-item webcomic-archive-item-' . $p . '"><span>' . $link . '</span></a>' . $args[ 'separator' ];
- }
-
-
- $output .= ( $format ) ? '</' . $args[ 'x' ] . 'l>' : '</span>';
-
- if ( !$format )
- $output = substr( $output, 0, strrpos( $output, $args[ 'separator' ] ) );
- }
- }
- }
-}
-
-/**
- * Return a formatted dropdown of webcomics.
- *
- * @package webcomic
- * @since 3
- */
-class webcomic_Walker_ArchiveDropdown extends Walker {
- var $tree_type = 'webcomic_term';
- var $db_fields = array ( 'parent' => 'parent', 'id' => 'term_id' );
-
- public function start_el( &$output, $term, $depth, $args ) {
- global $webcomic;
-
- $term_name = esc_attr( $term->name );
-
- $output .= '<option class="level-' . $depth . ' webcomic-archive-term webcomic-archive-term-' . $term->slug . '" value="' . get_term_link( ( int ) $term->term_id, $term->taxonomy ) . '"';
- $output .= ( isset( $args[ 'selected' ] ) && $term->term_id == $args[ 'selected' ] ) ? ' selected>' . str_repeat( '&nbsp;', $depth * 3 ) . $term_name: '>' . str_repeat( '&nbsp;', $depth * 3 ) . $term_name;
- $output .= ( $args[ 'show_count' ] ) ? ' (' . $term->count . ')</option>' : '</option>';
- $children = ( $args[ 'last_only' ] ) ? get_term_children( $term->term_id, $term->taxonomy ) : array();
-
- if ( ( !empty( $args[ 'last_only' ] ) && empty( $children ) ) || empty( $args[ 'last_only' ] ) ) {
- if ( $posts = get_objects_in_term( $term->term_id, $term->taxonomy ) ) {
- usort( $posts, array( $webcomic, 'usort_term_objects_by_date' ) );
-
- if ( 'DESC' == $args[ 'order' ] )
- $posts = array_reverse( $posts );
-
- foreach ( $posts as $p ) {
- if ( 'publish' != get_post_status( $p ) )
- continue;
-
- $output .= '<option class="level-' . $depth . ' webcomic-archive-item webcomic-archive-item-' . $p . '" value="' . get_permalink( $p ) . '">' . str_repeat( '&nbsp;', ( $depth + 1 ) * 3 ) . get_the_title( $p ) . '</option>';
- }
- }
- }
- }
-}
-
-/**
- * Displays one or more transcripts associated with a webcommic post.
- *
- * @package webcomic
- * @since 3
- */
-class webcomic_Walker_Transcripts extends Walker {
- var $tree_type = 'webcomic_transcripts';
- var $db_fields = array ( 'parent' => 'language', 'id' => 'language_code' );
-
- public function start_el( &$output, $transcript, $depth, $args ) {
- global $webcomic, $post, $webcomic_transcript;
-
- $webcomic_transcript = $transcript;
-
- if ( !empty( $args[ 'callback' ] ) ) {
- call_user_func( $args[ 'callback' ], $transcript, $args, $depth );
- return false;
- }
-
- extract( $args, EXTR_SKIP );
- ?>
- <article <?php echo $webcomic->get_webcomic_transcript_class(); ?> id="webcomic-transcript-<?php echo $webcomic->get_webcomic_transcript_info( 'id' ) ?>" lang="<?php echo $webcomic->get_webcomic_transcript_info( 'language_code' ); ?>">
- <?php echo $webcomic->get_webcomic_transcript_info( 'text' ) ?>
- <footer class="webcomic-transcript-meta">
- <?php
- printf( __( '%s transcript submitted by %s on <time pubdate>%s @ %s</time>', 'webcomic' ),
- $webcomic->get_webcomic_transcript_info( 'language' ),
- $webcomic->get_webcomic_transcript_info( 'author' ),
- $webcomic->get_webcomic_transcript_info( 'the_date' ),
- $webcomic->get_webcomic_transcript_info( 'the_time' ) );
- ?>
- </footer>
- </article>
-<?php
- }
-}
-?>
View
743 webcomic-includes/widgets.php
@@ -1,743 +0,0 @@
-<?php
-/**
- * Webcomic donation widget
- *
- * @package webcomic
- * @since 3
- */
-class webcomic_Widget_Donation extends WP_Widget {
- public function webcomic_Widget_Donation() {
- global $webcomic;
-
- $webcomic->domain();
-
- $o = array( 'description' => __( 'Allow users to support your webcomic through donations.', 'webcomic' ) );
- $this->WP_Widget( 'webcomic-donation' , __( 'Webcomic Donation', 'webcomic' ), $o );
- }
-
- public function widget( $args, $instance ) {
- global $webcomic;
-
- extract( $args );
-
- echo $before_widget;
-
- if ( !empty( $instance[ 'title' ] ) )
- echo $before_title . $instance[ 'title' ] . $after_title;
-
- echo $webcomic->get_webcomic_donation_form( $instance[ 'label' ] );
-
- if ( !empty( $instance[ 'text' ] ) ) {
- if ( !empty( $instance[ 'format' ] ) )
- echo wpautop( $instance[ 'text' ] );
- else
- echo $instance[ 'text' ];
- }
-
- echo $after_widget;
- }
-
- public function update( $new, $old ) {
- if ( !isset( $new[ 'submit' ] ) )
- return false;
-
- $instance = $old;
- $instance[ 'title' ] = strip_tags( stripslashes( $new[ 'title' ] ) );
- $instance[ 'label' ] = strip_tags( stripslashes( $new[ 'label' ] ) );
- $instance[ 'text' ] = stripslashes( $new[ 'text' ] );
- $instance[ 'format' ] = ( $new[ 'format' ] ) ? true : false;
-
- return $instance;
- }
-
- public function form( $instance ) {
- global $webcomic;
-
- $webcomic->domain();
-
- $instance = wp_parse_args( ( array ) $instance, array(
- 'title' => __( 'Donate', 'webcomic' ),
- 'text' => ''
- ) ); extract( $instance );
-
- $title = htmlspecialchars( $instance[ 'title' ], ENT_QUOTES );
- $label = htmlspecialchars( $instance[ 'label' ], ENT_QUOTES );
- $text = htmlspecialchars( $instance[ 'text' ], ENT_QUOTES );
- ?>
- <p><label><?php _e( 'Title:', 'webcomic' ); ?> <input type="text" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $title; ?>" class="widefat"></label></p>
- <p><label><?php _e( 'Label:', 'webcomic' ); ?> <input type="text" name="<?php echo $this->get_field_name( 'label' ); ?>" value="<?php echo $label; ?>" class="widefat"></label></p>
- <label><?php _e( 'Message:', 'webcomic' ); ?> <textarea name="<?php echo $this->get_field_name( 'text' ); ?>" rows="16" cols="20" class="widefat"><?php echo $text; ?></textarea></label>
- <p><label><input type="checkbox" name="<?php echo $this->get_field_name( 'format' ); ?>"<?php if ( $format ) echo ' checked'; ?>> <?php _e( 'Automatically add paragraphs', 'webcomic' ); ?></label></p>
- <input type="hidden" name="<?php echo $this->get_field_name( 'submit' ); ?>" value="1">
- <?php
- }
-}
-
-
-
-/**
- * Relative webcomic widget
- *
- * @package webcomic
- * @since 3
- */
-class webcomic_Widget_Relative extends WP_Widget {
- public function webcomic_Widget_Relative() {
- global $webcomic;
-
- $webcomic->domain();
-
- $o = array( 'description' => __( 'Link to the first, last, or a random webcomic.', 'webcomic' ) );
- $this->WP_Widget( 'relative-webcomic', __( 'Relative Webcomic', 'webcomic' ), $o );
- }
-
- public function widget( $args, $instance ) {
- global $webcomic;
-
- extract( $args );
-
- $before_widget = ( !empty( $instance[ 'title' ] ) ) ? $before_widget . $before_title . $instance[ 'title' ] . $after_title : $before_widget;
-
- echo $webcomic->get_relative_webcomic_link( $instance[ 'key' ], $before_widget . '%link' . $after_widget, $instance[ 'format' ], $instance[ 'taxonomy' ], $instance[ 'term' ], false, true );
- }
-
- public function update( $new, $old ) {
- if ( !isset( $new[ 'submit' ] ) )
- return false;
-
- $instance = $old;
- $instance[ 'title' ] = strip_tags( stripslashes( $new[ 'title' ] ) );
- $instance[ 'key' ] = $new[ 'key' ];
- $instance[ 'format' ] = $new[ 'format' ];
- $instance[ 'term' ] = $new[ 'term' ];
- $instance[ 'taxonomy' ] = ( $new[ 'term' ] ) ? 'webcomic_collection' : '';
-
- return $instance;
- }
-
- public function form( $instance ) {
- global $webcomic;
-
- $webcomic->domain();
-
- $instance = wp_parse_args( ( array ) $instance, array(
- 'title' => __( 'Random Webcomic', 'webcomic' ),
- 'key' => 'random',
- 'format' => '%label',
- 'term' => false,
- 'taxonomy' => false
- ) ); extract( $instance );
-
- $title = htmlspecialchars( $title, ENT_QUOTES );
- ?>
- <p><label><?php _e( 'Title:', 'webcomic' ); ?><input type="text" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $title; ?>" class="widefat"></label></p>
- <p><label><?php _e( 'Format:', 'webcomic' ); ?><input type="text" name="<?php echo $this->get_field_name( 'format' ); ?>" value="<?php echo $format; ?>" class="widefat"><small><?php _e( '%label, %title, %date, %thumb-{size}-#', 'webcomic' ); ?></small></label></p>
- <p>
- <label>
- <?php _e( 'Link to:', 'webcomic' ); ?>
- <select name="<?php echo $this->get_field_name( 'key' ); ?>">
- <option value="random"<?php if ( 'random' == $key ) echo ' selected'; ?>><?php _e( 'Random', 'webcomic' ); ?></option>
- <option value="first"<?php if ( 'first' == $key ) echo ' selected'; ?>><?php _e( 'First', 'webcomic' ); ?></option>
- <option value="last"<?php if ( 'last' == $key ) echo ' selected'; ?>><?php _e( 'Last', 'webcomic' ); ?></option>
- </select>