PluginProbe
Code Engine – PHP Snippets, AI Functions & Automation for WordPress / trunk
Code Engine – PHP Snippets, AI Functions & Automation for WordPress vtrunk
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
code-engine / classes / init.php

init.php in Code Engine – PHP Snippets, AI Functions & Automation for WordPress trunk, at classes/init.php

35 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
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>';
7 }
8 add_action( 'admin_notices', 'mwcode_thanks_admin_notices' );
9 return;
10 }
11
12 spl_autoload_register( function ( $class ) {
13 $file = null;
14 if ( strpos( $class, 'Meow_MWCODE' ) !== false ) {
15 $file = MWCODE_PATH . '/classes/' . str_replace( 'meow_mwcode_', '', strtolower( $class ) ) . '.php';
16 }
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, 'MeowKit_MWCODE_' ) !== false ) {
20 $file = MWCODE_PATH . '/common/' . str_replace( 'meowkit_mwcode_', '', strtolower( $class ) ) . '.php';
21 } else if ( strpos( $class, 'MeowKitPro_MWCODE_' ) !== false ) {
22 $file = MWCODE_PATH . '/common/premium/' . str_replace( 'meowkitpro_mwcode_', '', strtolower( $class ) ) . '.php';
23 } else if ( strpos( $class, 'MeowPro_MWCODE' ) !== false ) {
24 $file = MWCODE_PATH . '/premium/' . str_replace( 'meowpro_mwcode_', '', strtolower( $class ) ) . '.php';
25 }
26 if ( $file && file_exists( $file ) ) {
27 require( $file );
28 }
29 } );
30
31 require_once( MWCODE_PATH . '/classes/api.php' );
32
33
34
35