PluginProbe
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts / 2.7.8
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts v2.7.8
2.7.9 2.7.8 2.7.7 2.7.6 2.7.5 2.7.4 trunk 1.3 2.0.4 2.0.6 2.1.91 2.2.4 2.2.7 2.2.9 2.3.1 2.3.10 2.4.10 2.4.2 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.6.0 All 30 releases
← All changes | insert_php.php +30 -2 2.7.4 → 2.7.8 View file →
@@ -3,9 +3,9 @@
3 3 * Plugin Name: Woody Code Snippets
4 4 * Plugin URI: https://woodysnippet.com/
5 5 * Description: Executes PHP code, uses conditional logic to insert ads, text, media content and external service's code. Ensures no content duplication.
6 6 * Author: Themeisle
7 - * Version: 2.7.4
7 + * Version: 2.7.8
8 8 * WordPress Available: yes
9 9 * Requires License: no
10 10 * Text Domain: insert-php
11 11 * Domain Path: /languages/
@@ -40,9 +40,9 @@
40 40
41 41 // Set the constant that the plugin is activated.
42 42 define( 'WINP_PLUGIN_ACTIVE', true );
43 43
44 -define( 'WINP_PLUGIN_VERSION', '2.7.4' );
44 +define( 'WINP_PLUGIN_VERSION', '2.7.8' );
45 45
46 46 // Root directory of the plugin.
47 47 define( 'WINP_PLUGIN_DIR', __DIR__ );
48 48
@@ -167,8 +167,10 @@
167 167
168 168 require_once WINP_PLUGIN_DIR . '/includes/class.insertion.locations.php';
169 169 require_once WINP_PLUGIN_DIR . '/includes/class.http.php';
170 170 require_once WINP_PLUGIN_DIR . '/includes/class.helpers.php';
171 +require_once WINP_PLUGIN_DIR . '/includes/class.code-validator.php';
172 +require_once WINP_PLUGIN_DIR . '/includes/class.error-handler.php';
171 173 require_once WINP_PLUGIN_DIR . '/includes/class.plugin.php';
172 174
173 175 if ( file_exists( WINP_PLUGIN_DIR . '/vendor/autoload.php' ) ) {
174 176 require_once WINP_PLUGIN_DIR . '/vendor/autoload.php';
@@ -242,8 +244,33 @@
242 244 ];
243 245 }
244 246
245 247 /**
248 + * AI Connect metadata.
249 + *
250 + * Only the read abilities are listed: the abilities that save or activate
251 + * snippets run code, so the site owner switches those on deliberately.
252 + *
253 + * @return array<string, mixed>
254 + */
255 +function winp_sdk_ai_connect() {
256 + return [
257 + 'name' => 'Woody Code Snippets',
258 + 'notice_cases' => [
259 + __( 'find where a script is inserted', 'insert-php' ),
260 + __( 'review the code of a snippet', 'insert-php' ),
261 + __( 'audit your active snippets', 'insert-php' ),
262 + ],
263 + 'prompts' => [
264 + __( 'Find which Woody Code Snippets load gtag and where they are inserted.', 'insert-php' ),
265 + __( 'Show me the code of my header scripts snippet and explain what it does.', 'insert-php' ),
266 + __( 'Which of my snippets run PHP on every page?', 'insert-php' ),
267 + ],
268 + 'ability_prefix' => 'woody',
269 + ];
270 +}
271 +
272 +/**
246 273 * Register compatibility using SDK.
247 274 *
248 275 * @param array<string, array<string, string>> $compatibilities All compatibilities.
249 276 *
@@ -259,8 +286,9 @@
259 286 }
260 287
261 288 add_filter( 'themeisle_sdk_products', 'winp_sdk_register_products' );
262 289 add_filter( WINP_PLUGIN_NAMESPACE . '_about_us_metadata', 'winp_sdk_about_page' );
290 +add_filter( WINP_PLUGIN_NAMESPACE . '_ai_connect_metadata', 'winp_sdk_ai_connect' );
263 291 add_filter( 'themeisle_sdk_compatibilities/' . basename( WINP_PLUGIN_DIR ), 'winp_sdk_register_compatibility' );
264 292
265 293 // Register activation/deactivation hooks.
266 294 register_activation_hook(