Changeset 601892
- Timestamp:
- 09/21/2012 08:05:49 AM (13 years ago)
- Location:
- codepress-admin-columns
- Files:
-
- 75 added
- 6 edited
-
tags/1.4.6.4 (added)
-
tags/1.4.6.4/assets (added)
-
tags/1.4.6.4/assets/css (added)
-
tags/1.4.6.4/assets/css/admin-column.css (added)
-
tags/1.4.6.4/assets/css/column.css (added)
-
tags/1.4.6.4/assets/images (added)
-
tags/1.4.6.4/assets/images/addon_sortable_1.png (added)
-
tags/1.4.6.4/assets/images/arrows.png (added)
-
tags/1.4.6.4/assets/images/checkbox.png (added)
-
tags/1.4.6.4/assets/images/checkmark.png (added)
-
tags/1.4.6.4/assets/images/checkmark_single.png (added)
-
tags/1.4.6.4/assets/images/comment_edit.png (added)
-
tags/1.4.6.4/assets/images/cross.png (added)
-
tags/1.4.6.4/assets/images/facebook.png (added)
-
tags/1.4.6.4/assets/images/icon.png (added)
-
tags/1.4.6.4/assets/images/information.png (added)
-
tags/1.4.6.4/assets/images/loading.gif (added)
-
tags/1.4.6.4/assets/images/no.png (added)
-
tags/1.4.6.4/assets/images/reorder.png (added)
-
tags/1.4.6.4/assets/images/reorder_arrow.png (added)
-
tags/1.4.6.4/assets/images/settings.png (added)
-
tags/1.4.6.4/assets/images/sort.png (added)
-
tags/1.4.6.4/assets/images/square.png (added)
-
tags/1.4.6.4/assets/images/trash.png (added)
-
tags/1.4.6.4/assets/images/twitter.png (added)
-
tags/1.4.6.4/assets/js (added)
-
tags/1.4.6.4/assets/js/admin-column.js (added)
-
tags/1.4.6.4/assets/js/jquery.qtip.js (added)
-
tags/1.4.6.4/assets/ui-theme (added)
-
tags/1.4.6.4/assets/ui-theme/images (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-bg_flat_75_ffffff_40x100.png (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-bg_glass_75_dadada_1x400.png (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-icons_222222_256x240.png (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-icons_2e83ff_256x240.png (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-icons_454545_256x240.png (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-icons_888888_256x240.png (added)
-
tags/1.4.6.4/assets/ui-theme/images/ui-icons_cd0a0a_256x240.png (added)
-
tags/1.4.6.4/assets/ui-theme/jquery-ui-1.8.18.custom.css (added)
-
tags/1.4.6.4/classes (added)
-
tags/1.4.6.4/classes/sortable.php (added)
-
tags/1.4.6.4/classes/utility.php (added)
-
tags/1.4.6.4/classes/values (added)
-
tags/1.4.6.4/classes/values.php (added)
-
tags/1.4.6.4/classes/values/comments.php (added)
-
tags/1.4.6.4/classes/values/link.php (added)
-
tags/1.4.6.4/classes/values/media.php (added)
-
tags/1.4.6.4/classes/values/posts.php (added)
-
tags/1.4.6.4/classes/values/users.php (added)
-
tags/1.4.6.4/codepress-admin-columns.php (added)
-
tags/1.4.6.4/languages (added)
-
tags/1.4.6.4/languages/codepress-admin-columns-da_DK.mo (added)
-
tags/1.4.6.4/languages/codepress-admin-columns-da_DK.po (added)
-
tags/1.4.6.4/languages/codepress-admin-columns-de_DE.mo (added)
-
tags/1.4.6.4/languages/codepress-admin-columns-de_DE.po (added)
-
tags/1.4.6.4/languages/codepress-admin-columns-fr_FR.mo (added)
-
tags/1.4.6.4/languages/codepress-admin-columns-fr_FR.po (added)
-
tags/1.4.6.4/languages/codepress-admin-columns-nl_NL.mo (added)
-
tags/1.4.6.4/languages/codepress-admin-columns-nl_NL.po (added)
-
tags/1.4.6.4/languages/codepress-admin-columns-pl_PL.mo (added)
-
tags/1.4.6.4/languages/codepress-admin-columns-pl_PL.po (added)
-
tags/1.4.6.4/languages/codepress-admin-columns.po (added)
-
tags/1.4.6.4/readme.txt (added)
-
tags/1.4.6.4/screenshot-1.png (added)
-
tags/1.4.6.4/screenshot-2.png (added)
-
tags/1.4.6.4/screenshot-3.png (added)
-
tags/1.4.6.4/screenshot-4.png (added)
-
tags/1.4.6.4/screenshot-5.png (added)
-
tags/1.4.6.4/screenshot-6.png (added)
-
tags/1.4.6.4/screenshot-7.png (added)
-
trunk/classes/sortable.php (modified) (1 diff)
-
trunk/classes/utility.php (modified) (1 diff)
-
trunk/classes/values.php (modified) (2 diffs)
-
trunk/classes/values/posts.php (modified) (1 diff)
-
trunk/codepress-admin-columns.php (modified) (12 diffs)
-
trunk/readme.txt (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
codepress-admin-columns/trunk/classes/sortable.php
r600963 r601892 893 893 $cposts[$p->ID] = $name; 894 894 } 895 } 896 break; 897 898 case 'column-before-moretag' : 899 $sort_flag = SORT_STRING; 900 foreach ( $this->get_any_posts_by_posttype($post_type) as $p ) { 901 $extended = get_extended($p->post_content); 902 $content = !empty($extended['extended']) ? $extended['main'] : ''; 903 $cposts[$p->ID] = $this->prepare_sort_string_value($content); 895 904 } 896 905 break; -
codepress-admin-columns/trunk/classes/utility.php
r588235 r601892 13 13 { 14 14 global $pagenow; 15 15 16 16 if ( 17 isset($_REQUEST['page']) && 'codepress-admin-columns' == $_REQUEST['page'] && 18 'options-general.php' == $pagenow && defined('WPSEO_PATH') && 17 isset($_REQUEST['page']) && 18 'codepress-admin-columns' == $_REQUEST['page'] && 19 'options-general.php' == $pagenow && 20 defined('WPSEO_PATH') && 19 21 file_exists(WPSEO_PATH.'admin/class-metabox.php') 20 22 ) { -
codepress-admin-columns/trunk/classes/values.php
r600963 r601892 140 140 return false; 141 141 142 // get thumbnail image size 143 $image_size = $this->thumbnail_size; // w, h 144 145 // incase the thumbnail dimension is set by name 146 if ( !is_array($image_size) ) { 147 global $_wp_additional_image_sizes; 148 if ( isset($_wp_additional_image_sizes[$image_size]) ) { 149 $_size = $_wp_additional_image_sizes[$image_size]; 150 $image_size = array( $_size['width'], $_size['height'] ); 151 } 152 } 153 154 // fallback for image size incase the passed size name does not exists 155 if ( !isset($image_size[0]) || !isset($image_size[1]) ) { 156 $image_size = array(80, 80); 157 } 158 142 159 // get correct image path 143 160 $image_path = str_replace( WP_CONTENT_URL, WP_CONTENT_DIR, $image); … … 145 162 // resize image 146 163 if ( file_exists($image_path) && $this->is_image($image_path) ) { 147 $resized = image_resize( $image_path, 80, 80, true); 148 164 $resized = image_resize( $image_path, $image_size[0], $image_size[1], true); 165 166 // resize worked 149 167 if ( ! is_wp_error( $resized ) ) { 150 168 $image = str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, $resized); 151 169 152 return "<img src='{$image}' alt='' width='80' height='80' />"; 153 } 154 155 return $resized->get_error_message(); 170 return "<img src='{$image}' alt='' width='{$image_size[0]}' height='{$image_size[1]}' />"; 171 } 172 173 // resizing failed so let's return full image with maxed dimensions 174 else { 175 return "<img src='{$image}' alt='' style='max-width:{$image_size[0]}px;max-height:{$image_size[1]}px' />"; 176 } 156 177 } 157 178 -
codepress-admin-columns/trunk/classes/values/posts.php
r587696 r601892 191 191 break; 192 192 193 // Before More Tag 194 case "column-before-moretag" : 195 $p = get_post($post_id); 196 $extended = get_extended($p->post_content); 197 198 if ( !empty($extended['extended']) ) { 199 $result = $this->get_shortened_string($extended['main'], $this->excerpt_length ); 200 } 201 break; 202 193 203 default : 194 204 $result = ''; -
codepress-admin-columns/trunk/codepress-admin-columns.php
r600963 r601892 1 1 <?php 2 2 /* 3 3 4 Plugin Name: Codepress Admin Columns 4 Version: 1.4.6. 35 Version: 1.4.6.4 5 6 Description: Customise columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface. 6 7 Author: Codepress … … 27 28 */ 28 29 29 define( 'CPAC_VERSION', '1.4.6. 3' );30 define( 'CPAC_VERSION', '1.4.6.4' ); 30 31 define( 'CPAC_TEXTDOMAIN', 'codepress-admin-columns' ); 31 32 define( 'CPAC_SLUG', 'codepress-admin-columns' ); … … 966 967 */ 967 968 private function get_wp_default_posts_columns($post_type = 'post') 968 { 969 global $current_screen; 970 969 { 971 970 // some plugins depend on settings the $_GET['post_type'] variable such as ALL in One SEO 972 971 $_GET['post_type'] = $post_type; … … 979 978 $columns = get_column_headers( 'edit-'.$post_type ); 980 979 981 // get default columns 982 if ( empty($columns) && isset($current_screen)) {980 // get default columns 981 if ( empty($columns) ) { 983 982 984 983 // deprecated as of wp3.3 … … 998 997 // we need to change the current screen 999 998 global $current_screen; 999 1000 // save original 1000 1001 $org_current_screen = $current_screen; 1001 1002 1003 // prevent php warning 1004 if ( !isset($current_screen) ) $current_screen = new stdClass; 1005 1002 1006 // overwrite current_screen global with our post type of choose... 1003 1007 $current_screen->post_type = $post_type; … … 1008 1012 // reset current screen 1009 1013 $current_screen = $org_current_screen; 1014 1010 1015 } 1011 1016 … … 1087 1092 */ 1088 1093 private function get_wp_default_media_columns() 1089 { 1090 global $current_screen; 1091 1094 { 1092 1095 // @todo could use _get_list_table('WP_Media_List_Table') ? 1093 1096 if ( file_exists(ABSPATH . 'wp-admin/includes/class-wp-list-table.php') ) … … 1096 1099 require_once(ABSPATH . 'wp-admin/includes/class-wp-media-list-table.php'); 1097 1100 1098 if ( !isset($current_screen) ) 1099 return false; 1100 1101 global $current_screen; 1102 1101 1103 // save original 1102 1104 $org_current_screen = $current_screen; 1105 1106 // prevent php warning 1107 if ( !isset($current_screen) ) $current_screen = new stdClass; 1103 1108 1104 1109 // overwrite current_screen global with our media id... … … 1163 1168 */ 1164 1169 private function get_wp_default_comments_columns() 1165 { 1166 global $current_screen; 1167 1170 { 1168 1171 // dependencies 1169 1172 if ( file_exists(ABSPATH . 'wp-admin/includes/class-wp-list-table.php') ) … … 1172 1175 require_once(ABSPATH . 'wp-admin/includes/class-wp-comments-list-table.php'); 1173 1176 1174 if ( !isset($current_screen) )1175 return false; 1176 1177 global $current_screen; 1178 1179 // save original 1177 1180 $org_current_screen = $current_screen; 1181 1182 // prevent php warning 1183 if ( !isset($current_screen) ) $current_screen = new stdClass; 1178 1184 1179 1185 // overwrite current_screen global with our media id... … … 1312 1318 'label' => __('Display Author As', CPAC_TEXTDOMAIN), 1313 1319 'display_as' => '' 1320 ), 1321 'column-before-moretag' => array( 1322 'label' => __('Before More Tag', CPAC_TEXTDOMAIN) 1314 1323 ) 1315 1324 ); … … 2016 2025 { 2017 2026 global $current_screen; 2018 2027 2019 2028 // we dont need the 'edit-' part 2020 2029 $screen = str_replace('edit-', '', $current_screen->id); -
codepress-admin-columns/trunk/readme.txt
r600978 r601892 4 4 Tags: plugins, wordpress, admin, column, columns, custom columns, custom fields, image, dashboard, sortable, filters, posts, media, users, pages, posttypes, manage columns, wp-admin 5 5 Requires at least: 3.1 6 Tested up to: 3.4 7 Stable tag: 1.4.6. 36 Tested up to: 3.4.2 7 Stable tag: 1.4.6.4 8 8 9 9 Customise columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface. … … 37 37 * Last Modified 38 38 * Comment count 39 * Before More Tag Content 39 40 * Custom Fields 40 41 … … 169 170 ` 170 171 171 **my already uploaded images have a wrong size** 172 **my columns thumbnails still have the wrong size** 173 172 174 If you want your already uploaded images to display the newly added size you will need to regenerate the thumbnail for them. Use this plugin to generate the newly added sized thumbnails: http://wordpress.org/extend/plugins/regenerate-thumbnails/. 173 175 … … 202 204 Filter explained: 203 205 204 * **$value** is the or gignal value which would otherwise be displayed206 * **$value** is the original value which would otherwise be displayed 205 207 * **$internal_field_key** is only used internally to store the column 206 208 * **$custom_field** is the name of your custom field … … 232 234 ` 233 235 234 235 236 == Screenshots == 236 237 … … 244 245 245 246 == Changelog == 247 248 = 1.4.6.4 = 249 * Added 'before more tag' column, which will show the content which is placed before the more-tag 250 * bug fix: file images will now also be displayed when they can not be resized. 251 * bug fix: the checkbox disappeared when resetting columns and resaving them. 246 252 247 253 = 1.4.6.3 =
Note: See TracChangeset
for help on using the changeset viewer.