/** * {@internal Missing Short Description}} * * @since unknown * * @param unknown_type $category * @param unknown_type $name_override * @return unknown */ function link_cat_row( $category, $name_override = false ) { static $row_class = ''; if ( !$category = get_term( $category, 'link_category', OBJECT, 'display' ) ) return false; if ( is_wp_error( $category ) ) return $category; $default_cat_id = (int) get_option( 'default_link_category' ); $name = ( $name_override ? $name_override : $category->name ); $edit_link = "link-category.php?action=edit&cat_ID=$category->term_id"; if ( current_user_can( 'manage_categories' ) ) { $edit = "<a class='row-title' href='$edit_link' title='" . attribute_escape(sprintf(__('Edit "%s"'), $category->name)) . "'>$name</a><br />"; $actions = array(); $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>'; if ( $default_cat_id != $category->term_id ) $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("link-category.php?action=delete&cat_ID=$category->term_id", 'delete-link-category_' . $category->term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this category '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; $action_count = count($actions); $i = 0; $edit .= '<div class="row-actions">'; foreach ( $actions as $action => $link ) { ++$i; ( $i == $action_count ) ? $sep = '' : $sep = ' | '; $edit .= "<span class='$action'>$link$sep</span>"; } $edit .= '</div>'; } else { $edit = $name; } $row_class = 'alternate' == $row_class ? '' : 'alternate'; $qe_data = get_term_to_edit($category->term_id, 'link_category'); $category->count = number_format_i18n( $category->count ); $count = ( $category->count > 0 ) ? "<a href='link-manager.php?cat_id=$category->term_id'>$category->count</a>" : $category->count; $output = "<tr id='link-cat-$category->term_id' class='iedit $row_class'>"; $columns = get_column_headers('edit-link-categories'); $hidden = get_hidden_columns('edit-link-categories'); foreach ( $columns as $column_name => $column_display_name ) { $class = "class=\"$column_name column-$column_name\""; $style = ''; if ( in_array($column_name, $hidden) ) $style = ' style="display:none;"'; $attributes = "$class$style"; switch ($column_name) { case 'cb': $output .= "<th scope='row' class='check-column'>"; if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) { $output .= "<input type='checkbox' name='delete[]' value='$category->term_id' />"; } else { $output .= " "; } $output .= "</th>"; break; case 'name': $output .= "<td $attributes>$edit"; $output .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">'; $output .= '<div class="name">' . $qe_data->name . '</div>'; $output .= '<div class="slug">' . $qe_data->slug . '</div>'; $output .= '<div class="cat_parent">' . $qe_data->parent . '</div></div></td>'; break; case 'description': $output .= "<td $attributes>$category->description</td>"; break; case 'slug': $output .= "<td $attributes>$category->slug</td>"; break; case 'links': $attributes = 'class="links column-links num"' . $style; $output .= "<td $attributes>$count</td>"; } } $output .= '</tr>'; return $output; }
function powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs = array()) { $feed_slug = $FeedAttribs['feed_slug']; $cat_ID = $FeedAttribs['category_id']; $SupportUploads = powerpressadmin_support_uploads(); if (!isset($FeedSettings['itunes_subtitle'])) { $FeedSettings['itunes_subtitle'] = ''; } if (!isset($FeedSettings['itunes_summary'])) { $FeedSettings['itunes_summary'] = ''; } if (!isset($FeedSettings['itunes_keywords'])) { $FeedSettings['itunes_keywords'] = ''; } if (!isset($FeedSettings['itunes_cat_1'])) { $FeedSettings['itunes_cat_1'] = ''; } if (!isset($FeedSettings['itunes_cat_2'])) { $FeedSettings['itunes_cat_2'] = ''; } if (!isset($FeedSettings['itunes_cat_3'])) { $FeedSettings['itunes_cat_3'] = ''; } if (!isset($FeedSettings['itunes_explicit'])) { $FeedSettings['itunes_explicit'] = 0; } if (!isset($FeedSettings['itunes_talent_name'])) { $FeedSettings['itunes_talent_name'] = ''; } if (!isset($FeedSettings['email'])) { $FeedSettings['email'] = ''; } if (!isset($FeedSettings['itunes_new_feed_url_podcast'])) { $FeedSettings['itunes_new_feed_url_podcast'] = ''; } if (!isset($FeedSettings['itunes_new_feed_url'])) { $FeedSettings['itunes_new_feed_url'] = ''; } $AdvancediTunesSettings = !empty($FeedSettings['itunes_summary']); if (!empty($FeedSettings['itunes_subtitle'])) { $AdvancediTunesSettings = true; } ?> <h3><?php echo __('iTunes Settings', 'powerpress'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('iTunes Program Subtitle', 'powerpress'); ?> <br /> </th> <td> <input type="text" name="Feed[itunes_subtitle]" style="width: 60%;" value="<?php echo esc_attr($FeedSettings['itunes_subtitle']); ?> " maxlength="250" /> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('iTunes Program Summary', 'powerpress'); ?> </th> <td> <p style="margin-top: 5px;"><?php echo __('Your summary may not contain HTML and cannot exceed 4,000 characters in length.', 'powerpress'); ?> </p> <textarea name="Feed[itunes_summary]" rows="5" style="width:80%;" ><?php echo $FeedSettings['itunes_summary']; ?> </textarea> </td> </tr> <?php if (!empty($General['advanced_mode_2'])) { ?> <tr valign="top"> <th scope="row"> <?php echo __('iTunes Episode Summary', 'powerpress'); ?> </th> <td> <div><input type="checkbox" name="Feed[enhance_itunes_summary]" value="1" <?php echo !empty($FeedSettings['enhance_itunes_summary']) ? 'checked ' : ''; ?> /> <?php echo __('Optimize iTunes Summary from Blog Posts', 'powerpress'); ?> </div> <p> <?php echo __('Creates a friendlier view of your post/episode content by converting web links and images to clickable links in the iTunes application.', 'powerpress'); ?> </p> </td> </tr> </table> <table class="form-table"> <?php if (!empty($FeedSettings['itunes_keywords'])) { ?> <tr valign="top"> <th scope="row"> <?php echo __('iTunes Program Keywords', 'powerpress'); ?> <br /> </th> <td> <input type="text" name="Feed[itunes_keywords]" style="width: 60%;" value="<?php echo esc_attr($FeedSettings['itunes_keywords']); ?> " maxlength="250" /> <p><?php echo __('Feature Deprecated by Apple. Keywords above are for your reference only.', 'powerpress'); ?> </p> </td> </tr> <?php } // End iTunes keywords } // end advanced mode ?> <tr valign="top"> <th scope="row"> <?php echo __('iTunes Category', 'powerpress'); ?> <span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?> </span> </th> <td> <select name="Feed[itunes_cat_1]" class="bpp_input_med"> <?php $MoreCategories = false; if (!empty($FeedSettings['itunes_cat_2'])) { $MoreCategories = true; } else { if (!empty($FeedSettings['itunes_cat_3'])) { $MoreCategories = true; } } $Categories = powerpress_itunes_categories(true); echo '<option value="">' . __('Select Category', 'powerpress') . '</option>'; $UseCategories = powerpress_categories_strict($Categories, $FeedSettings['itunes_cat_1']); while (list($value, $desc) = each($UseCategories)) { echo "\t<option value=\"{$value}\"" . ($FeedSettings['itunes_cat_1'] == $value ? ' selected' : '') . ">" . htmlspecialchars($desc) . "</option>\n"; } reset($Categories); ?> </select> <?php if (!$MoreCategories && empty($General['seo_itunes'])) { ?> <a href="#" onclick="document.getElementById('more_itunes_cats').style.display='block';return false;"><?php echo __('more', 'powerpress'); ?> </a> <?php } ?> <p> <?php echo __('The category above is where you will appear when browsing iTunes.', 'powerpress'); ?> </p> </td> </tr> </table> <!-- start advanced features --> <div id="more_itunes_cats" style="display: <?php echo $MoreCategories || !empty($General['seo_itunes']) ? 'block' : 'none'; ?> ;"> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('iTunes Category 2', 'powerpress'); ?> </th> <td> <select name="Feed[itunes_cat_2]" class="bpp_input_med"> <?php echo '<option value="">' . __('Select Category', 'powerpress') . '</option>'; $UseCategories = powerpress_categories_strict($Categories, $FeedSettings['itunes_cat_2']); while (list($value, $desc) = each($UseCategories)) { echo "\t<option value=\"{$value}\"" . ($FeedSettings['itunes_cat_2'] == $value ? ' selected' : '') . ">" . htmlspecialchars($desc) . "</option>\n"; } reset($Categories); ?> </select> <?php if (!empty($General['seo_itunes'])) { ?> <p> <em><?php echo __('SEO Suggestion: Select a second category.', 'powerpress'); ?> </em> </p> <?php } ?> </td> </tr> <tr valign="top"> <th scope="row"> <?php echo __('iTunes Category 3', 'powerpress'); ?> </th> <td> <select name="Feed[itunes_cat_3]" class="bpp_input_med"> <?php echo '<option value="">' . __('Select Category', 'powerpress') . '</option>'; $UseCategories = powerpress_categories_strict($Categories, $FeedSettings['itunes_cat_3']); while (list($value, $desc) = each($UseCategories)) { echo "\t<option value=\"{$value}\"" . ($FeedSettings['itunes_cat_3'] == $value ? ' selected' : '') . ">" . htmlspecialchars($desc) . "</option>\n"; } reset($Categories); ?> </select> <?php if (!empty($General['seo_itunes'])) { ?> <p> <em><?php echo __('SEO Suggestion: Select a third category.', 'powerpress'); ?> </em> </p> <?php } ?> </td> </tr> </table> </div> <!-- end advanced features --> <table class="form-table"> <tr valign="top"> <th scope="row"> <?php echo __('iTunes Explicit', 'powerpress'); ?> </th> <td> <select name="Feed[itunes_explicit]" class="bpp_input_med"> <?php $explicit = array(0 => __('No - display nothing', 'powerpress'), 1 => __('Yes - explicit content', 'powerpress'), 2 => __('Clean - no explicit content', 'powerpress')); while (list($value, $desc) = each($explicit)) { echo "\t<option value=\"{$value}\"" . ($FeedSettings['itunes_explicit'] == $value ? ' selected' : '') . ">{$desc}</option>\n"; } ?> </select> </td> </tr> <?php if (!empty($General['advanced_mode_2'])) { ?> <!-- start advanced features --> <tr valign="top"> <th scope="row"> <?php echo __('iTunes Author Name', 'powerpress'); ?> </th> <td> <input type="text" name="Feed[itunes_talent_name]" class="bpp_input_med" value="<?php echo esc_attr($FeedSettings['itunes_talent_name']); ?> " maxlength="250" /><br /> <div><input type="checkbox" name="Feed[itunes_author_post]" value="1" <?php echo !empty($FeedSettings['itunes_author_post']) ? 'checked ' : ''; ?> /> <?php echo __('Use blog post author\'s name for individual episodes.', 'powerpress'); ?> </div> <?php if (!empty($General['seo_itunes'])) { ?> <p> <em><?php echo __('SEO Suggestion: Include talent names and slogans not mentioned in the show title.', 'powerpress'); ?> </em> </p> <?php } ?> </td> </tr> <!-- end advanced features --> <?php } ?> <tr valign="top"> <th scope="row"> <?php echo __('iTunes Email', 'powerpress'); ?> <span class="powerpress-required"><?php echo __('Required', 'powerpress'); ?> </span> </th> <td> <input type="text" name="Feed[email]" class="bpp_input_med" value="<?php echo esc_attr($FeedSettings['email']); ?> " maxlength="250" /> <div>(<?php echo __('iTunes will email this address when your podcast is accepted into the iTunes Directory.', 'powerpress'); ?> )</div> </td> </tr> </table> <?php if (!empty($General['advanced_mode_2'])) { ?> <!-- start advanced features --> <table class="form-table"> <tr valign="top"> <th scope="row" > <?php echo __('iTunes New Feed URL', 'powerpress'); ?> </th> <td> <div id="new_feed_url_step_1" style="display: <?php echo !empty($FeedSettings['itunes_new_feed_url']) || !empty($FeedSettings['itunes_new_feed_url_podcast']) ? 'none' : 'block'; ?> ;"> <p style="margin-top: 5px;"><strong><a href="#" onclick="return powerpress_new_feed_url_prompt();"><?php echo __('Set iTunes New Feed URL', 'powerpress'); ?> </a></strong></p> <p><strong> <?php echo __('The iTunes New Feed URL option works primarily for Apple\'s iTunes application only, and should only be used if you are unable to implement a HTTP 301 redirect.', 'powerpress'); ?> <?php echo __('A 301 redirect will route <u>all podcast clients including iTunes</u> to your new feed address.', 'powerpress'); ?> </strong> </p> <p> <?php echo __('Learn more:', 'powerpress'); ?> <a href="http://create.blubrry.com/manual/syndicating-your-podcast-rss-feeds/changing-your-podcast-rss-feed-address-url/" target="_blank"><?php echo __('Changing Your Podcast RSS Feed Address (URL)', 'powerpress'); ?> </a> </p> </div> <div id="new_feed_url_step_2" style="display: <?php echo !empty($FeedSettings['itunes_new_feed_url']) || !empty($FeedSettings['itunes_new_feed_url_podcast']) ? 'block' : 'none'; ?> ;"> <p style="margin-top: 5px;"><strong><?php echo __('WARNING: Changes made here are permanent. If the New Feed URL entered is incorrect, you will lose subscribers and will no longer be able to update your listing in the iTunes Store.', 'powerpress'); ?> </strong></p> <p><strong><?php echo __('DO NOT MODIFY THIS SETTING UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING.', 'powerpress'); ?> </strong></p> <p> <?php echo htmlspecialchars(sprintf(__('Apple recommends you maintain the %s tag in your feed for at least two weeks to ensure that most subscribers will receive the new New Feed URL.', 'powerpress'), '<itunes:new-feed-url>')); ?> </p> <p> <?php $FeedName = __('Main RSS2 feed', 'powerpress'); $FeedURL = get_feed_link('rss2'); if ($cat_ID) { $category = get_category_to_edit($cat_ID); $FeedName = sprintf(__('%s category feed', 'powerpress'), htmlspecialchars($category->name)); $FeedURL = get_category_feed_link($cat_ID); } else { if ($feed_slug) { if (!empty($General['custom_feeds'][$feed_slug])) { $FeedName = $General['custom_feeds'][$feed_slug]; } else { $FeedName = __('Podcast', 'powerpress'); } $FeedName = trim($FeedName) . ' ' . __('feed', 'powerpress'); $FeedURL = get_feed_link($feed_slug); } else { if ($FeedAttribs['type'] == 'ttid') { $term_object = get_term_to_edit($FeedAttribs['term_id'], $FeedAttribs['taxonomy_type']); $FeedName = sprintf(__('%s taxonomy term feed', 'powerpress'), htmlspecialchars($term_object->name)); $FeedURL = get_term_feed_link($FeedAttribs['term_id'], $FeedAttribs['taxonomy_type'], 'rss2'); } } } echo sprintf(__('The New Feed URL value below will be applied to the %s (%s).', 'powerpress'), $FeedName, $FeedURL); ?> </p> <p style="margin-bottom: 0;"> <label style="width: 25%; float:left; display:block; font-weight: bold;"><?php echo __('New Feed URL', 'powerpress'); ?> </label> <input type="text" name="Feed[itunes_new_feed_url]" style="width: 55%;" value="<?php echo esc_attr($FeedSettings['itunes_new_feed_url']); ?> " maxlength="250" /> </p> <p style="margin-left: 25%;margin-top: 0;font-size: 90%;">(<?php echo __('Leave blank for no New Feed URL', 'powerpress'); ?> )</p> <p><a href="http://www.apple.com/itunes/whatson/podcasts/specs.html#changing" target="_blank"><?php echo __('More information regarding the iTunes New Feed URL is available here.', 'powerpress'); ?> </a></p> <p> <?php if (!$cat_ID && !$feed_slug) { if (empty($General['channels'])) { echo sprintf(__('Please activate the \'Custom Podcast Channels\' Advanced Option to set the new-feed-url for your podcast only feed (%s)', 'powerpress'), get_feed_link('podcast')); } else { echo sprintf(__('Please navigate to the \'Custom Podcast Channels\' section to set the new-feed-url for your podcast only feed (%s)', 'powerpress'), get_feed_link('podcast')); } } ?> </p> </div> </td> </tr> </table> <?php if (defined('POWERPRESS_NOT_SUPPORTED')) { // start powerpress not supported features ?> <fieldset style="border: 1px dashed #333333;"> <legend style="margin: 0 20px; padding: 0 5px; font-weight: bold;"><?php echo __('Features Not Supported by PowerPress', 'powerpress'); ?> </legend> <div style="margin-left: 230px; margin-bottom: 10px;"> <p> <strong style="color: #CC0000; font-weight: bold;"><?php echo __('USE THE FOLLOWING SETTINGS AT YOUR OWN RISK.', 'powerpress'); ?> </strong> </p> <p style="margin-bottom: 0;"> <?php echo __('Feeds affected', 'powerpress'); ?> : </p> <div style="margin-left: 20px;"> <?php // $General, $feed_slug=false, $cat_ID=false if ($feed_slug) { echo '<a href="'; echo get_feed_link($feed_slug); echo '" target="_blank">'; echo get_feed_link($feed_slug); echo '</a>'; } else { if ($cat_ID) { echo '<a href="'; echo get_category_feed_link($cat_ID); echo '" target="_blank">'; echo get_category_feed_link($cat_ID); echo '</a>'; } else { echo '<a href="'; echo get_feed_link('feed'); echo '" target="_blank">'; echo get_feed_link('feed'); echo '</a>'; if (empty($General['custom_feeds']['podcast'])) { echo '<br /><a href="'; echo get_feed_link('podcast'); echo '" target="_blank">'; echo get_feed_link('podcast'); echo '</a>'; } } } ?> </div> </div> <div id="permanent_itunes_settings"> <table class="form-table"> <tr valign="top"> <th scope="row" > <?php echo __('iTunes Block', 'powerpress'); ?> </th> <td> <input type="checkbox" name="Feed[itunes_block]" value="1" <?php if (!empty($FeedSettings['itunes_block'])) { echo 'checked'; } ?> /> <?php echo __('Prevent the entire podcast from appearing in the iTunes Podcast directory.', 'powerpress'); ?> </td> </tr> <tr valign="top"> <th scope="row" > <?php echo __('iTunes Complete', 'powerpress'); ?> </th> <td> <input type="checkbox" name="Feed[itunes_complete]" value="1" <?php if (!empty($FeedSettings['itunes_complete'])) { echo 'checked'; } ?> /> <?php echo __('Indicate the completion of a podcast. iTunes will no longer update your listing in the iTunes Podcast directory.', 'powerpress'); ?> </td> </tr> </table> </div> </fieldset> <?php } // End PowerPress not supported features ?> <!-- end advanced features --> <?php } // end other advanced options }
/** * {@internal Missing Short Description}} * * @since unknown * * @param unknown_type $category * @param unknown_type $name_override * @return unknown */ function link_cat_row($category, $name_override = false) { static $row_class = ''; if (!($category = get_term($category, 'link_category', OBJECT, 'display'))) { return false; } if (is_wp_error($category)) { return $category; } $default_cat_id = (int) get_option('default_link_category'); $name = $name_override ? $name_override : $category->name; $edit_link = "link-category.php?action=edit&cat_ID={$category->term_id}"; if (current_user_can('manage_categories')) { $edit = "<a class='row-title' href='{$edit_link}' title='" . esc_attr(sprintf(__('Edit “%s”'), $category->name)) . "'>{$name}</a><br />"; $actions = array(); $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>'; if ($default_cat_id != $category->term_id) { $actions['delete'] = "<a class='delete:the-list:link-cat-{$category->term_id} submitdelete' href='" . wp_nonce_url("link-category.php?action=delete&cat_ID={$category->term_id}", 'delete-link-category_' . $category->term_id) . "'>" . __('Delete') . "</a>"; } $actions = apply_filters('link_cat_row_actions', $actions, $category); $action_count = count($actions); $i = 0; $edit .= '<div class="row-actions">'; foreach ($actions as $action => $link) { ++$i; $i == $action_count ? $sep = '' : ($sep = ' | '); $edit .= "<span class='{$action}'>{$link}{$sep}</span>"; } $edit .= '</div>'; } else { $edit = $name; } $row_class = 'alternate' == $row_class ? '' : 'alternate'; $qe_data = get_term_to_edit($category->term_id, 'link_category'); $category->count = number_format_i18n($category->count); $count = $category->count > 0 ? "<a href='link-manager.php?cat_id={$category->term_id}'>{$category->count}</a>" : $category->count; $output = "<tr id='link-cat-{$category->term_id}' class='iedit {$row_class}'>"; $columns = get_column_headers('edit-link-categories'); $hidden = get_hidden_columns('edit-link-categories'); foreach ($columns as $column_name => $column_display_name) { $class = "class=\"{$column_name} column-{$column_name}\""; $style = ''; if (in_array($column_name, $hidden)) { $style = ' style="display:none;"'; } $attributes = "{$class}{$style}"; switch ($column_name) { case 'cb': $output .= "<th scope='row' class='check-column'>"; if (absint(get_option('default_link_category')) != $category->term_id) { $output .= "<input type='checkbox' name='delete[]' value='{$category->term_id}' />"; } else { $output .= " "; } $output .= "</th>"; break; case 'name': $output .= "<td {$attributes}>{$edit}"; $output .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">'; $output .= '<div class="name">' . $qe_data->name . '</div>'; $output .= '<div class="slug">' . $qe_data->slug . '</div>'; $output .= '<div class="cat_parent">' . $qe_data->parent . '</div></div></td>'; break; case 'description': $output .= "<td {$attributes}>{$category->description}</td>"; break; case 'slug': $output .= "<td {$attributes}>{$category->slug}</td>"; break; case 'links': $attributes = 'class="links column-links num"' . $style; $output .= "<td {$attributes}>{$count}</td>"; break; default: $output .= "<td {$attributes}>"; $output .= apply_filters('manage_link_categories_custom_column', '', $column_name, $category->term_id); $output .= "</td>"; } } $output .= '</tr>'; return $output; }
if ($referer = wp_get_original_referer()) { if (false !== strpos($referer, 'edit-link-categories.php')) { $location = $referer; } } $location = add_query_arg('message', 2, $location); wp_redirect($location); exit; break; case 'edit': $title = __('Categories'); $parent_file = 'edit.php'; $submenu_file = 'edit-link-categories.php'; require_once 'admin-header.php'; $cat_ID = (int) $_GET['cat_ID']; $category = get_term_to_edit($cat_ID, 'link_category'); include 'edit-link-category-form.php'; include 'admin-footer.php'; exit; break; case 'editedcat': $cat_ID = (int) $_POST['cat_ID']; check_admin_referer('update-link-category_' . $cat_ID); if (!current_user_can('manage_categories')) { wp_die(__('Cheatin’ uh?')); } $location = 'edit-link-categories.php'; if ($referer = wp_get_original_referer()) { if (false !== strpos($referer, 'edit-link-categories.php')) { $location = $referer; }
/** * Displays the taxonomy management pages. * * @package webcomic * @since 3 */ public function admin_terms() { $this->domain(); global $current_user; $wc = !empty($_REQUEST['webcomic_collection']) ? get_term($_REQUEST['webcomic_collection'], 'webcomic_collection') : get_term((int) $this->option('default_collection'), 'webcomic_collection'); $page = $_REQUEST['page']; $pagenum = !empty($_REQUEST['pagenum']) ? $_REQUEST['pagenum'] : 1; $hidden = get_hidden_columns('webcomic_page_' . $page); $find = !empty($_REQUEST['s']) ? '&s=' . $_REQUEST['s'] : ''; $view = 'webcomic_collection' == $page ? '?page=' . $page : '?page=' . $page . '&webcomic_collection=' . $wc->term_id . $find; $img_field = 'webcomic_character' == $page ? __('avatar', 'webcomic') : __('cover', 'webcomic'); $taxonomy = get_taxonomy($page); $user_meta = current(get_user_meta($current_user->ID, 'webcomic')); if (empty($user_meta[$page . '_per_page'])) { $user_meta[$page . '_per_page'] = 20; update_user_meta($current_user->ID, 'webcomic', $user_meta); } elseif (!empty($_REQUEST[$page . '_per_page'])) { $user_meta[$page . '_per_page'] = intval($_REQUEST[$page . '_per_page']); update_user_meta($current_user->ID, 'webcomic', $user_meta); } $tpp = $user_meta[$page . '_per_page']; if ($current_user->data->rich_editing) { $tinymce_width = !empty($_REQUEST['subpage']) ? '460px' : '100%'; wp_tiny_mce(false, array('editor_selector' => 'webcomic_tinymce', 'width' => $tinymce_width, 'theme_advanced_buttons1' => implode(',', array('bold', 'italic', '|', 'bullist', 'numlist', 'blockquote', '|', 'link', 'unlink', '|', 'charmap', 'spellchecker', 'fullscreen', 'wp_adv')), 'theme_advanced_buttons2' => implode(',', array('formatselect', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', '|', 'sub', 'sup', '|', 'removeformat', 'code')))); } if ('webcomic_collection' != $page && (!$wc || is_wp_error($wc))) { ?> <div class="wrap"> <div id="icon-webcomic" class="icon32"><img src="<?php echo $this->url . '/webcomic-includes/icon.png'; ?> " alt="icon"></div> <h2><?php _e('Webcomic Error', 'webcomc'); ?> </h2> <p><?php printf(__("Hold up: it looks like you don't have any collections! You should definitely <a href='%s'>create a collection</a> before you go any further.", 'webcomic'), admin_url('admin.php?page=webcomic_collection')); ?> </p> </div> <?php } elseif (isset($_REQUEST['subpage']) && 'edit_webcomic_term' == $_REQUEST['subpage']) { $term = get_term_to_edit($_REQUEST['webcomic_term'], $page); ?> <style>#screen-options-link-wrap{display:none}th img{height:auto;max-height:<?php echo $this->option('small_h'); ?> px;max-width:<?php echo $this->option('small_w'); ?> px;width:auto}.form-field input[type=checkbox]{width:auto}</style> <div class="wrap"> <div id="icon-webcomic" class="icon32"><img src="<?php echo $this->url . '/webcomic-includes/icon.png'; ?> " alt="icon"></div> <h2><?php echo $taxonomy->labels->edit_item; ?> </h2> <form action="<?php echo $view; ?> " method="post" enctype="multipart/form-data" class="media-upload-form"> <?php wp_nonce_field('update_webcomic_term'); ?> <div class="media-single"> <table class="slidetoggle describe form-table"> <thead class="media-item-info"> <tr> <th rowspan="5" class="label"> <label for="webcomic_file"> <?php echo ucfirst($img_field); ?> <br> <?php if (!empty($term->webcomic_files)) { foreach ($term->webcomic_files['full'] as $k => $v) { if ($term->webcomic_files['small'][$k]) { echo $term->webcomic_files['small'][$k]['html']; } elseif ($term->webcomic_files['medium'][$k]) { echo $term->webcomic_files['medium'][$k]['html']; } elseif ($term->webcomic_files['large'][$k]) { echo $term->webcomic_files['large'][$k]['html']; } else { echo $v['html']; } } } ?> </label> </th> <td> <p><input type="file" name="webcomic_file[]" id="webcomic_file"></p> <?php if (!empty($term->webcomic_files)) { foreach ($term->webcomic_files['full'] as $k => $v) { ?> <input type="text" name="webcomic_filename[<?php echo $k; ?> ]" value="<?php echo $v['filename']; ?> "> <input type="hidden" name="webcomic_extension[<?php echo $k; ?> ]" value=".<?php echo $v['extension']; ?> "> <select name="webcomic_action[<?php echo $k; ?> ]"> <option value=""><?php _e('File Actions', 'webcomic'); ?> </option> <?php if ('image/jpeg' == $v['mime'] || 'image/gif' == $v['mime'] || 'image/png' == $v['mime']) { ?> <option value="regen"><?php _e('Regenerate Thumbnails', 'webcomic'); ?> </option><?php } ?> <option value="delete"><?php _e('Delete', 'webcomic'); ?> </option> </select><br> <?php $s = array(); if (isset($term->webcomic_files['large'][$k])) { $s[] = __('large', 'webcomic'); } if (isset($term->webcomic_files['medium'][$k])) { $s[] = __('medium', 'webcomic'); } if (isset($term->webcomic_files['small'][$k])) { $s[] = __('small', 'webcomic'); } if (1 < count($s)) { printf(__('%s sizes available', 'webcomic'), ucfirst(substr_replace(implode(', ', $s), __(' and', 'webcomic'), strrpos(implode(', ', $s), ','), 1))); } elseif (!empty($s)) { printf(__('%s size available', 'webcomic'), ucfirst(current($s))); } else { _e('No thumbnail sizes available', 'webcomic'); } echo ' | <a href="' . admin_url('admin.php?page=webcomic_tools&subpage=edit_files&type=' . end(explode('_', $page)) . '&src=' . $wc->slug . '&id=' . $term->term_id . '&key=' . $k) . '">' . __('Edit', 'webcomic') . '</a>'; } } ?> </td> </tr> </thead> <tbody> <tr class="form-field"> <th scope="row" class="label"><label for="webcomic_name"><?php _e('Name', 'webcomic'); ?> </label></th> <td> <input type="text" name="webcomic_name" value="<?php echo $term->name; ?> " id="webcomic_name"><br> <?php printf(__('The name is how the %s appears on your site.', 'webcomic'), strtolower($taxonomy->labels->singular_name)); ?> </td> </tr> <tr class="form-field"> <th scope="row" class="label"><label for="webcomic_nicename"><?php _e('Slug', 'webcomic'); ?> </label></th> <td> <input type="text" name="webcomic_nicename" value="<?php echo $term->slug; ?> " id="webcomic_nicename"><br> <?php _e('The “slug” is the URL-friendly version of the name.', 'webcomic'); ?> </td> </tr> <?php if ('webcomic_collection' == $page) { ?> <tr class="form-field"> <th scope="row" class="label"><label for="webcomic_group"><?php _e('Age', 'webcomic'); ?> </label></th> <td> <input type="text" name="webcomic_group" size="2" maxlength="2" value="<?php echo $term->term_group; ?> " style="text-align:center;width:auto" id="webcomic_group"><br> <?php printf(__('The minimum recommended age for this %s.', 'webcomic'), strtolower($taxonomy->labels->singular_name)); ?> </td> </tr> <tr class="form-field"> <th scope="row" class="label"><label for="webcomic_restrict"><?php _e('Restrict', 'webcomic'); ?> </label></th> <td> <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('– Current Theme –', '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> <label for="webcomic_bookend_first"><?php _e('First: ', 'webcomic'); wp_dropdown_pages(array('post_type' => 'page', 'selected' => $term->webcomic_bookend['first'], 'name' => 'webcomic_bookend_first', 'show_option_none' => __('None', 'webcomic'), 'sort_column' => 'menu_order, post_title')); ?> </label> <label for="webcomic_bookend_last"><?php _e('Last: ', 'webcomic'); wp_dropdown_pages(array('post_type' => 'page', 'selected' => $term->webcomic_bookend['last'], 'name' => 'webcomic_bookend_last', 'show_option_none' => __('None', 'webcomic'), 'sort_column' => 'menu_order, post_title')); ?> </label><br> <?php printf(__('The very first and very last pages when browsing webcomics in this %s.', 'webcomic'), strtolower($taxonomy->labels->singular_name)); ?> </td> </tr> <?php } elseif ('webcomic_storyline' == $page || 'webcomic_character' == $page) { ?> <tr class="form-field"> <th scope="row" class="label"><label for="webcomic_parent"><?php _e('Parent', 'webcomic'); ?> </label></th> <td> <select name="webcomic_parent" id="webcomic_parent"> <option value="0"><?php _e('None', 'webcomic'); ?> </option> <?php $order = 'webcomic_storyline' == $page ? '&webcomic_order=1' : ''; $terms = get_terms($page, 'exclude=' . $_REQUEST['webcomic_term'] . '&hide_empty=0' . $order . '&term_group=' . $wc->term_id); $walker = new webcomic_Walker_AdminTermParent(); echo $walker->walk($terms, 0, array('parent' => $term->parent)); ?> </select><br> <?php printf(__('%s are hierarchical, so one %s may contain any number of other %s.', 'webcomic'), $taxonomy->labels->name, strtolower($taxonomy->labels->singular_name), strtolower($taxonomy->labels->name)); ?> </td> </tr> <?php } ?> <tr class="form-field"> <th scope="row" class="label"><label for="webcomic_description"><?php _e('Description', 'webcomic'); ?> </label></th> <td> <textarea name="webcomic_description" id="webcomic_description" rows="5" cols="40" class="webcomic_tinymce"><?php echo $term->description; ?> </textarea><br> <?php printf(__('The description is useful for providing a brief explanation of the %s.', 'webcomic'), strtolower($taxonomy->labels->singular_name)); ?> </td> </tr> <?php if ('webcomic_collection' == $page) { ?> <tr class="form-field"> <th scope="row" class="label"><label for="webcomic_paypal_price_amount_d"><b><?php _e('Prints', 'webcomic'); ?> </b></label></th> <td style="padding:0"> <!-- Nested tables, I know. Forgive me. >.< --> <table> <thead> <tr> <td colspan="3"><label><input type="checkbox" name="webcomic_paypal_prints" value="1"<?php if ($term->webcomic_paypal['prints'] || !isset($term->webcomic_paypal['prints']) && $this->option('paypal_prints')) { echo ' checked'; } ?> > <?php printf(__('Sell prints of new webcomics in this %s', 'webcomic'), strtolower($taxonomy->labels->singular_name)); ?> </label></td> </tr> <tr> <td></td> <td><i><?php _e('Price', 'webcomic'); ?> </i></td> <td><i><?php _e('Shipping', 'webcomic'); ?> </i></td> </tr> </thead> <tbody> <tr> <td><i><?php _e('Domestic', 'webcomic'); ?> </i></td> <td> <?php printf('%.2f', $this->option('paypal_price_d')); ?> <select name="webcomic_paypal_price_type_d"> <option value="add"<?php if ($term->webcomic_paypal['price_d'] > 0) { echo ' selected'; } ?> >+</option> <option value="sub"<?php if ($term->webcomic_paypal['price_d'] < 0) { echo ' selected'; } ?> >−</option> </select> <input type="text" name="webcomic_paypal_price_d" size="1" value="<?php echo abs($term->webcomic_paypal['price_d']); ?> " style="text-align:center;width:auto" id="webcomic_paypal_price_d">% = <span class="webcomic_paypal_price_d"><?php printf(__('%.2f %s', 'webcomic'), $this->price($this->option('paypal_price_d'), array($term->webcomic_paypal['price_d'])), $this->option('paypal_currency')); ?> </span> </td> <td> <?php printf('%.2f', $this->option('paypal_shipping_d')); ?> <select name="webcomic_paypal_shipping_type_d"> <option value="add"<?php if ($term->webcomic_paypal['shipping_d'] > 0) { echo ' selected'; } ?> >+</option> <option value="sub"<?php if ($term->webcomic_paypal['shipping_d'] < 0) { echo ' selected'; } ?> >−</option> </select> <input type="text" name="webcomic_paypal_shipping_d" size="1" value="<?php echo abs($term->webcomic_paypal['shipping_d']); ?> " style="text-align:center;width:auto" id="webcomic_paypal_shipping_d">% = <span class="webcomic_paypal_shipping_d"><?php printf(__('%.2f %s', 'webcomic'), $this->price($this->option('paypal_shipping_d'), array($term->webcomic_paypal['shipping_d'])), $this->option('paypal_currency')); ?> </span> </td> </tr> <tr> <td><i><?php _e('International', 'webcomic'); ?> </i></td> <td> <?php printf('%.2f', $this->option('paypal_price_i')); ?> <select name="webcomic_paypal_price_type_i"> <option value="add"<?php if ($term->webcomic_paypal['price_i'] > 0) { echo ' selected'; } ?> >+</option> <option value="sub"<?php if ($term->webcomic_paypal['price_i'] < 0) { echo ' selected'; } ?> >−</option> </select> <input type="text" name="webcomic_paypal_price_i" size="1" value="<?php echo abs($term->webcomic_paypal['price_i']); ?> " style="text-align:center;width:auto" id="webcomic_paypal_price_i">% = <span class="webcomic_paypal_price_i"><?php printf(__('%.2f %s', 'webcomic'), $this->price($this->option('paypal_price_i'), array($term->webcomic_paypal['price_i'])), $this->option('paypal_currency')); ?> </span> </td> <td> <?php printf('%.2f', $this->option('paypal_shipping_i')); ?> <select name="webcomic_paypal_shipping_type_i"> <option value="add"<?php if ($term->webcomic_paypal['shipping_i'] > 0) { echo ' selected'; } ?> >+</option> <option value="sub"<?php if ($term->webcomic_paypal['shipping_i'] < 0) { echo ' selected'; } ?> >−</option> </select> <input type="text" name="webcomic_paypal_shipping_i" size="1" value="<?php echo abs($term->webcomic_paypal['shipping_i']); ?> " style="text-align:center;width:auto" id="webcomic_paypal_shipping_i">% = <span class="webcomic_paypal_shipping_i"><?php printf(__('%.2f %s', 'webcomic'), $this->price($this->option('paypal_shipping_i'), array($term->webcomic_paypal['shipping_i'])), $this->option('paypal_currency')); ?> </span> </td> </tr> <tr> <td><i><?php _e('Original', 'webcomic'); ?> </i></td> <td> <?php printf('%.2f', $this->option('paypal_price_o')); ?> <select name="webcomic_paypal_price_type_o"> <option value="add"<?php if ($term->webcomic_paypal['price_o'] > 0) { echo ' selected'; } ?> >+</option> <option value="sub"<?php if ($term->webcomic_paypal['price_o'] < 0) { echo ' selected'; } ?> >−</option> </select> <input type="text" name="webcomic_paypal_price_o" size="1" value="<?php echo abs($term->webcomic_paypal['price_o']); ?> " style="text-align:center;width:auto" id="webcomic_paypal_price_o">% = <span class="webcomic_paypal_price_o"><?php printf(__('%.2f %s', 'webcomic'), $this->price($this->option('paypal_price_o'), array($term->webcomic_paypal['price_o'])), $this->option('paypal_currency')); ?> </span> </td> <td> <?php printf('%.2f', $this->option('paypal_shipping_o')); ?> <select name="webcomic_paypal_shipping_type_o"> <option value="add"<?php if ($term->webcomic_paypal['shipping_o'] > 0) { echo ' selected'; } ?> >+</option> <option value="sub"<?php if ($term->webcomic_paypal['shipping_o'] < 0) { echo ' selected'; } ?> >−</option> </select> <input type="text" name="webcomic_paypal_shipping_o" size="1" value="<?php echo abs($term->webcomic_paypal['shipping_o']); ?> " style="text-align:center;width:auto" id="webcomic_paypal_shipping_o">% = <span class="webcomic_paypal_shipping_o"><?php printf(__('%.2f %s', 'webcomic'), $this->price($this->option('paypal_shipping_o'), array($term->webcomic_paypal['shipping_o'])), $this->option('paypal_currency')); ?> </span> </td> </tr> </tbody> </table> <?php printf(__('These print options apply to all webcomics in this %s.', 'webcomic'), strtolower($taxonomy->labels->singular_name)); ?> <script type="text/javascript">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($term->webcomic_paypal['price_d'])); ?> ;cost_i=<?php echo $this->price($this->option('paypal_price_i'), array($term->webcomic_paypal['price_i'])); ?> ;cost_o=<?php echo $this->price($this->option('paypal_price_o'), array($term->webcomic_paypal['price_o'])); ?> ;ship_d=<?php echo $this->price($this->option('paypal_shipping_d'), array($term->webcomic_paypal['shipping_d'])); ?> ;ship_i=<?php echo $this->price($this->option('paypal_shipping_i'), array($term->webcomic_paypal['shipping_i'])); ?> ;ship_o=<?php echo $this->price($this->option('paypal_shipping_o'), array($term->webcomic_paypal['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> </td> </tr> <?php } ?> </tbody> </table> </div> <p class="submit"> <a href="<?php echo $view; ?> " class="button-secondary"><?php _e('Cancel', 'webcomic'); ?> </a> <input type="submit" name="submit" value="<?php echo $taxonomy->labels->update_item; ?> " class="button-primary"> <input type="hidden" name="webcomic_term" value="<?php echo $term->term_id; ?> "> <input type="hidden" name="webcomic_collection" value="<?php echo $wc->term_id; ?> "> <input type="hidden" name="action" value="update_webcomic_term"> <input type="hidden" name="subpage" value=""> </p> </form> </div> <?php } else { $wco = 'webcomic_storyline' == $page ? true : false; $search = !empty($_REQUEST['s']) ? '&search=' . $_REQUEST['s'] : ''; $tg = 'webcomic_collection' != $page ? '&term_group=' . $wc->term_id : ''; $terms = get_terms($page, 'hide_empty=0&webcomic_order=' . $wco . $tg . $search); $num_term = count(get_terms($page, 'hide_empty=0&parent=0&term_group=' . $wc->term_id)); $max_term = $num_term < $pagenum * $tpp ? $num_term : $pagenum * $tpp; ?> <style>.widefat .term-description{display:none}.widefat .term-description-toggle{cursor:pointer}.widefat th.column-characters,.widefat th.column-storylines{text-align:center}</style> <div class="wrap"> <div id="icon-webcomic" class="icon32"><img src="<?php echo $this->url . '/webcomic-includes/icon.png'; ?> " alt="icon"></div> <h2> <?php if ('webcomic_collection' == $page) { echo $taxonomy->labels->name; } else { printf(__('%s in %s', 'webcomic'), $taxonomy->labels->name, $wc->name); } ?> </h2> <form action="<?php echo $view; ?> " method="post"> <p class="search-box"> <?php if ('webcomic_collection' != $page) { ?> <select name="webcomic_collection" id="webcomic_collection"> <?php $walker = new webcomic_Walker_AdminTermDropdown(); $selected = array($wc->term_id); echo $walker->walk(get_terms('webcomic_collection', 'get=all'), 0, array('selected' => $selected)); ?> </select> <?php } ?> <label class="screen-reader-text" for="s"><?php echo $taxonomy->labels->search_items; ?> </label> <input type="text" id="s" name="s" value="<?php if (!empty($_REQUEST['s'])) { echo $_REQUEST['s']; } ?> "> <input type="submit" value="<?php echo $taxonomy->labels->search_items; ?> " class="button"> </p> </form> <div id="col-container" style="clear:both"> <div id="col-right"> <div class="col-wrap"> <?php if (!$terms && 'webcomic_collection' != $page) { ?> <p><?php printf(__("%s doesn't have any %s.", 'webcomic'), $wc->name, strtolower($taxonomy->labels->name)); ?> </p> <?php } elseif (!$terms) { ?> <p><?php _e("You'll need to create at least one collection before you can start publishing webcomics.", 'webcomic'); ?> </p> <?php } else { ?> <form action="<?php echo $view; ?> " method="post"> <?php wp_nonce_field('bulk_webcomic_term'); ?> <div class="tablenav"> <div class="tablenav-pages"><?php echo paginate_links(array('base' => 'admin.php' . $view . '%_%', 'format' => '&pagenum=%#%', 'prev_text' => __('«', 'webcomic'), 'next_text' => __('»', 'webcomic'), 'total' => ceil($num_term / $tpp), 'current' => $pagenum)); ?> </div> <div class="alignleft actions"> <select name="action-1"> <option value=""><?php _e('Bulk Actions', 'webcomic'); ?> </option> <option value="regen"><?php _e('Regenerate Thumbnails', 'webcomic'); ?> </option> <?php if ('webcomic_storyline' != $page) { ?> <option value="delete"><?php _e('Delete', 'webcomic'); ?> </option><?php } ?> <?php if ('webcomic_collection' != $page) { ?> <optgroup label="<?php _e('Defaults', 'webcomic'); ?> "> <option value="add_default"><?php _e('Add', 'webcomic'); ?> </option> <option value="remove_default"><?php _e('Remove', 'webcomic'); ?> </option> </optgroup> <?php } ?> </select> <input type="submit" value="<?php _e('Apply', 'webcomic'); ?> " name="submit-1" class="button-secondary action"> </div> </div> <table class="widefat"> <thead><tr><th scope="col" class="manage-column column-cb check-column"><input type="checkbox"></th><?php print_column_headers('webcomic_page_' . $page); ?> </tr></thead> <tfoot><tr><th scope="col" class="manage-column column-cb check-column"><input type="checkbox"></th><?php print_column_headers('webcomic_page_' . $page); ?> </tr></tfoot> <tbody> <?php $walker = new webcomic_Walker_AdminTermList(); echo $walker->paged_walk($terms, 0, $pagenum, $tpp, array('hidden' => $hidden, 'view' => $view, 'page' => $page)); ?> </tbody> </table> <div class="tablenav"> <div class="tablenav-pages"><span class="displaying-num"><?php if ($num_term > $tpp) { printf(__('Displaying %1$d – %2$d of %3$d', 'webcomic'), ($pagenum - 1) * $tpp + 1, $max_term, $num_term); } ?> </span><?php echo paginate_links(array('base' => 'admin.php' . $view . '%_%', 'format' => '&pagenum=%#%', 'prev_text' => __('«', 'webcomic'), 'next_text' => __('»', 'webcomic'), 'total' => ceil($num_term / $tpp), 'current' => $pagenum)); ?> </div> <div class="alignleft actions"> <select name="action-2"> <option value=""><?php _e('Bulk Actions', 'webcomic'); ?> </option> <option value="regen"><?php _e('Regenerate Thumbnails', 'webcomic'); ?> </option> <?php if ('webcomic_storyline' != $page) { ?> <option value="delete"><?php _e('Delete', 'webcomic'); ?> </option><?php } ?> <?php if ('webcomic_collection' != $page) { ?> <optgroup label="<?php _e('Defaults', 'webcomic'); ?> "> <option value="add_default"><?php _e('Add', 'webcomic'); ?> </option> <option value="remove_default"><?php _e('Remove', 'webcomic'); ?> </option> </optgroup> <?php } ?> </select> <input type="submit" value="<?php _e('Apply', 'webcomic'); ?> " name="submit-2" class="button-secondary action"> <input type="hidden" name="webcomic_collection" value="<?php echo $wc->term_id; ?> "> <input type="hidden" name="action" value="bulk_webcomic_term"> </div> </div> </form> <?php } ?> </div> </div> <div id="col-left"> <div class="col-wrap"> <div class="form-wrap"> <h3><?php printf(__('Add a New %s', 'webcomic'), ucfirst(end(explode('_', $page)))); ?> </h3> <form action="<?php echo $view; ?> " method="post" enctype="multipart/form-data"> <?php wp_nonce_field('add_webcomic_term'); ?> <div class="form-field"> <label for="webcomic_file"><?php echo ucfirst($img_field); ?> </label> <input type="file" name="webcomic_file[]" id="webcomic_file"> <p><?php printf(__('The %s is a representative image that can be displayed on your site.', 'webcomic'), $img_field); ?> </p> </div> <div class="form-field"> <label for="webcomic_name"><?php _e('Name', 'webcomic'); ?> </label> <input type="text" name="webcomic_name" id="webcomic_name" size="40" value=""> <p><?php printf(__('The name is how the %s appears on your site.', 'webcomic'), strtolower($taxonomy->labels->singular_name)); ?> </p> </div> <div class="form-field"> <label for="webcomic_nicename"><?php _e('Slug', 'webcomic'); ?> </label> <input type="text" name="webcomic_nicename" id="webcomic_nicename" size="40" value=""> <p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'webcomic'); ?> </p> </div> <?php if ('webcomic_storyline' == $page || 'webcomic_character' == $page) { ?> <div class="form-field"> <label for="webcomic_parent"><?php _e('Parent', 'webcomic'); ?> </label> <select name="webcomic_parent" id="webcomic_parent"> <option value="0"><?php _e('None', 'webcomic'); ?> </option> <?php $walker = new webcomic_Walker_AdminTermParent(); echo $walker->walk($terms, 0, array('parent' => '')); ?> </select> <p><?php printf(__('%s are hierarchical, so one %s may contain any number of other %s.', 'webcomic'), $taxonomy->labels->name, strtolower($taxonomy->labels->singular_name), strtolower($taxonomy->labels->name)); ?> </p> </div> <?php } else { ?> <input type="hidden" name="webcomic_parent" value="0"> <?php } ?> <div class="form-field"> <label for="webcomic_description"><?php _e('Description', 'webcomic'); ?> </label> <textarea name="webcomic_description" id="webcomic_description" rows="5" cols="40" class="webcomic_tinymce"></textarea> <p><?php printf(__('The description is useful for providing a brief explanation of the %s.', 'webcomic'), strtolower($taxonomy->labels->singular_name)); ?> </p> </div> <p class="submit"> <input type="submit" class="button" name="submit" value="<?php echo $taxonomy->labels->add_new_item; ?> "> <input type="hidden" name="webcomic_collection" value="<?php echo $wc->term_id; ?> "> <input type="hidden" name="action" value="add_webcomic_term"> </p> </form> </div> </div> </div> </div> </div> <script type="text/javascript">var x='<form action="<?php echo $view; ?> " method="post"><input type="hidden" name="page" value="<?php echo $page; ?> "><div class="screen-options"><label><input type="text" name="<?php echo $page; ?> _per_page" value="<?php echo $tpp; ?> " maxlength="3" class="screen-per-page"> <?php echo $taxonomy->labels->name; ?> </label> <input type="submit" value="<?php _e('Apply', 'webcomic'); ?> " class="button-secondary action"><input type="hidden" name="webcomic_collection" value="<?php echo $wc->term_id; ?> "></div></form>';jQuery(document).ready(function($){$('.term-description-toggle').toggle(function(){$(this).parent().siblings('.term-description').show();$(this).html('<?php _e('Hide Description', 'webcomic'); ?> ');},function(){$(this).parent().siblings('.term-description').hide();$(this).html('<?php _e('Show Description', 'webcomic'); ?> ');});$('#screen-options-wrap').append(x);$('select#webcomic_collection').change(function(){ window.location = '<?php echo admin_url('admin.php?page=' . $page . '&webcomic_collection='); ?> ' + $(this).val();});});</script> <?php } }