Changeset 1856861
- Timestamp:
- 04/12/2018 02:56:55 AM (8 years ago)
- Location:
- import-youtube-by-northwoods-digital/trunk
- Files:
-
- 3 edited
-
import-youtube-nwdigital.php (modified) (2 diffs)
-
includes/youtube-create-from-list.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
import-youtube-by-northwoods-digital/trunk/import-youtube-nwdigital.php
r1854704 r1856861 6 6 * Author URI: https://northwoodsdigital.com 7 7 * Description: Import YouTube videos as posts with ease! An advanced plugin to create posts by importing YouTube videos as posts or video post type via the YouTube API v3. 8 * Version: 1.0. 28 * Version: 1.0.3 9 9 * Text Domain: import-youtube-nwdigital 10 10 * License: GPLv2 or later … … 154 154 } 155 155 156 // Add Featured Image URL to Rest API Json Response 156 /** 157 * Add Custom Columns to the custom post type screen 158 **/ 159 add_filter( 'manage_edit-yih4-video_columns', 'edit_yih4_video_columns' ) ; 160 function edit_yih4_video_columns( $columns ) { 161 $columns = array( 162 'cb' => '<input type="checkbox" />', 163 'title' => __( 'Video' ), 164 'author' => __( 'Author' ), 165 'categories' => __( 'Categories' ), 166 'tags' => __( 'Tags' ), 167 'comments' => '<span class="vers comment-grey-bubble" title="' . esc_attr__( 'Comments' ) . '"><span class="screen-reader-text">' . __( 'Comments' ) . '</span></span>', 168 'updated' => __( 'Last Update' ), 169 'date' => __( 'Date' ) 170 ); 171 return $columns; 172 } 173 174 add_action( 'manage_yih4-video_posts_custom_column', 'yih4_video_column_content', 10, 2 ); 175 function yih4_video_column_content( $column_name, $post_id ) { 176 if ( 'updated' != $column_name ) 177 return; 178 //Get number of slices from post meta 179 $yih4_updated_date = get_post_meta( $post_id, '_yih4_updated_date', true ); 180 $yih4_updated_time = get_post_meta( $post_id, '_yih4_updated_time', true ); 181 if ( empty( $yih4_updated_date ) ) 182 echo __( 'Never' ); 183 else 184 echo esc_html($yih4_updated_date) . '<br>' . esc_html($yih4_updated_time); 185 } 186 187 add_filter( 'manage_edit-yih4-video_sortable_columns', 'sortable_yih4_video_column' ); 188 function sortable_yih4_video_column( $columns ) { 189 $columns['updated'] = 'updated'; 190 191 //To make a column 'un-sortable' remove it from the array 192 //unset($columns['date']); 193 194 return $columns; 195 } 196 197 /** 198 * Add Featured Image URL to Rest API Json Response 199 **/ 157 200 $options3 = get_option( 'yih4_nwd_tab_settings_3' ); 158 201 if(!empty($options3['yih4_tab_option_2'])){ -
import-youtube-by-northwoods-digital/trunk/includes/youtube-create-from-list.php
r1854704 r1856861 195 195 }; 196 196 } else /* update post if it already exists */ { 197 198 date_default_timezone_set(get_option('timezone_string')); 199 $yih4_updated_date = date('Y/m/d'); 200 $yih4_updated_time = date('h:i:s A'); 201 197 202 $update_post = array ( 198 203 'ID' => $post->ID, … … 212 217 '_yih4_favoriteCount' => $favoriteCount, 213 218 '_yih4_commentCount' => $commentCount, 219 '_yih4_updated_date' => $yih4_updated_date, 220 '_yih4_updated_time' => $yih4_updated_time, 214 221 ), 215 222 ); -
import-youtube-by-northwoods-digital/trunk/readme.txt
r1854707 r1856861 1 1 === Import YouTube by Northwoods Digital === 2 2 Contributors: mathewemoore 3 Tags: import youtube, import post, youtube, video, video import, youtube import, youtube import post, youtube to post, northwoodsdigital, northwoods digital, nwdigital3 Tags: youtube, videos, import youtube, youtube importer, import video, video importer, youtube to post, google api, youtube api 4 4 Donate link: https://northwoodsdigital.com/donate 5 5 Requires at least: 4.0 6 6 Tested up to: 4.9 7 7 Requires PHP: 7.0 8 Stable tag: 1.0. 28 Stable tag: 1.0.3 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 43 43 == Changelog == 44 44 45 = Version 1.0.2 - 2018-4-8 = 45 = 1.0.3 (11 April 2018) = 46 47 *Changes:* 48 49 * Added new column to the YouTube Video Posts Screen showing last update time and date for use with the update videos bulk action. 50 51 = 1.0.2 (8 April 2018) = 52 53 *Bugs:* 46 54 47 55 * Fixed duplicate thumbnail media when importing previously imported videos and using bulk updater. 48 56 49 = Version 1.0.1 - 2018-4-6 = 57 = 1.0.1 (6 April 2018) = 58 59 *Changes:* 50 60 51 61 * First public release
Note: See TracChangeset
for help on using the changeset viewer.