| @@ -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.5 | |
| 7 | + * Version: 2.7.2 | |
| 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.5' ); | |
| 44 | +define( 'WINP_PLUGIN_VERSION', '2.7.2' ); | |
| 45 | 45 | |
| 46 | 46 | // Root directory of the plugin. |
| 47 | 47 | define( 'WINP_PLUGIN_DIR', __DIR__ ); |
| 48 | 48 | |
| @@ -167,15 +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.error-handler.php'; | |
| 172 | 171 | require_once WINP_PLUGIN_DIR . '/includes/class.plugin.php'; |
| 173 | 172 | |
| 174 | -if ( file_exists( WINP_PLUGIN_DIR . '/vendor/autoload.php' ) ) { | |
| 175 | - require_once WINP_PLUGIN_DIR . '/vendor/autoload.php'; | |
| 176 | -} | |
| 177 | - | |
| 178 | 173 | /** |
| 179 | 174 | * Adds a hint and button to the fatal error message. |
| 180 | 175 | * |
| 181 | 176 | * Since WordPress 5.2, we have access to a special mode for catching PHP errors. |
| @@ -299,8 +294,9 @@ | ||
| 299 | 294 | global $winp_snippets_locations; |
| 300 | 295 | $winp_snippets_locations = new WINP_Insertion_Locations(); |
| 301 | 296 | |
| 302 | 297 | try { |
| 298 | + require_once WINP_PLUGIN_DIR . '/vendor/autoload.php'; | |
| 303 | 299 | new WINP_Plugin(); |
| 304 | 300 | } catch ( Exception $exception ) { |
| 305 | 301 | // Plugin wasn't initialized due to an error |
| 306 | 302 | define( 'WINP_PLUGIN_THROW_ERROR', true ); |