PluginProbe
WP Coder – Insert & Manage Code Snippets / 3.4
WP Coder – Insert & Manage Code Snippets v3.4
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 +12 -29 4.5.13.4 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: 4.5.1
6 + * Version: 3.4
7 7 * Author: WPCoder
8 8 * Author URI: https://wpcoder.pro
9 - * Author Email: hey@wow-company.com
9 + * Author Email: dev@wpcoder.pro
10 10 * License: GPL-2.0+
11 11 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12 - * Text Domain: wp-coder
12 + * Text Domain: wpcoder
13 13 * Requires at least: 5.4
14 14 * Requires PHP: 7.4
15 15 */
16 16
@@ -16,9 +16,8 @@
16 16
17 17 namespace WPCoder;
18 18
19 19 // Exit if accessed directly.
20 -use WPCoder\Block\WPCoder_Block;
21 20 use WPCoder\Dashboard\DBManager;
22 21 use WPCoder\Dashboard\FolderManager;
23 22 use WPCoder\Update\UpdateDB;
24 23
@@ -23,9 +22,9 @@
23 22 use WPCoder\Update\UpdateDB;
24 23
25 24 defined( 'ABSPATH' ) || exit;
26 25
27 -if ( ! class_exists( 'wpcoder' ) ) :
26 +if ( ! class_exists( 'WPCoder' ) ) :
28 27
29 28 final class WPCoder {
30 29
31 30 // Plugin slug
@@ -60,8 +59,9 @@
60 59 self::$instance->autoloader = new Autoloader( 'WPCoder' );
61 60 self::$instance->dashboard = new WOWP_Dashboard();
62 61 self::$instance->public = new WOWP_Public();
63 62
63 +
64 64 register_activation_hook( __FILE__, [ self::$instance, 'plugin_activate' ] );
65 65 add_action( 'plugins_loaded', [ self::$instance, 'loaded' ] );
66 66 }
67 67
@@ -99,11 +99,11 @@
99 99 'author' => 'Author',
100 100 'email' => 'Author Email',
101 101 ];
102 102 $plugin_data = get_file_data( __FILE__, $data, false );
103 - $plugin_data['data'] = str_replace( ' ', '-', $plugin_data['name'] );
104 103
105 104 return $plugin_data[ $show ] ?? '';
105 +
106 106 }
107 107
108 108 /**
109 109 * Include required files.
@@ -128,9 +128,9 @@
128 128 * @access protected
129 129 */
130 130 public function __clone() {
131 131 // Cloning instances of the class is forbidden.
132 - _doing_it_wrong( __FUNCTION__, esc_attr__( 'Cheatin’ huh?', 'wp-coder' ), '1.0' );
132 + _doing_it_wrong( __FUNCTION__, esc_attr__( 'Cheatin’ huh?', 'wpcoder' ), '1.0' );
133 133 }
134 134
135 135 /**
136 136 * Disable unserializing of the class.
@@ -139,32 +139,15 @@
139 139 * @access protected
140 140 */
141 141 public function __wakeup() {
142 142 // Unserializing instances of the class is forbidden.
143 - _doing_it_wrong( __FUNCTION__, esc_attr__( 'Cheatin’ huh?', 'wp-coder' ), '1.0' );
143 + _doing_it_wrong( __FUNCTION__, esc_attr__( 'Cheatin’ huh?', 'wpcoder' ), '1.0' );
144 144 }
145 145
146 146 public function plugin_activate(): void {
147 - $columns = "
148 - id mediumint(9) NOT NULL AUTO_INCREMENT,
149 - title VARCHAR(200) NOT NULL,
150 - html_code LONGTEXT,
151 - css_code LONGTEXT,
152 - js_code LONGTEXT,
153 - php_code LONGTEXT,
154 - param LONGTEXT,
155 - status BOOLEAN,
156 - mode BOOLEAN,
157 - tag TEXT,
158 - php_include int(11) NOT NULL DEFAULT '0',
159 - UNIQUE KEY id (id),
160 - INDEX id_index (id)
161 - ";
162 -
163 -
164 - DBManager::create( $columns );
147 + DBManager::create();
165 148 FolderManager::create();
166 - update_option( self::PREFIX . '_db_version', '4.0' );
149 + update_option( self::PREFIX . '_db_version', '3.2' );
167 150
168 151 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
169 152 if ( is_plugin_active( 'wp-coder-pro/wp-coder-pro.php' ) ) {
170 153 deactivate_plugins( 'wp-coder-pro/wp-coder-pro.php' );
@@ -171,8 +154,9 @@
171 154 }
172 155 if ( is_plugin_active( 'wpcoderpro/wpcoderpro.php' ) ) {
173 156 deactivate_plugins( 'wpcoderpro/wpcoderpro.php' );
174 157 }
158 +
175 159 }
176 160
177 161 /**
178 162 * Download the folder with languages.
@@ -180,12 +164,11 @@
180 164 * @access Publisher
181 165 * @return void
182 166 */
183 167 public function loaded(): void {
184 - new WPCoder_Block();
185 168 UpdateDB::init();
186 169 $languages_folder = dirname( plugin_basename( __FILE__ ) ) . '/languages/';
187 - load_plugin_textdomain( 'wp-coder', false, $languages_folder );
170 + load_plugin_textdomain( 'wpcoder', false, $languages_folder );
188 171 }
189 172
190 173 }
191 174