Permalink
Browse files

3.0.2 fix due to svn troubles

  • Loading branch information...
1 parent bfc4486 commit 6dfd86b28cf2423461824de33cd3990cb4df0137 @mgsisk committed Jun 30, 2010
Showing with 25 additions and 1 deletion.
  1. +23 −1 webcomic-includes/admin.php
  2. +2 −0 webcomic-includes/tags-legacy.php
@@ -99,7 +99,7 @@ function upgrade_legacy( $step = 0 ) {
rename( $file, substr_replace( $file, '-small.', strrpos( $file, '-thumb.' ), 7 ) );
if ( $posts = get_objects_in_term( $cat_id, 'category' ) ) {
- $wpdb->query( "UPDATE $wpdb->posts SET post_type = 'webcomic_post' WHERE ID IN (" . implode( ',', $posts ) . ")" );
+ $wpdb->query( "UPDATE $wpdb->posts SET post_type = 'webcomic_post' WHERE ID IN (" . implode( ',', $posts ) . ") AND post_type = 'post'" );
foreach ( $posts as $p ) {
if ( get_post_meta( $p, 'comic_transcript', true ) ) {
@@ -1373,6 +1373,7 @@ function hook_created_webcomic_collection( $term_id, $tt_id ) {
$term_meta[ 'collection' ][ $term_id ] = array(
'files' => array(),
'slug' => $term->slug,
+ 'theme' => false,
'restrict' => false,
'bookend' => array(
'first' => false,
@@ -1486,6 +1487,7 @@ function hook_edited_webcomic_collection( $term_id, $tt_id ) {
$f = ( 'sub' == $_REQUEST[ 'webcomic_paypal_shipping_type_o' ] ) ? intval( 0 - $_REQUEST[ 'webcomic_paypal_shipping_o' ] ) : intval( $_REQUEST[ 'webcomic_paypal_shipping_o' ] );
$term_meta[ 'collection' ][ $term_id ][ 'slug' ] = $term->slug;
+ $term_meta[ 'collection' ][ $term_id ][ 'theme' ] = ( empty( $_REQUEST[ 'webcomic_theme' ] ) ) ? false : $_REQUEST[ 'webcomic_theme' ];
$term_meta[ 'collection' ][ $term_id ][ 'restrict' ] = ( isset( $_REQUEST[ 'webcomic_restrict' ] ) ) ? true : false;
$term_meta[ 'collection' ][ $term_id ][ 'bookend' ] = array(
'first' => $_REQUEST[ 'webcomic_bookend_first' ],
@@ -2987,6 +2989,26 @@ function admin_terms() {
<label><input type="checkbox" name="webcomic_restrict" id="webcomic_restrict"<?php if ( $term->webcomic_restrict ) echo ' checked';?>> <?php printf( __( 'Users must be registered and logged-in to view webcomics in this %s', 'webcomic' ), strtolower( $taxonomy->labels->singular_name ) ); ?></label>
</td>
</tr>
+ <tr class="form-field">
+ <th scope="row" class="label"><label for="webcomic_theme"><?php _e( 'Theme', 'webcomic' ); ?></label></th>
+ <td>
+ <select name="webcomic_theme" id="webcomic_theme">
+ <option value="0"><?php _e( '&ndash; Current Theme &ndash;', 'webcomic' ); ?></option>
+ <?php
+ $default = get_option( 'stylesheet' );
+ $themes = get_themes();
+
+ foreach ( $themes as $t ) {
+ if ( $t[ 'Stylesheet' ] == $default )
+ continue;
+
+ echo '<option value="' . $t[ 'Stylesheet' ] . '"' . ( ( $t[ 'Stylesheet' ] == $term->webcomic_theme ) ? ' selected' : '' ) . '>' . $t[ 'Name' ] . '</option>';
+ }
+ ?>
+ </select><br>
+ <?php printf( __( 'The stylesheet from this theme will be used for any pages related to this %s.', 'webcomic' ), strtolower( $taxonomy->labels->singular_name ) ); ?>
+ </td>
+ </tr>
<tr class="form-field">
<th scope="row" class="label"><label for="webcomic_bookend_first"><b><?php _e( 'Bookends', 'webcomic' ); ?></b></label></th>
<td>
@@ -41,6 +41,8 @@ function dropdown_comics( $args = false ) { global $webcomic; $defaults = array(
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; }

0 comments on commit 6dfd86b

Please sign in to comment.