diff --git a/ceo-admin.php b/ceo-admin.php index ffc608f..d9b43ef 100644 --- a/ceo-admin.php +++ b/ceo-admin.php @@ -29,7 +29,7 @@ function ceo_add_menu_pages() { } if (!defined('CEO_FEATURE_DISABLE_DEBUG')) $debug_hook = add_submenu_page($menu_location, $plugin_title . ' - ' . $debug_title, $debug_title, 'edit_theme_options', 'comiceasel-debug', 'ceo_debug'); - ceo_enqueue_admin_cpt_style('comic', 'comic-admin-editor-style', ceo_pluginfo('plugin_url').'/css/admin-editor.css'); + ceo_enqueue_admin_cpt_style('comic', 'comic-admin-editor-style', ceo_pluginfo('plugin_url').'/css/admin-editor.css'); } function ceo_load_scripts_chapter_manager() { @@ -93,12 +93,12 @@ function ceo_enqueue_admin_cpt_style( $cpt, $handle, $src = false, $deps = array $enqueue = null; /* Enqueue style only if we are on the correct CPT editor page. */ - if ( isset($_GET['post_type']) && $_GET['post_type'] == $cpt && $pagenow == "post-new.php" ) { + if ( isset($_GET['post_type']) && $_GET['post_type'] == $cpt && ($pagenow == "post-new.php" || $pagenow == 'edit.php')) { $enqueue = true; } /* Enqueue style only if we are on the correct CPT editor page. */ - if ( isset($_GET['post']) && $pagenow == "post.php" ) { + if ( isset($_GET['post']) && ($pagenow == "post.php" || $pagenow == 'edit.php')) { $post_id = $_GET['post']; $post_obj = get_post( $post_id ); if( $post_obj->post_type == $cpt ) diff --git a/comiceasel.php b/comiceasel.php index 6584c88..5f43059 100644 --- a/comiceasel.php +++ b/comiceasel.php @@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA add_action('init', 'ceo_initialize_post_types'); -define('CEO_FEATURE_DISABLE_MOTION_ARTIST', true); +// define('CEO_FEATURE_DISABLE_MOTION_ARTIST', true); function ceo_initialize_post_types() { if (!post_type_exists('comic')) { @@ -355,7 +355,7 @@ function ceo_pluginfo($whichinfo = null) { // comic-easel plugin directory/url 'plugin_url' => plugin_dir_url(dirname (__FILE__)) . 'comic-easel', 'plugin_path' => trailingslashit(ABSPATH) . ceo_get_plugin_path(), - 'version' => '1.3.13-github' + 'version' => '1.3.13' ); // Combine em. $ceo_pluginfo = array_merge($ceo_pluginfo, $ceo_addinfo); diff --git a/css/admin-editor.css b/css/admin-editor.css index 0ef7322..34380ec 100644 --- a/css/admin-editor.css +++ b/css/admin-editor.css @@ -2,5 +2,13 @@ .admin-comicbox img { max-width: 100%; + display: block; } +.column-comicimages { + width: 200px; +} + +.fixed .column-locations { + width: 200px; +} \ No newline at end of file diff --git a/functions/admin-meta.php b/functions/admin-meta.php index f264240..07ab8c2 100644 --- a/functions/admin-meta.php +++ b/functions/admin-meta.php @@ -19,7 +19,7 @@ function ceo_admin_init() { add_action('quick_edit_custom_box', 'ceo_chapters_quick_edit_menu_order', 10, 3); add_action('create_term', 'ceo_chapters_add_edit_menu_order'); -// add_filter('get_terms_args', 'ceo_chapters_find_menu_orderby'); +// add_filter('get_terms_args', 'ceo_chapters_find_menu_orderby'); } function ceo_chapters_add_edit_menu_order($term_id) { @@ -104,16 +104,14 @@ function ceo_chapters_menu_order_edit_form_field($term) { function ceo_add_new_comic_columns($comic_columns) { $new_columns['cb'] = ''; - $new_columns['title'] = __('Comic Title', 'comiceasel'); - $new_columns['chapter'] = __('Chapter', 'comiceasel'); $new_columns['characters'] = __('Characters', 'comiceasel'); $new_columns['locations'] = __('Location', 'comiceasel'); $new_columns['tags'] = __('Tags', 'comiceasel'); $new_columns['date'] = _x('Date', 'column name'); - $new_columns['comicimages'] = __('Thumbnail', 'comiceasel'); - + $new_columns['comicimages'] = __('Thumbnail', 'comiceasel'); + return $new_columns; } @@ -150,7 +148,7 @@ function ceo_manage_comic_columns($column_name, $id) { case 'comicimages': $post = &get_post($id); $comicthumb = ceo_display_comic_thumbnail('thumbnail', $post); - if (!$comicthumb) { echo 'No Comic Found.'; } else { + if (!$comicthumb) { echo __('No thumbnail Found.','comiceasel'); } else { echo $comicthumb; } break; @@ -164,8 +162,6 @@ function ceo_edit_select_motion_artist_directory_in_post($post) { $current_directory = get_post_meta( $post->ID, 'ma-directory', true ); if (empty($current_directory) || is_wp_error($current_directory)) $current_directory = ''; - - $dirs_to_search = array_unique(array(get_template_directory(),get_stylesheet_directory())); $ma_directories = array(); $ma_dir = get_stylesheet_directory() . '/motion-artist'; @@ -175,7 +171,6 @@ function ceo_edit_select_motion_artist_directory_in_post($post) { $thisdir = glob($ma_dir. '/*'); $ma_directories = array_merge($ma_directories, $thisdir); } - if (empty($ma_directories) || is_wp_error($ma_directories)) echo "No 'motion-artist' directory found in theme."; ?>
|
@@ -216,6 +212,7 @@ Width:
1,
- 'posts_per_page' => 1,
- 'order' => $order,
- 'post_type' => 'comic'
- );
- $posts = get_posts($args);
- foreach ($posts as $post) {
- setup_postdata($post);
+ if (!is_admin()) {
+ if ((is_home() || is_front_page()) && !is_paged() && !ceo_pluginfo('disable_comic_on_home_page')) {
+ $order = (ceo_pluginfo('display_first_comic_on_home_page')) ? 'asc' : 'desc';
+ $args = array(
+ 'showposts' => 1,
+ 'posts_per_page' => 1,
+ 'order' => $order,
+ 'post_type' => 'comic'
+ );
+ $posts = get_posts($args);
+ foreach ($posts as $post) {
+ setup_postdata($post);
+ }
}
- }
- if (!empty($post)) {
- $motion_artist_comic = get_post_meta( $post->ID, 'ma-directory', true );
- $motion_artist_id = get_post_meta( $post->ID, 'ma-id', true );
- if (!empty($motion_artist_comic)) {
- echo ' |