PluginProbe
Independent Analytics – WordPress Analytics Plugin / 1.27.0
Independent Analytics – WordPress Analytics Plugin v1.27.0
2.15.5 2.15.4 2.15.3 2.15.2 2.15.1 2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 All 120 releases
independent-analytics / IAWP / AJAX / Export_Pages_AJAX.php
Export_Pages_AJAX.php
26 lines 683 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IAWP_SCOPED\IAWP\AJAX;
4
5 use IAWP_SCOPED\IAWP\Capability_Manager;
6 use IAWP_SCOPED\IAWP\Date_Range\Exact_Date_Range;
7 use IAWP_SCOPED\IAWP\Queries\Resources;
8 use IAWP_SCOPED\IAWP\Tables\Table_Pages;
9 class Export_Pages_AJAX extends AJAX
10 {
11 protected function action_name() : string
12 {
13 return 'iawp_export_pages';
14 }
15 protected function action_callback() : void
16 {
17 if (!Capability_Manager::can_edit()) {
18 return;
19 }
20 $resources = new Resources(Exact_Date_Range::comprehensive_range());
21 $table = new Table_Pages();
22 $csv = $table->csv($resources->rows());
23 echo \wp_kses($csv, 'post');
24 }
25 }
26