Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: updated the tested up to tag. #79

Merged
merged 4 commits into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
**Tags:** full width, fullwidth, template, beaver builder, elementor, genesis, primer, full width template, remove sidebar, page builder
**Donate link:** https://www.paypal.me/BrainstormForce
**Requires at least:** 4.2
**Tested up to:** 5.4
**Stable tag:** 1.1.0
**Tested up to:** 5.5
**Stable tag:** 1.1.1
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -85,6 +85,10 @@ Check Screenshots for more details.
5. Blank - No Header / Footer Template

## Changelog ##

### 1.1.1 ###
- Fix: Fixed compatibility with other plugins with respect to the admin notice.

### 1.1.0 ###
- New: Users can now share non-personal usage data to help us test and develop better products. ( <a href="https://store.brainstormforce.com/usage-tracking/?utm_source=changelog&utm_medium=readme&utm_campaign=usage_tracking" target="_blank" rel="noopener">Know More</a> )

Expand Down
1 change: 1 addition & 0 deletions admin/bsf-analytics/assets/css/minified/style-rtl.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion admin/bsf-analytics/assets/css/minified/style.min-rtl.css

This file was deleted.

2 changes: 1 addition & 1 deletion admin/bsf-analytics/assets/css/minified/style.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions admin/bsf-analytics/assets/css/unminified/style-rtl.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#bsf-optin-notice {
[ID*="-optin-notice"] {
padding: 1px 12px;
border-right-color: #007cba;
}

#bsf-optin-notice .notice-container {
[ID*="-optin-notice"] .notice-container {
padding-top: 10px;
padding-bottom: 12px;
}

#bsf-optin-notice .notice-content {
[ID*="-optin-notice"] .notice-content {
margin: 0;
}

#bsf-optin-notice .notice-heading {
[ID*="-optin-notice"] .notice-heading {
padding: 0 0 12px 20px;
}

#bsf-optin-notice .button-primary {
[ID*="-optin-notice"] .button-primary {
margin-left: 5px;
}
10 changes: 5 additions & 5 deletions admin/bsf-analytics/assets/css/unminified/style.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#bsf-optin-notice {
[ID*="-optin-notice"] {
padding: 1px 12px;
border-left-color: #007cba;
}

#bsf-optin-notice .notice-container {
[ID*="-optin-notice"] .notice-container {
padding-top: 10px;
padding-bottom: 12px;
}

#bsf-optin-notice .notice-content {
[ID*="-optin-notice"] .notice-content {
margin: 0;
}

#bsf-optin-notice .notice-heading {
[ID*="-optin-notice"] .notice-heading {
padding: 0 20px 12px 0;
}

#bsf-optin-notice .button-primary {
[ID*="-optin-notice"] .button-primary {
margin-right: 5px;
}
118 changes: 118 additions & 0 deletions admin/bsf-analytics/class-bsf-analytics-loader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?php
/**
* BSF analytics loader file.
*
* @version 1.0.0
*
* @package bsf-analytics
*/

if ( ! defined( 'ABSPATH' ) ) {
exit();
}

/**
* Class BSF_Analytics_Loader.
*/
class BSF_Analytics_Loader {

/**
* Analytics Entities.
*
* @access private
* @var array Entities array.
*/
private $entities = array();

/**
* Analytics Version.
*
* @access private
* @var float analytics version.
*/
private $analytics_version = '';

/**
* Analytics path.
*
* @access private
* @var string path array.
*/
private $analytics_path = '';

/**
* Instance
*
* @access private
* @var object Class object.
*/
private static $instance = null;

/**
* Get instace of class.
*
* @return object
*/
public static function get_instance() {
if ( null === self::$instance ) {
self::$instance = new self();
}

return self::$instance;
}

/**
* Constructor
*/
public function __construct() {
add_action( 'init', array( $this, 'load_analytics' ) );
}

/**
* Set entity for analytics.
*
* @param string $data Entity attributes data.
* @return void
*/
public function set_entity( $data ) {
array_push( $this->entities, $data );
}

/**
* Load Analytics library.
*
* @return void
*/
public function load_analytics() {
$unique_entities = array();

if ( ! empty( $this->entities ) ) {
foreach ( $this->entities as $entity ) {
foreach ( $entity as $key => $data ) {

if ( isset( $data['path'] ) ) {
if ( file_exists( $data['path'] . '/version.json' ) ) {
$file_contents = file_get_contents( $data['path'] . '/version.json' ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
$analytics_version = json_decode( $file_contents, 1 );
$analytics_version = $analytics_version['bsf-analytics-ver'];

if ( version_compare( $analytics_version, $this->analytics_version, '>' ) ) {
$this->analytics_version = $analytics_version;
$this->analytics_path = $data['path'];
}
}
}

if ( ! isset( $unique_entities[ $key ] ) ) {
$unique_entities[ $key ] = $data;
}
}
}

if ( file_exists( $this->analytics_path ) && ! class_exists( 'BSF_Analytics' ) ) {
require_once $this->analytics_path . '/class-bsf-analytics.php';
new BSF_Analytics( $unique_entities, $this->analytics_path, $this->analytics_version );
}
}
}
}
1 change: 0 additions & 1 deletion admin/bsf-analytics/class-bsf-analytics-stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ private function get_curl_ssl_version() {
* @since 1.0.0
*/
private function get_curl_version() {
$curl = array();
if ( function_exists( 'curl_version' ) ) {
$curl = curl_version(); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_version
}
Expand Down
Loading