replyToLoadTab()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 9
rs 10
c 0
b 0
f 0
cc 1
ccs 0
cts 8
cp 0
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * Admin Page Framework Loader
4
 *
5
 * Demonstrates the usage of Admin Page Framework.
6
 *
7
 * http://admin-page-framework.michaeluno.jp/
8
 * Copyright (c) 2013-2022, Michael Uno; Licensed GPLv2
9
 *
10
 */
11
12
/**
13
 * Adds a tab of the set page to the loader plugin.
14
 *
15
 * @since       3.5.0
16
 */
17
class AdminPageFrameworkLoader_AdminPage_Help_Debug extends AdminPageFrameworkLoader_AdminPage_Tab_Base {
18
19
    /**
20
     * Triggered when the tab is loaded.
21
     */
22
    public function replyToLoadTab( $oAdminPage ) {
23
24
        $oAdminPage->addSettingFIeld(
25
            array(
26
                'field_id'  => 'reset',
27
                'type'      => 'submit',
28
                'reset'     => true,
29
                'show_title_column' => false,
30
                'value'     => __( 'Reset', 'admin-page-framework-loader' ),
31
            )
32
        );
33
    }
34
35
    public function replyToDoTab( $oFactory ) {
36
37
        echo "<h3>" . __( 'Saved Options', 'admin-page-framework-loader' ) . "</h3>";
38
        $oFactory->oDebug->dump( $oFactory->oProp->aOptions );
39
40
    }
41
42
}
43