Completed
Branch FET/10339/exit-modal-for-ee-de... (47597b)
by
unknown
73:42 queued 59:58
created

ExitModal::modalContainer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
namespace EventEspresso\core\domain\services\admin;
3
4
/**
5
 * ExitModal
6
 * Sets up server side logic etc for the exit modal survey triggered when deactivating EE core.
7
 *
8
 * DEVELOPERS: this is a in progress api, do not use this class or rely on its api to remain consistent.
9
 *
10
 * @package EventEspresso\core\domain\services\admin
11
 * @author  Darren Ethier
12
 * @since   $VID:$
13
 */
14
class ExitModal
15
{
16
    /**
17
     * ExitModal constructor.
18
     */
19
    public function __construct()
20
    {
21
        add_action('in_admin_footer', array($this, 'modalContainer'));
22
        add_action('admin_enqueue_scripts', array($this, 'enqueues'));
23
    }
24
25
26
    /**
27
     * Callback on in_admin_footer that is used to output the exit modal container.
28
     */
29
    public function modalContainer()
30
    {
31
        echo '<div id="ee-exit-survey-modal"></div>';
32
    }
33
34
35
    /**
36
     * Callback for `admin_enqueue_scripts` to take care of enqueueing scripts and styles specific to the modal.
37
     */
38
    public function enqueues()
39
    {
40
        wp_enqueue_script('ee-exit-modal-survey');
41
        wp_enqueue_style('ee-exit-modal-survey');
42
    }
43
}