Beispiel #1
0
		<h3 class="hndle"><?php 
_e('Export Details', 'woo_ce');
?>
</h3>
		<div class="inside">

			<table class="widefat" style="font-family:monospace;">
				<tbody>

					<tr>
						<th style="width:20%;"><?php 
_e('Export type', 'woo_ce');
?>
</th>
						<td><?php 
echo woo_ce_export_type_label($export_type);
?>
</td>
					</tr>
					<tr>
						<th><?php 
_e('Filepath', 'woo_ce');
?>
</th>
						<td><?php 
echo $filepath;
?>
</td>
					</tr>
					<tr>
						<th><?php 
<div class="postbox-container">
	<div class="postbox">
		<h3 class="hndle"><?php _e( 'Export Details', 'woo_ce' ); ?></h3>
		<div class="inside">

			<table class="widefat" style="font-family:monospace;">
				<tbody>

					<tr>
						<th style="width:20%;"><?php _e( 'Export type', 'woo_ce' ); ?></th>
						<td><?php echo woo_ce_export_type_label( $export_type ); ?></td>
					</tr>
					<tr>
						<th><?php _e( 'Filepath', 'woo_ce' ); ?></th>
						<td><?php echo $filepath; ?></td>
					</tr>
					<tr>
						<th><?php _e( 'Total columns', 'woo_ce' ); ?></th>
						<td><?php echo ( ( $columns != false ) ? $columns : '-' ); ?></td>
					</tr>
					<tr>
						<th><?php _e( 'Total rows', 'woo_ce' ); ?></th>
						<td><?php echo ( ( $rows != false ) ? $rows : '-' ); ?></td>
					</tr>
					<tr>
						<th><?php _e( 'Process time', 'woo_ce' ); ?></th>
						<td><?php echo ( ( ( $start_time != false ) && ( $end_time != false ) ) ? woo_ce_display_time_elapsed( $start_time, $end_time ) : '-' ); ?></td>
					</tr>
					<tr>
						<th><?php _e( 'Idle memory usage (start)', 'woo_ce' ); ?></th>
						<td><?php echo ( ( $idle_memory_start != false ) ? woo_ce_display_memory( $idle_memory_start ) : '-' ); ?></td>
	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_type( $item ) {

		$export_type = get_post_meta( $item->ID, '_woo_export_type', true );
		$export_type_label = woo_ce_export_type_label( $export_type );
		if( empty( $export_type ) )
			$export_type = __( 'Unassigned', 'woo_ce' );

		return sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( 'filter', $export_type ) ), $export_type_label );

	}
			<th colspan="2"><?php 
_e('Export Details', 'woo_ce');
?>
</th>
		</tr>

	</thead>
	<tbody>

		<tr>
			<th style="width:20%;"><?php 
_e('Dataset', 'woo_ce');
?>
</th>
			<td><?php 
echo woo_ce_export_type_label($dataset);
?>
</td>
		</tr>
		<tr>
			<th><?php 
_e('Filepath', 'woo_ce');
?>
</th>
			<td><?php 
echo $filepath;
?>
</td>
		</tr>
		<tr>
			<th><?php 
Beispiel #6
0
 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);
     $author_name = get_user_by('id', $file->post_author);
     $file->post_author_name = $author_name->display_name;
     $t_time = strtotime($file->post_date, current_time('timestamp'));
     $time = get_post_time('G', true, $file->ID, false);
     if (abs($t_diff = time() - $time) < 86400) {
         $file->post_date = sprintf(__('%s ago'), human_time_diff($time));
     } else {
         $file->post_date = mysql2date(__('Y/m/d'), $file->post_date);
     }
     unset($author_name, $t_time, $time);
     return $file;
 }