includes/class-freemius.php
private function get_email_sections() {
            // Retrieve the current user's information so that we can get the user's email, first name, and last name below.
            $current_user = self::_get_current_wp_user();

            // Retrieve the cURL version information so that we can get the version number below.
            $curl_version_information = curl_version();

            $active_plugin = self::get_active_plugins();

            // Generate the list of active plugins separated by new line.
            $active_plugin_string = '';
            foreach ( $active_plugin as $plugin ) {
                $active_plugin_string .= sprintf(
                    '<a href="%s">%s</a> [v%s]<br>',
                    $plugin['PluginURI'],
                    $plugin['Name'],
                    $plugin['Version']
                );
            }

            $server_ip = WP_FS__REMOTE_ADDR;

            // Add PHP info for deeper investigation.
            ob_start();
            phpinfo();
            $php_info = ob_get_clean();

            $api_domain = substr( FS_API__ADDRESS, strpos( FS_API__ADDRESS, ':' ) + 3 );

            // Generate the default email sections.
            $sections = array(
                'sdk'      => array(
                    'title' => 'SDK',
                    'rows'  => array(
                        'fs_version'   => array( 'FS Version', $this->version ),
                        'curl_version' => array( 'cURL Version', $curl_version_information['version'] )
                    )
                ),
                'plugin'   => array(
                    'title' => ucfirst( $this->get_module_type() ),
                    'rows'  => array(
                        'name'    => array( 'Name', $this->get_plugin_name() ),
                        'version' => array( 'Version', $this->get_plugin_version() )
                    )
                ),
                'api'      => array(
                    'title' => 'API Subdomain',
                    'rows'  => array(
                        'dns' => array(
                            'DNS_CNAME',
                            function_exists( 'dns_get_record' ) ?
                                var_export( dns_get_record( $api_domain, DNS_CNAME ), true ) :
                                'dns_get_record() disabled/blocked'
                        ),
                        'ip'  => array(
                            'IP',
                            function_exists( 'gethostbyname' ) ?
                                gethostbyname( $api_domain ) :
                                'gethostbyname() disabled/blocked'
                        ),
                    ),
                ),
                'site'     => array(
                    'title' => 'Site',
                    'rows'  => array(
                        'unique_id'   => array( 'Unique ID', $this->get_anonymous_id() ),
                        'address'     => array( 'Address', site_url() ),
                        'host'        => array(
                            'HTTP_HOST',
                            ( ! empty( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : '' )
                        ),
                        'hosting'     => array(
                            'Hosting Company' => fs_request_has( 'hosting_company' ) ?
                                fs_request_get( 'hosting_company' ) :
                                'Unknown',
                        ),
                        'server_addr' => array(
                            'SERVER_ADDR',
                            '<a href="http://www.projecthoneypot.org/ip_' . $server_ip . '">' . $server_ip . '</a>'
                        )
                    )
                ),
                'user'     => array(
                    'title' => 'User',
                    'rows'  => array(
                        'email' => array( 'Email', $current_user->user_email ),
                        'first' => array( 'First', $current_user->user_firstname ),
                        'last'  => array( 'Last', $current_user->user_lastname )
                    )
                ),
                'plugins'  => array(
                    'title' => 'Plugins',
                    'rows'  => array(
                        'active_plugins' => array( 'Active Plugins', $active_plugin_string )
                    )
                ),
                'php_info' => array(
                    'title' => 'PHP Info',
                    'rows'  => array(
                        'info' => array( $php_info )
                    ),
                )
            );

            // Allow the sections to be modified by other code.
            $sections = $this->apply_filters( 'email_template_sections', $sections );

            return $sections;
        }
private function get_email_sections() {
            // Retrieve the current user's information so that we can get the user's email, first name, and last name below.
            $current_user = self::_get_current_wp_user();

            // Retrieve the cURL version information so that we can get the version number below.
            $curl_version_information = curl_version();

            $active_plugin = self::get_active_plugins();

            // Generate the list of active plugins separated by new line.
            $active_plugin_string = '';
            foreach ( $active_plugin as $plugin ) {
                $active_plugin_string .= sprintf(
                    '<a href="%s">%s</a> [v%s]<br>',
                    $plugin['PluginURI'],
                    $plugin['Name'],
                    $plugin['Version']
                );
            }

            $server_ip = WP_FS__REMOTE_ADDR;

            // Add PHP info for deeper investigation.
            ob_start();
            phpinfo();
            $php_info = ob_get_clean();

            $api_domain = substr( FS_API__ADDRESS, strpos( FS_API__ADDRESS, ':' ) + 3 );

            // Generate the default email sections.
            $sections = array(
                'sdk'      => array(
                    'title' => 'SDK',
                    'rows'  => array(
                        'fs_version'   => array( 'FS Version', $this->version ),
                        'curl_version' => array( 'cURL Version', $curl_version_information['version'] )
                    )
                ),
                'plugin'   => array(
                    'title' => ucfirst( $this->get_module_type() ),
                    'rows'  => array(
                        'name'    => array( 'Name', $this->get_plugin_name() ),
                        'version' => array( 'Version', $this->get_plugin_version() )
                    )
                ),
                'api'      => array(
                    'title' => 'API Subdomain',
                    'rows'  => array(
                        'dns' => array(
                            'DNS_CNAME',
                            function_exists( 'dns_get_record' ) ?
                                var_export( dns_get_record( $api_domain, DNS_CNAME ), true ) :
                                'dns_get_record() disabled/blocked'
                        ),
                        'ip'  => array(
                            'IP',
                            function_exists( 'gethostbyname' ) ?
                                gethostbyname( $api_domain ) :
                                'gethostbyname() disabled/blocked'
                        ),
                    ),
                ),
                'site'     => array(
                    'title' => 'Site',
                    'rows'  => array(
                        'unique_id'   => array( 'Unique ID', $this->get_anonymous_id() ),
                        'address'     => array( 'Address', site_url() ),
                        'host'        => array(
                            'HTTP_HOST',
                            ( ! empty( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : '' )
                        ),
                        'hosting'     => array(
                            'Hosting Company' => fs_request_has( 'hosting_company' ) ?
                                fs_request_get( 'hosting_company' ) :
                                'Unknown',
                        ),
                        'server_addr' => array(
                            'SERVER_ADDR',
                            '<a href="http://www.projecthoneypot.org/ip_' . $server_ip . '">' . $server_ip . '</a>'
                        )
                    )
                ),
                'user'     => array(
                    'title' => 'User',
                    'rows'  => array(
                        'email' => array( 'Email', $current_user->user_email ),
                        'first' => array( 'First', $current_user->user_firstname ),
                        'last'  => array( 'Last', $current_user->user_lastname )
                    )
                ),
                'plugins'  => array(
                    'title' => 'Plugins',
                    'rows'  => array(
                        'active_plugins' => array( 'Active Plugins', $active_plugin_string )
                    )
                ),
                'php_info' => array(
                    'title' => 'PHP Info',
                    'rows'  => array(
                        'info' => array( $php_info )
                    ),
                )
            );

            // Allow the sections to be modified by other code.
            $sections = $this->apply_filters( 'email_template_sections', $sections );

            return $sections;
        }
private function get_email_sections ( ) { // Retrieve the current user's information so that we can get the user's email, first name, and last name below.
 $ current_user = self :: _get_current_wp_user ( ) ; // Retrieve the cURL version information so that we can get the version number below.
 $ curl_version_information = curl_version ( ) ; $ active_plugin = self :: get_active_plugins ( ) ; // Generate the list of active plugins separated by new line.
 $ active_plugin_string = '' ; foreach ( $ active_plugin as $ plugin ) { $ active_plugin_string .= sprintf ( '<a href="%s">%s</a> [v%s]<br>' , $ plugin [ 'PluginURI' ] , $ plugin [ 'Name' ] , $ plugin [ 'Version' ] ) ; } $ server_ip = WP_FS__REMOTE_ADDR ; // Add PHP info for deeper investigation.
 ob_start ( ) ; phpinfo ( ) ; $ php_info = ob_get_clean ( ) ; $ api_domain = substr ( FS_API__ADDRESS , strpos ( FS_API__ADDRESS , ':' ) + 3 ) ; // Generate the default email sections.
 $ sections = array ( 'sdk' => array ( 'title' => 'SDK' , 'rows' => array ( 'fs_version' => array ( 'FS Version' , $ this -> version ) , 'curl_version' => array ( 'cURL Version' , $ curl_version_information [ 'version' ] ) ) ) , 'plugin' => array ( 'title' => ucfirst ( $ this -> get_module_type ( ) ) , 'rows' => array ( 'name' => array ( 'Name' , $ this -> get_plugin_name ( ) ) , 'version' => array ( 'Version' , $ this -> get_plugin_version ( ) ) ) ) , 'api' => array ( 'title' => 'API Subdomain' , 'rows' => array ( 'dns' => array ( 'DNS_CNAME' , function_exists ( 'dns_get_record' ) ? var_export ( dns_get_record ( $ api_domain , DNS_CNAME ) , true ) : 'dns_get_record() disabled/blocked' ) , 'ip' => array ( 'IP' , function_exists ( 'gethostbyname' ) ? gethostbyname ( $ api_domain ) : 'gethostbyname() disabled/blocked' ) , ) , ) , 'site' => array ( 'title' => 'Site' , 'rows' => array ( 'unique_id' => array ( 'Unique ID' , $ this -> get_anonymous_id ( ) ) , 'address' => array ( 'Address' , site_url ( ) ) , 'host' => array ( 'HTTP_HOST' , ( ! empty ( $ _SERVER [ 'HTTP_HOST' ] ) ? $ _SERVER [ 'HTTP_HOST' ] : '' ) ) , 'hosting' => array ( 'Hosting Company' => fs_request_has ( 'hosting_company' ) ? fs_request_get ( 'hosting_company' ) : 'Unknown' , ) , 'server_addr' => array ( 'SERVER_ADDR' , '<a href="http://www.projecthoneypot.org/ip_' . $ server_ip . '">' . $ server_ip . '</a>' ) ) ) , 'user' => array ( 'title' => 'User' , 'rows' => array ( 'email' => array ( 'Email' , $ current_user -> user_email ) , 'first' => array ( 'First' , $ current_user -> user_firstname ) , 'last' => array ( 'Last' , $ current_user -> user_lastname ) ) ) , 'plugins' => array ( 'title' => 'Plugins' , 'rows' => array ( 'active_plugins' => array ( 'Active Plugins' , $ active_plugin_string ) ) ) , 'php_info' => array ( 'title' => 'PHP Info' , 'rows' => array ( 'info' => array ( $ php_info ) ) , ) ) ; // Allow the sections to be modified by other code.
 $ sections = $ this -> apply_filters ( 'email_template_sections' , $ sections ) ; return $ sections ; }
Generates the data for the sections of the email content.

@author Leo Fajardo (@leorw)
@since  1.1.2

@return array
Generates the data for the sections of the email content .