PluginProbe
Code Engine – PHP Snippets, AI Functions & Automation for WordPress / 0.3.7
Code Engine – PHP Snippets, AI Functions & Automation for WordPress v0.3.7
0.5.6 0.5.5 0.5.4 0.5.3 0.5.2 0.5.1 0.5.0 0.4.9 0.4.8 0.4.7 0.4.6 trunk 0.0.1 0.0.2 0.2.8 0.2.9 0.3.0 0.3.1 0.3.2 0.3.3 0.3.4 0.3.5 0.3.6 0.3.7 0.3.8 All 32 releases
← All changes | classes/init.php +22 -31 0.0.10.3.7 View file →
@@ -1,43 +1,34 @@
1 1 <?php
2 2
3 -if ( ! defined( 'ABSPATH' ) ) exit;
4 -
5 -if ( class_exists( 'MeowPro_CDEGN_Core' ) && class_exists( 'Meow_CDEGN_Core' ) ) {
6 -
7 - function cdegn_thanks_admin_notices() {
8 - $message = esc_html__( 'Thanks for installing the Pro version of Code Engine :) However, the free version is still enabled. Please disable or uninstall it.', 'code-engine' );
9 - echo '<div class="error"><p>' . esc_html( $message ) . '</p></div>';
3 +if ( class_exists( 'MeowPro_MWCODE_Core' ) && class_exists( 'Meow_MWCODE_Core' ) ) {
4 + function mwcode_thanks_admin_notices( )
5 + {
6 + echo '<div class="error"><p>' . __( 'Thanks for installing the Pro version of Code Engine : ) However, the free version is still enabled. Please disable or uninstall it.', 'code-engine' ) . '</p></div>';
10 7 }
11 -
12 - add_action( 'admin_notices', 'cdegn_thanks_admin_notices' );
13 - return;
8 + add_action( 'admin_notices', 'mwcode_thanks_admin_notices' );
9 + return;
14 10 }
15 11
16 -spl_autoload_register(function ( $class ) {
17 - $necessary = true;
12 +spl_autoload_register( function ( $class ) {
18 13 $file = null;
19 - if ( strpos( $class, 'Meow_CDEGN_Snippets' ) !== false ) {
20 - $file = CDEGN_PATH . '/classes/snippets/' . str_replace( 'meow_cdegn_snippets_', '', strtolower( $class ) ) . '.php';
14 + if ( strpos( $class, 'Meow_MWCODE' ) !== false ) {
15 + $file = MWCODE_PATH . '/classes/' . str_replace( 'meow_mwcode_', '', strtolower( $class ) ) . '.php';
21 16 }
22 - else if ( strpos( $class, 'Meow_CDEGN_Models' ) !== false ) {
23 - $file = CDEGN_PATH . '/classes/models/' . str_replace( 'meow_cdegn_models_', '', strtolower( $class ) ) . '.php';
17 + if ( strpos( $class, 'Meow_MWCODE_Modules' ) !== false ) {
18 + $file = MWCODE_PATH . '/classes/modules/' . str_replace( 'meow_mwcode_modules_', '', strtolower( $class ) ) . '.php';
19 + } else if ( strpos( $class, 'MeowCommon_' ) !== false ) {
20 + $file = MWCODE_PATH . '/common/' . str_replace( 'meowcommon_', '', strtolower( $class ) ) . '.php';
21 + } else if ( strpos( $class, 'MeowCommonPro_' ) !== false ) {
22 + $file = MWCODE_PATH . '/common/premium/' . str_replace( 'meowcommonpro_', '', strtolower( $class ) ) . '.php';
23 + } else if ( strpos( $class, 'MeowPro_MWCODE' ) !== false ) {
24 + $file = MWCODE_PATH . '/premium/' . str_replace( 'meowpro_mwcode_', '', strtolower( $class ) ) . '.php';
24 25 }
25 - else if ( strpos( $class, 'Meow_CDEGN' ) !== false ) {
26 - $file = CDEGN_PATH . '/classes/' . str_replace( 'meow_cdegn_', '', strtolower( $class ) ) . '.php';
27 - }
28 - else if ( strpos( $class, 'MeowPro_CDEGN' ) !== false ) {
29 - $necessary = false;
30 - $file = CDEGN_PATH . '/premium/' . str_replace( 'meowpro_cdegn_', '', strtolower( $class ) ) . '.php';
31 - }
32 - if ( $file ) {
33 - if ( !$necessary && !file_exists( $file ) ) {
34 - return;
35 - }
26 + if ( $file && file_exists( $file ) ) {
36 27 require( $file );
37 28 }
38 -});
29 +} );
39 30
40 -global $cdegn_core;
41 -$cdegn_core = new Meow_CDEGN_Core();
31 +require_once( MWCODE_PATH . '/classes/api.php' );
42 32
43 -?>
33 +
34 +