| @@ -1,25 +1,50 @@ | ||
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | -* Plugin Name: Code Engine | |
| 4 | -* Plugin URI: https://meowapps.com/ai-engine/ | |
| 5 | -* Description: Code Engine helps you manage code snippets from plugins like Code Snippets and WP Code. It checks errors, gathers snippets, and creates JSON for AI models. | |
| 6 | -* Version: 0.0.1 | |
| 7 | -* Author: Meow Apps | |
| 8 | -* Author URI: https://meowapps.com | |
| 9 | -* Text Domain: code-engine | |
| 10 | -* License: GPL v2 or later | |
| 11 | -* License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
| 2 | +/* | |
| 3 | +Plugin Name: Code Engine | |
| 4 | +Plugin URI: https://meowapps.com/code-engine | |
| 5 | +Description: Versatile plugin that not only manages PHP code snippets but also acts as a powerful bridge connecting WordPress, AI, and external digital platforms. | |
| 6 | +Version: 0.3.7 | |
| 7 | +Author: Jordy Meow | |
| 8 | +Author URI: https://meowapps.com | |
| 9 | +Text Domain: code-engine | |
| 10 | + | |
| 11 | +Dual licensed under the MIT and GPL licenses: | |
| 12 | +http://www.opensource.org/licenses/mit-license.php | |
| 13 | +http://www.gnu.org/licenses/gpl.html | |
| 12 | 14 | */ |
| 13 | 15 | |
| 14 | -if ( ! defined( 'ABSPATH' ) ) exit; | |
| 16 | +define( 'MWCODE_VERSION', '0.3.7' ); | |
| 17 | +define( 'MWCODE_PREFIX', 'mwcode' ); | |
| 18 | +define( 'MWCODE_DOMAIN', 'code-engine' ); | |
| 19 | +define( 'MWCODE_ENTRY', __FILE__ ); | |
| 20 | +define( 'MWCODE_PATH', dirname( __FILE__ ) ); | |
| 21 | +define( 'MWCODE_URL', plugin_dir_url( __FILE__ ) ); | |
| 22 | +define( 'MWCODE_ITEM_ID', 23612190 ); | |
| 15 | 23 | |
| 16 | -define( 'CDEGN_VERSION', '0.0.1' ); | |
| 17 | -define( 'CDEGN_PREFIX', 'cdegn' ); | |
| 18 | -define( 'CDEGN_DOMAIN', 'code-engine' ); | |
| 19 | -define( 'CDEGN_ENTRY', __FILE__ ); | |
| 20 | -define( 'CDEGN_PATH', dirname( __FILE__ ) ); | |
| 21 | -define( 'CDEGN_URL', plugin_dir_url( __FILE__ ) ); | |
| 24 | +/** | |
| 25 | + * Define the database schema for Code Engine. | |
| 26 | + * | |
| 27 | + * ⚠️ Don't forget to update the version number when you update the schema. | |
| 28 | + * (mwcode_db_snippet_version) | |
| 29 | + */ | |
| 30 | +define( 'MWCODE_SNIPPET_COLUMNS', [ | |
| 31 | + 'id' => 'BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT', | |
| 32 | + 'name' => 'TINYTEXT NOT NULL', | |
| 33 | + 'description' => 'TEXT NOT NULL', | |
| 34 | + 'code' => 'LONGTEXT NOT NULL', | |
| 35 | + 'tags' => 'LONGTEXT NOT NULL', | |
| 36 | + 'scope' => "VARCHAR(255) NOT NULL DEFAULT ''", | |
| 37 | + 'priority' => "SMALLINT(6) NOT NULL DEFAULT 10", | |
| 38 | + 'active' => "TINYINT(1) NOT NULL DEFAULT 0", | |
| 39 | + 'endpoint' => "VARCHAR(255) NOT NULL DEFAULT ''", | |
| 40 | + 'token' => "VARCHAR(255) NOT NULL DEFAULT ''", | |
| 41 | + 'method' => "VARCHAR(15) NOT NULL DEFAULT 'POST'", | |
| 42 | + 'created' => 'DATETIME NOT NULL', | |
| 43 | + 'updated' => 'DATETIME NOT NULL', | |
| 44 | +]); | |
| 22 | 45 | |
| 46 | + | |
| 23 | 47 | require_once( 'classes/init.php' ); |
| 48 | +require_once( 'classes/load.php' ); | |
| 24 | 49 | |
| 25 | 50 | ?> |