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 +15 -12 3.24.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.2
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.
@@ -112,8 +111,9 @@
112 111 * @since 1.0
113 112 */
114 113 private function includes(): void {
115 114 require_once self::dir() . 'includes/safe-mode.php';
115 + require_once self::dir() . 'includes/snippets.php';
116 116 require_once self::dir() . 'classes/Autoloader.php';
117 117 require_once self::dir() . 'includes/class-wowp-dashboard.php';
118 118 require_once self::dir() . 'includes/class-wowp-public.php';
119 119 }
@@ -127,9 +127,9 @@
127 127 * @access protected
128 128 */
129 129 public function __clone() {
130 130 // Cloning instances of the class is forbidden.
131 - _doing_it_wrong( __FUNCTION__, esc_attr__( 'Cheatin’ huh?', 'wpcoder' ), '1.0' );
131 + _doing_it_wrong( __FUNCTION__, esc_attr__( 'Cheatin’ huh?', 'wp-coder' ), '1.0' );
132 132 }
133 133
134 134 /**
135 135 * Disable unserializing of the class.
@@ -138,9 +138,9 @@
138 138 * @access protected
139 139 */
140 140 public function __wakeup() {
141 141 // Unserializing instances of the class is forbidden.
142 - _doing_it_wrong( __FUNCTION__, esc_attr__( 'Cheatin’ huh?', 'wpcoder' ), '1.0' );
142 + _doing_it_wrong( __FUNCTION__, esc_attr__( 'Cheatin’ huh?', 'wp-coder' ), '1.0' );
143 143 }
144 144
145 145 public function plugin_activate(): void {
146 146 $columns = "
@@ -153,13 +153,17 @@
153 153 param LONGTEXT,
154 154 status BOOLEAN,
155 155 mode BOOLEAN,
156 156 tag TEXT,
157 - UNIQUE KEY id (id)
157 + php_include int(11) NOT NULL DEFAULT '0',
158 + UNIQUE KEY id (id),
159 + INDEX id_index (id)
158 160 ";
161 +
162 +
159 163 DBManager::create( $columns );
160 164 FolderManager::create();
161 - update_option( self::PREFIX . '_db_version', '3.2' );
165 + update_option( self::PREFIX . '_db_version', '4.0' );
162 166
163 167 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
164 168 if ( is_plugin_active( 'wp-coder-pro/wp-coder-pro.php' ) ) {
165 169 deactivate_plugins( 'wp-coder-pro/wp-coder-pro.php' );
@@ -166,9 +170,8 @@
166 170 }
167 171 if ( is_plugin_active( 'wpcoderpro/wpcoderpro.php' ) ) {
168 172 deactivate_plugins( 'wpcoderpro/wpcoderpro.php' );
169 173 }
170 -
171 174 }
172 175
173 176 /**
174 177 * Download the folder with languages.
@@ -178,9 +181,9 @@
178 181 */
179 182 public function loaded(): void {
180 183 UpdateDB::init();
181 184 $languages_folder = dirname( plugin_basename( __FILE__ ) ) . '/languages/';
182 - load_plugin_textdomain( 'wpcoder', false, $languages_folder );
185 + load_plugin_textdomain( 'wp-coder', false, $languages_folder );
183 186 }
184 187
185 188 }
186 189