1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
<?php
namespace TotalPoll\Admin\Entries; ! defined( 'ABSPATH' ) && exit();
use TotalPollVendors\TotalCore\Admin\Pages\Page as TotalCoreAdminPage;
/** * Class Page * @package TotalPoll\Admin\Entries */ class Page extends TotalCoreAdminPage { /** * Page assets. */ public function assets() { /** * @asset-script totalpoll-admin-entries */ wp_enqueue_script( 'totalpoll-admin-entries' ); /** * @asset-style totalpoll-admin-entries */ wp_enqueue_style( 'totalpoll-admin-entries' );
// Some variables for frontend controller wp_localize_script( 'totalpoll-admin-entries', 'TotalPollEntries', [ 'pollId' => $this->request->query( 'poll' ) ] ); }
/** * Page content. */ public function render() { /** * Filters the list of available formats that can be used for export. * * @param array $formats Array of formats [id => label]. * * @since 4.0.0 * @return array */ $formats = apply_filters( 'totalpoll/filters/admin/entries/formats', [ 'html' => __( 'HTML', 'totalpoll' ), 'csv' => __( 'CSV', 'totalpoll' ), 'json' => __( 'JSON', 'totalpoll' ), ] );
include __DIR__ . '/views/index.php'; } }
|