PluginProbe
SEO Engine – Smart SEO with AI, Schema & Redirection for WordPress / trunk
SEO Engine – Smart SEO with AI, Schema & Redirection for WordPress vtrunk
0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 0.8.8 0.8.7 0.8.6 0.8.5 0.8.4 0.8.2 0.8.1 0.7.9 0.8.0 0.7.7 0.7.8 0.7.6 0.7.5 0.7.4 0.7.3 0.7.2 0.7.1 0.7.0 0.6.5 trunk All 87 releases
seo-engine / classes / init.php

init.php in SEO Engine – Smart SEO with AI, Schema & Redirection for WordPress trunk, at classes/init.php

54 lines 2.1 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_MWSEO_Core' ) && class_exists( 'Meow_MWSEO_Core' ) ) {
4 function seo_engine_thanks_admin_notices() {
5 echo '<div class="error"><p>' . __( 'Thanks for installing the Pro version of SEO Engine :) However, the free version is still enabled. Please disable or uninstall it.', 'media-cleaner' ) . '</p></div>';
6 }
7
8 add_action( 'admin_notices', 'seo_engine_thanks_admin_notices' );
9 return;
10 }
11
12 spl_autoload_register(function ( $class ) {
13 try {
14 $file = null;
15 if ( strpos( $class, 'Meow_MWSEO_Modules_' ) !== false ) {
16 $file = MWSEO_PATH . '/classes/modules/' . str_replace( 'meow_mwseo_modules_', '', strtolower( $class ) ) . '.php';
17 }
18 else if ( strpos( $class, 'Meow_MWSEO_Helpers_' ) !== false ) {
19 $file = MWSEO_PATH . '/classes/helpers/' . str_replace( 'meow_mwseo_helpers_', '', strtolower( $class ) ) . '.php';
20 }
21 else if ( strpos( $class, 'Meow_MWSEO_' ) !== false ) {
22 $file = MWSEO_PATH . '/classes/' . str_replace( 'meow_mwseo_', '', strtolower( $class ) ) . '.php';
23 }
24 else if ( strpos( $class, 'MeowKit_MWSEO_' ) !== false ) {
25 $file = MWSEO_PATH . '/common/' . str_replace( 'meowkit_mwseo_', '', strtolower( $class ) ) . '.php';
26 }
27 else if ( strpos( $class, 'MeowKitPro_MWSEO_' ) !== false ) {
28 $file = MWSEO_PATH . '/common/premium/' . str_replace( 'meowkitpro_mwseo_', '', strtolower( $class ) ) . '.php';
29 }
30 else if ( strpos( $class, 'MeowPro_MWSEO_' ) !== false ) {
31 $file = MWSEO_PATH . '/premium/' . str_replace( 'meowpro_mwseo_', '', strtolower( $class ) ) . '.php';
32 }
33 if ( $file ) {
34 if ( !file_exists( $file ) ) {
35 return;
36 }
37 require( $file );
38 }
39 }
40 catch ( Exception $e ) {
41 error_log( 'SEO Engine: ' . $e->getMessage() );
42 }
43 });
44
45 require_once( MWSEO_PATH . '/classes/api.php');
46 require_once( MWSEO_PATH . '/common/helpers.php');
47
48
49 global $SeoEngineCore, $mwseo_readability, $mwseo_score;
50 $SeoEngineCore = new Meow_MWSEO_Core();
51 $mwseo_readability = new Meow_MWSEO_Modules_Readability();
52 $mwseo_score = new Meow_MWSEO_Score( $SeoEngineCore );
53
54 ?>