Merged in feature/Plugin-updates (pull request #19)
Updated plugins * Updated plugins
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,118 +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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
<?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,3 +1,6 @@
|
||||
v2.7.13
|
||||
# Fix: FAQ block not loading in the editor.
|
||||
|
||||
v2.7.12
|
||||
# Improvement: Added Timezone setting field to Event schema for Online events and added timezone offset to date properties.
|
||||
# Improvement: Compatibility with WordPress VIP Go rules.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
* Author: Brainstorm Force
|
||||
* Author URI: https://www.brainstormforce.com
|
||||
* Description: Schema Pro is the go-to plugin to adding Schema Markup on your website with ease. Enables you to display rich snippets on search engines and improve your overall page SEO.
|
||||
* Version: 2.7.12
|
||||
* Version: 2.7.13
|
||||
* Text Domain: wp-schema-pro
|
||||
* License: GPL2
|
||||
*
|
||||
@@ -70,7 +70,7 @@ define( 'BSF_AIOSRS_PRO_FILE', __FILE__ );
|
||||
define( 'BSF_AIOSRS_PRO_BASE', plugin_basename( BSF_AIOSRS_PRO_FILE ) );
|
||||
define( 'BSF_AIOSRS_PRO_DIR', plugin_dir_path( BSF_AIOSRS_PRO_FILE ) );
|
||||
define( 'BSF_AIOSRS_PRO_URI', plugins_url( '/', BSF_AIOSRS_PRO_FILE ) );
|
||||
define( 'BSF_AIOSRS_PRO_VER', '2.7.12' );
|
||||
define( 'BSF_AIOSRS_PRO_VER', '2.7.13' );
|
||||
define( 'BSF_AIOSRS_PRO_CACHE_KEY', 'wp_schema_pro_optimized_structured_data' );
|
||||
define( 'BSF_AIOSRS_PRO_WEBSITE_URL', 'https://wpschema.com/' );
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -216,9 +216,19 @@ class BSF_SP_Init_Blocks {
|
||||
* Get the SVG icons.
|
||||
*/
|
||||
private function get_svg_icons() {
|
||||
ob_start();
|
||||
file_get_contents( BSF_AIOSRS_PRO_DIR . 'wpsp-config/controls/WPSPIcon.json' );
|
||||
return json_decode( ob_get_clean(), true );
|
||||
|
||||
$file_path = BSF_AIOSRS_PRO_DIR . 'wpsp-config/controls/WPSPIcon.json';
|
||||
|
||||
// Check if the file exists before attempting to read it.
|
||||
if ( file_exists( $file_path ) ) {
|
||||
$file_content = file_get_contents( $file_path );
|
||||
|
||||
// Check if file_get_contents was successful.
|
||||
if ( $file_content !== false ) {
|
||||
// Parse JSON content.
|
||||
return json_decode( $file_content, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user