Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/flexible-shipping-pro   php

Repository URL to install this package:

Version: 1.11.1 

/ wpdesk / wp-wpdesk-tracker / src / data_provider / class-wpdesk-tracker-data-provider-wordpress.php

<?php

namespace FSProVendor;

/**
 * WP Desk Tracker
 *
 * @class        WPDESK_Tracker
 * @version        1.3.2
 * @package        WPDESK/Helper
 * @category    Class
 * @author        WP Desk
 */
if (!\defined('ABSPATH')) {
    exit;
}
if (!\class_exists('FSProVendor\\WPDesk_Tracker_Data_Provider_Wordpress')) {
    /**
     * Class WPDesk_Tracker_Data_Provider_Wordpress
     */
    class WPDesk_Tracker_Data_Provider_Wordpress implements \WPDesk_Tracker_Data_Provider
    {
        /**
         * Get WordPress related data.
         *
         * @return array Data provided to tracker.
         */
        public function get_data()
        {
            $wp_data = array();
            $memory = \wc_let_to_num(\WP_MEMORY_LIMIT);
            if (\function_exists('memory_get_usage')) {
                $system_memory = \wc_let_to_num(@\ini_get('memory_limit'));
                $memory = \max($memory, $system_memory);
            }
            $wp_data['memory_limit'] = \size_format($memory);
            $wp_data['debug_mode'] = \defined('WP_DEBUG') && \WP_DEBUG ? 'Yes' : 'No';
            $wp_data['locale'] = \get_locale();
            $wp_data['version'] = \get_bloginfo('version');
            $wp_data['multisite'] = \is_multisite() ? 'Yes' : 'No';
            return ['wp' => $wp_data];
        }
    }
}