PluginProbe
WP Coder – Insert & Manage Code Snippets / 4.3
WP Coder – Insert & Manage Code Snippets v4.3
4.5.1 1.1 2.3.1 2.3.2 2.4.1 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 3.2 3.2.1 3.3 3.4 3.5 3.5.1 All 39 releases
← All changes | wp-coder.php +27 -12 3.54.3 View file →
@@ -2,15 +2,15 @@
2 2 /**
3 3 * Plugin Name: WP Coder
4 4 * Plugin URI: https://wordpress.org/plugins/wp-coder/
5 5 * Description: Adding custom HTML, CSS, JavaScript and PHP code to your WordPress site.
6 - * Version: 3.5
6 + * Version: 4.3
7 7 * Author: WPCoder
8 8 * Author URI: https://wpcoder.pro
9 - * Author Email: dev@wpcoder.pro
9 + * Author Email: hey@wow-company.com
10 10 * License: GPL-2.0+
11 11 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12 - * Text Domain: wpcoder
12 + * Text Domain: wp-coder
13 13 * Requires at least: 5.4
14 14 * Requires PHP: 7.4
15 15 */
16 16
@@ -22,9 +22,9 @@
22 22 use WPCoder\Update\UpdateDB;
23 23
24 24 defined( 'ABSPATH' ) || exit;
25 25
26 -if ( ! class_exists( 'WPCoder' ) ) :
26 +if ( ! class_exists( 'wpcoder' ) ) :
27 27
28 28 final class WPCoder {
29 29
30 30 // Plugin slug
@@ -59,9 +59,8 @@
59 59 self::$instance->autoloader = new Autoloader( 'WPCoder' );
60 60 self::$instance->dashboard = new WOWP_Dashboard();
61 61 self::$instance->public = new WOWP_Public();
62 62
63 -
64 63 register_activation_hook( __FILE__, [ self::$instance, 'plugin_activate' ] );
65 64 add_action( 'plugins_loaded', [ self::$instance, 'loaded' ] );
66 65 }
67 66
@@ -99,11 +98,11 @@
99 98 'author' => 'Author',
100 99 'email' => 'Author Email',
101 100 ];
102 101 $plugin_data = get_file_data( __FILE__, $data, false );
102 + $plugin_data['data'] = str_replace( ' ', '-', $plugin_data['name'] );
103 103
104 104 return $plugin_data[ $show ] ?? '';
105 -
106 105 }
107 106
108 107 /**
109 108 * Include required files.
@@ -128,9 +127,9 @@
128 127 * @access protected
129 128 */
130 129 public function __clone() {
131 130 // Cloning instances of the class is forbidden.
132 - _doing_it_wrong( __FUNCTION__, esc_attr__( 'Cheatin’ huh?', 'wpcoder' ), '1.0' );
131 + _doing_it_wrong( __FUNCTION__, esc_attr__( 'Cheatin’ huh?', 'wp-coder' ), '1.0' );
133 132 }
134 133
135 134 /**
136 135 * Disable unserializing of the class.
@@ -139,15 +138,32 @@
139 138 * @access protected
140 139 */
141 140 public function __wakeup() {
142 141 // Unserializing instances of the class is forbidden.
143 - _doing_it_wrong( __FUNCTION__, esc_attr__( 'Cheatin’ huh?', 'wpcoder' ), '1.0' );
142 + _doing_it_wrong( __FUNCTION__, esc_attr__( 'Cheatin’ huh?', 'wp-coder' ), '1.0' );
144 143 }
145 144
146 145 public function plugin_activate(): void {
147 - DBManager::create();
146 + $columns = "
147 + id mediumint(9) NOT NULL AUTO_INCREMENT,
148 + title VARCHAR(200) NOT NULL,
149 + html_code LONGTEXT,
150 + css_code LONGTEXT,
151 + js_code LONGTEXT,
152 + php_code LONGTEXT,
153 + param LONGTEXT,
154 + status BOOLEAN,
155 + mode BOOLEAN,
156 + tag TEXT,
157 + php_include int(11) NOT NULL DEFAULT '0',
158 + UNIQUE KEY id (id),
159 + INDEX id_index (id)
160 + ";
161 +
162 +
163 + DBManager::create( $columns );
148 164 FolderManager::create();
149 - update_option( self::PREFIX . '_db_version', '3.2' );
165 + update_option( self::PREFIX . '_db_version', '4.0' );
150 166
151 167 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
152 168 if ( is_plugin_active( 'wp-coder-pro/wp-coder-pro.php' ) ) {
153 169 deactivate_plugins( 'wp-coder-pro/wp-coder-pro.php' );
@@ -154,9 +170,8 @@
154 170 }
155 171 if ( is_plugin_active( 'wpcoderpro/wpcoderpro.php' ) ) {
156 172 deactivate_plugins( 'wpcoderpro/wpcoderpro.php' );
157 173 }
158 -
159 174 }
160 175
161 176 /**
162 177 * Download the folder with languages.
@@ -166,9 +181,9 @@
166 181 */
167 182 public function loaded(): void {
168 183 UpdateDB::init();
169 184 $languages_folder = dirname( plugin_basename( __FILE__ ) ) . '/languages/';
170 - load_plugin_textdomain( 'wpcoder', false, $languages_folder );
185 + load_plugin_textdomain( 'wp-coder', false, $languages_folder );
171 186 }
172 187
173 188 }
174 189