<?php if( !empty( $recent_exports ) ) { ?> <ol> <?php foreach( $recent_exports as $recent_export ) { ?> <li> <p><?php echo $recent_export['name']; ?><?php if( !empty( $recent_export['post_id'] ) && get_post_status( $recent_export['post_id'] ) !== false ) { ?> <a href="<?php echo get_edit_post_link( $recent_export['post_id'] ); ?>">#</a><?php } ?></p> <p><?php echo woo_ce_format_archive_date( $recent_export['post_id'], $recent_export['date'] ); ?>, <?php echo ( !empty( $recent_export['error'] ) ? __( 'error', 'woo_ce' ) . ': <span class="error">' . $recent_export['error'] . '.</span>' : woo_ce_format_archive_method( $recent_export['method'] ) . '.' ); ?></p> </li> <?php } ?> </ol> <?php } else { ?> <p><?php _e( 'Ready for your first scheduled export, shouldn\'t be long now.', 'woo_ce' ); ?> <strong>:)</strong></p> <?php } ?> <p style="text-align:right;"><a href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'archive' ), 'admin.php' ) ); ?>"><?php _e( 'View all archived exports', 'woo_ce' ); ?></a></p>
function woo_ce_get_archive_file( $file = '' ) { $wp_upload_dir = wp_upload_dir(); $file->export_type = get_post_meta( $file->ID, '_woo_export_type', true ); $file->export_type_label = woo_ce_export_type_label( $file->export_type ); if( empty( $file->export_type ) ) $file->export_type = __( 'Unassigned', 'woo_ce' ); if( empty( $file->guid ) ) $file->guid = $wp_upload_dir['url'] . '/' . basename( $file->post_title ); $file->post_mime_type = get_post_mime_type( $file->ID ); if( !$file->post_mime_type ) $file->post_mime_type = __( 'N/A', 'woo_ce' ); $file->media_icon = wp_get_attachment_image( $file->ID, array( 80, 60 ), true ); if( $author_name = get_user_by( 'id', $file->post_author ) ) $file->post_author_name = $author_name->display_name; $file->post_date = woo_ce_format_archive_date( $file->ID ); unset( $author_name, $t_time, $time ); return $file; }
function column_date( $item ) { return woo_ce_format_archive_date( $item->ID ); }