-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
86 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,61 @@ | ||
<?php | ||
defined( 'ABSPATH' ) || exit; | ||
|
||
/** | ||
* Plugin Name: CAOS | ||
* Plugin URI: https://daan.dev/wordpress/caos/ | ||
* Description: Completely optimize Google Analytics for your WordPress Website - host analytics.js/gtag.js locally or use Minimal Analytics, bypass Ad Blockers in Stealth Mode, capture outbound links, and much more! | ||
* Version: 4.5.0 | ||
* Author: Daan from Daan.dev | ||
* Author URI: https://daan.dev/ | ||
* License: GPL2v2 or later | ||
* Text Domain: host-analyticsjs-local | ||
*/ | ||
|
||
define( 'CAOS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); | ||
define( 'CAOS_PLUGIN_FILE', __FILE__ ); | ||
define( 'CAOS_PLUGIN_BASENAME', plugin_basename( CAOS_PLUGIN_FILE ) ); | ||
define( 'CAOS_STATIC_VERSION', '4.5.0' ); | ||
define( 'CAOS_DB_VERSION', '4.6.0' ); | ||
|
||
/** | ||
* Takes care of loading classes on demand. | ||
* | ||
* @param $class | ||
* | ||
* @return mixed|void | ||
*/ | ||
function caos_autoload( $class ) { | ||
$path = explode( '_', $class ); | ||
|
||
if ( $path[0] != 'CAOS' ) { | ||
return; | ||
} | ||
|
||
if ( ! class_exists( 'FFWP_Autoloader' ) ) { | ||
require_once CAOS_PLUGIN_DIR . 'ffwp-autoload.php'; | ||
} | ||
|
||
$autoload = new FFWP_Autoloader( $class ); | ||
|
||
return include CAOS_PLUGIN_DIR . 'includes/' . $autoload->load(); | ||
} | ||
|
||
spl_autoload_register( 'caos_autoload' ); | ||
|
||
/** | ||
* All systems GO!!! | ||
* | ||
* @return CAOS | ||
*/ | ||
function caos_init() { | ||
static $caos = null; | ||
|
||
if ( $caos === null ) { | ||
$caos = new CAOS(); | ||
} | ||
|
||
return $caos; | ||
} | ||
|
||
caos_init(); | ||
<?php | ||
/** | ||
* Plugin Name: CAOS | ||
* Plugin URI: https://daan.dev/wordpress/caos/ | ||
* Description: Completely optimize Google Analytics 4 for your WordPress Website - host gtag.js locally or use Minimal Analytics, bypass Ad Blockers in Stealth Mode, and much more! | ||
* Version: 4.6.0 | ||
* Author: Daan from Daan.dev | ||
* Author URI: https://daan.dev/ | ||
* License: GPL2v2 or later | ||
* Text Domain: host-analyticsjs-local | ||
*/ | ||
|
||
defined( 'ABSPATH' ) || exit; | ||
|
||
define( 'CAOS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); | ||
define( 'CAOS_PLUGIN_FILE', __FILE__ ); | ||
define( 'CAOS_PLUGIN_BASENAME', plugin_basename( CAOS_PLUGIN_FILE ) ); | ||
define( 'CAOS_STATIC_VERSION', '4.5.0' ); | ||
define( 'CAOS_DB_VERSION', '4.6.0' ); | ||
|
||
/** | ||
* Takes care of loading classes on demand. | ||
* | ||
* @param $class | ||
* | ||
* @return mixed|void | ||
*/ | ||
function caos_autoload( $class ) { | ||
$path = explode( '_', $class ); | ||
|
||
if ( $path[0] != 'CAOS' ) { | ||
return; | ||
} | ||
|
||
if ( ! class_exists( 'FFWP_Autoloader' ) ) { | ||
require_once CAOS_PLUGIN_DIR . 'ffwp-autoload.php'; | ||
} | ||
|
||
$autoload = new FFWP_Autoloader( $class ); | ||
|
||
return include CAOS_PLUGIN_DIR . 'includes/' . $autoload->load(); | ||
} | ||
|
||
spl_autoload_register( 'caos_autoload' ); | ||
|
||
/** | ||
* All systems GO!!! | ||
* | ||
* @return CAOS | ||
*/ | ||
function caos_init() { | ||
static $caos = null; | ||
|
||
if ( $caos === null ) { | ||
$caos = new CAOS(); | ||
} | ||
|
||
return $caos; | ||
} | ||
|
||
caos_init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters