PageRenderTime 17ms CodeModel.GetById 11ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/google-analytics-for-wordpress/includes/admin/settings/tab-status.php

https://bitbucket.org/carloskikea/helpet
PHP | 53 lines | 27 code | 4 blank | 22 comment | 4 complexity | 4581670505ea200ddfe42834af928637 MD5 | raw file
 1<?php
 2/**
 3 * Status Tab.
 4 *
 5 * @since 6.1.0
 6 *
 7 * @package MonsterInsights
 8 * @subpackage Settings
 9 * @author  Chris Christoff
10 */
11
12// Exit if accessed directly
13if ( ! defined( 'ABSPATH' ) ) {
14    exit;
15}
16
17/**
18 * Callback for displaying the UI for support tab.
19 *
20 * @since 6.1.0
21 * @access public
22 *
23 * @return void
24 */
25function monsterinsights_settings_status_tab() {
26    ?>
27    <div id="monsterinsights-settings-general">
28        <?php 
29        ?>
30        <?php //Status page coming soon. ?>
31        <!-- <hr /> -->
32    </div>
33    <?php
34}
35add_action( 'monsterinsights_tab_settings_status', 'monsterinsights_settings_status_tab' );
36
37
38/**
39 * Output System Info file
40 */
41function monsterinsights_system_info() {
42    if ( ! empty( $_REQUEST['monsterinsights-action'] ) && $_REQUEST['monsterinsights-action'] === 'download_sysinfo' ) {
43        if ( ! current_user_can( 'monsterinsights_save_settings' ) ) {
44            return;
45        }
46        nocache_headers();
47        header( 'Content-Type: text/plain' );
48        header( 'Content-Disposition: attachment; filename="monsterinsights-system-info.txt"' );
49        echo wp_strip_all_tags( $_POST['monsterinsights-sysinfo'] );
50        die();
51    }
52}
53//add_action( 'admin_init',  'monsterinsights_system_info'  );