C:\xampp\htdocs\landing\wp-content\plugins\totalpoll\src\Admin\Dashboard\Page.php


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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php

namespace TotalPoll\Admin\Dashboard;
defined'ABSPATH' ) && exit();


use 
TotalPollVendors\TotalCore\Admin\Pages\Page as TotalCoreAdminPage;
use 
TotalPollVendors\TotalCore\Contracts\Admin\Account;
use 
TotalPollVendors\TotalCore\Contracts\Admin\Activation;
use 
TotalPollVendors\TotalCore\Contracts\Http\Request;

/**
 * Class Page
 * @package TotalPoll\Admin\Dashboard
 */
class Page extends TotalCoreAdminPage {
    
/**
     * @var Activation $activation
     */
    
protected $activation;
    
/**
     * @var Account $activation
     */
    
protected $account;

    
/**
     * Page constructor.
     *
     * @param Request    $request
     * @param array      $env
     * @param Activation $activation
     * @param Account    $account
     */
    
public function __constructRequest $request$envActivation $activationAccount $account ) {
        
parent::__construct$request$env );
        
$this->activation $activation;
        
$this->account    $account;
    }

    
/**
     * Page assets.
     */
    
public function assets() {
        
/**
         * @asset-script totalpoll-admin-dashboard
         */
        
wp_enqueue_script'totalpoll-admin-dashboard' );
        
/**
         * @asset-style totalpoll-admin-dashboard
         */
        
wp_enqueue_style'totalpoll-admin-dashboard' );

        
// Tweets preset
        
$tweets = [
            
'I\'m happy with #TotalPoll plugin for #WordPress! https://totalsuite.net/product/totalpoll/?utm_source=in-app&utm_medium=twitter&utm_campaign=totalpoll',
            
'#TotalPoll is a powerful plugin for #WordPress. https://totalsuite.net/product/totalpoll/?utm_source=in-app&utm_medium=twitter&utm_campaign=totalpoll',
            
'#TotalPoll is one of the best poll plugins for #WordPress out there. https://totalsuite.net/product/totalpoll/?utm_source=in-app&utm_medium=twitter&utm_campaign=totalpoll',
            
'You\'re looking for a poll plugin for #WordPress? You should give #TotalPoll a try. https://totalsuite.net/product/totalpoll/?utm_source=in-app&utm_medium=twitter&utm_campaign=totalpoll',
            
'I recommend #TotalPoll plugin for #WordPress webmasters. https://totalsuite.net/product/totalpoll/?utm_source=in-app&utm_medium=twitter&utm_campaign=totalpoll',
            
'Check out #TotalPoll, a powerful poll plugin for #WordPress. https://totalsuite.net/product/totalpoll/?utm_source=in-app&utm_medium=twitter&utm_campaign=totalpoll',
            
'Create closed contests and public polls easily with #TotalPoll for #WordPress. https://totalsuite.net/product/totalpoll/?utm_source=in-app&utm_medium=twitter&utm_campaign=totalpoll',
            
'Run a debate easily on your #WordPress powered website using #TotalPoll. https://totalsuite.net/product/totalpoll/?utm_source=in-app&utm_medium=twitter&utm_campaign=totalpoll',
            
'Boost user engagement with your website using #TotalPoll plugin for #WordPress https://totalsuite.net/product/totalpoll/?utm_source=in-app&utm_medium=twitter&utm_campaign=totalpoll',
        ];
        
// Support
        
$support = [
            
'sections' => [
                [
                    
'title'       => 'Basics',
                    
'description' => 'The basics of TotalPoll',
                    
'url'         => '#',
                    
'links'       => [
                        [ 
'url' => 'https://totalsuite.net/documentation/totalpoll/basics/create-first-poll-using-totalpoll-for-wordpress/?utm_source=in-app&utm_medium=support-tab&utm_campaign=totalpoll''title' => 'Create your first poll' ],
                        [ 
'url' => 'https://totalsuite.net/documentation/totalpoll/basics/adding-poll-questions-choices-totalpoll-wordpress/?utm_source=in-app&utm_medium=support-tab&utm_campaign=totalpoll''title' => 'Adding questions and choices' ],
                        [ 
'url' => 'https://totalsuite.net/documentation/totalpoll/basics/custom-fields-basics-totalpoll-wordpress/?utm_source=in-app&utm_medium=support-tab&utm_campaign=totalpoll''title' => 'Custom fields basics' ],
                    ],
                ],
                [
                    
'title'       => 'Advanced',
                    
'description' => 'Do more with TotalPoll',
                    
'url'         => '#',
                    
'links'       => [
                        [ 
'url' => 'https://totalsuite.net/documentation/totalpoll/advanced/supported-drag-drop-operations-totalpoll/?utm_source=in-app&utm_medium=support-tab&utm_campaign=totalpoll''title' => 'Supported drag and drop operations' ],
                        [ 
'url' => 'https://totalsuite.net/documentation/totalpoll/advanced/reorganizing-poll-content/?utm_source=in-app&utm_medium=support-tab&utm_campaign=totalpoll''title' => 'Voting frequency' ],
                        [ 
'url' => 'https://totalsuite.net/documentation/totalpoll/advanced/vote-limitations-frequency-settings/?utm_source=in-app&utm_medium=support-tab&utm_campaign=totalpoll''title' => 'Vote limitations' ],
                    ],
                ],
            ],
        ];
        
wp_localize_script'totalpoll-admin-dashboard''TotalPollPresets', [ 'tweets' => $tweets ] );
        
wp_localize_script'totalpoll-admin-dashboard''TotalPollActivation'$this->activation->toArray() );
        
wp_localize_script'totalpoll-admin-dashboard''TotalPollAccount'$this->account->toArray() );
        
wp_localize_script'totalpoll-admin-dashboard''TotalPollSupport'$support );
    }

    
/**
     * Page content.
     */
    
public function render() {
        include 
__DIR__ '/views/index.php';
    }
}
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586