'product', 'page' => 'studiou-fpp-summary', ); if ($current_status) $filter_state['status'] = $current_status; if ($current_product) $filter_state['product_id'] = $current_product; if ($current_order) $filter_state['order_id'] = $current_order; if ($current_search) $filter_state['s'] = $current_search; /** * Produce a cell for a sortable column: toggles asc/desc and preserves filters. */ $sort_header = function ($column_key, $label) use ($filter_state, $current_orderby, $current_order_dir) { $is_active = ($current_orderby === $column_key); $next_dir = ($is_active && $current_order_dir === 'ASC') ? 'DESC' : 'ASC'; if ($is_active && $current_order_dir === 'DESC') { // If currently DESC, next click should flip to ASC $next_dir = 'ASC'; } elseif (!$is_active) { // Fresh click on a non-active column defaults to DESC for date/order, ASC feels odd $next_dir = ($column_key === 'created_at' || $column_key === 'order_id') ? 'DESC' : 'ASC'; } $args = $filter_state; $args['orderby'] = $column_key; $args['order'] = $next_dir; $url = add_query_arg($args, admin_url('edit.php')); $th_class = 'manage-column column-' . esc_attr($column_key) . ' sortable '; if ($is_active) { $th_class .= 'sorted ' . strtolower($current_order_dir); } else { $th_class .= 'desc'; } ?>

attachment_id); $thumb = wp_get_attachment_image_src($record->attachment_id, 'thumbnail'); $thumb_url = $thumb ? $thumb[0] : wp_mime_type_icon($record->attachment_id); $product_title = get_the_title($record->product_id); $customer_name = ''; if ($record->customer_id > 0) { $user = get_userdata($record->customer_id); $customer_name = $user ? $user->display_name : '#' . $record->customer_id; } else { $customer_name = __('Guest', 'studiou-wc-free-photo-product'); } $order_link = ''; if ($record->order_id > 0) { $order_url = Studiou_WC_FPP_Admin::get_order_edit_url($record->order_id); $order_link = '#' . esc_html($record->order_id) . ''; } else { $order_link = ''; } // Download URL that also marks file as downloaded $download_url = add_query_arg(array( 'studiou_fpp_download_file' => 1, 'file_record_id' => $record->id, 'attachment_id' => $record->attachment_id, '_wpnonce' => wp_create_nonce('studiou-fpp-download-file'), ), admin_url('admin.php')); ?>
file_name); ?> file_name); ?> created_at))); ?>
1) : ?>
add_query_arg('paged', '%#%', admin_url('edit.php?' . http_build_query($pagination_args))), 'format' => '', 'current' => $current_page, 'total' => $total_pages, 'prev_text' => '«', 'next_text' => '»', )); if ($pagination) { echo $pagination; } ?>