Title: Parse error
Last modified: July 4, 2018

---

# Parse error

 *  [jassogne](https://wordpress.org/support/users/jassogne/)
 * (@jassogne)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/parse-error-487/)
 * Hi,
    Sorry to ask you this question. I didn’t developp this part of the website.
   The request takes informations from a third-application. wp-content/plugins/insert-
   php/insert_php.php(87) : eval()’d code on line 25
 *     ```
       <?php
   
       	/**
   
       	 * Plugin Name: PHP code snippets (Insert PHP)
   
       	 * Plugin URI: https://wordpress.org/plugins/insert-php/
   
       	 * Description: Run PHP code inserted into WordPress posts and pages. An easy, clean and easy way to add code snippets to your site. You do not need to edit the functions.php file of your theme again!
   
       	 * Author: Will Bontrager Software, LLC <will@willmaster.com>, Webcraftic <wordpress.webraftic@gmail.com>
   
       	 * Version: 2.0.4
   
       	 * Text Domain: insert-php
   
       	 * Domain Path: /languages/
   
       	 * Author URI: http://www.willmaster.com/contact.php
   
       	 */
   
       	// Exit if accessed directly
   
       	if( !defined('ABSPATH') ) {
   
       		exit;
   
       	}
   
       	if( defined('WINP_PLUGIN_ACTIVE') ) {
   
       		return;
   
       	}
   
       	// Set the constant that the plugin is activated
   
       	define('WINP_PLUGIN_ACTIVE', true);
   
       	// Root directory of the plugin
   
       	define('WINP_PLUGIN_DIR', dirname(__FILE__));
   
   
   
       	// Absolute url of the root directory of the plugin
   
       	define('WINP_PLUGIN_URL', plugins_url(null, __FILE__));
   
       	// Relative url of the plugin
   
       	define('WINP_PLUGIN_BASE', plugin_basename(__FILE__));
   
   
   
       	// The type of posts used for snippets types
   
       	define('WINP_SNIPPETS_POST_TYPE', 'wbcr-snippets');
   
   
   
       	global $wp_version;
   
       	// Troubleshoot old versions of WordPress
   
       	if( version_compare($wp_version, '4.2.0', '>') ) {
   
       		require_once(WINP_PLUGIN_DIR . '/libs/factory/core/boot.php');
   
       		require_once(WINP_PLUGIN_DIR . '/includes/class.helpers.php');
   
       		require_once(WINP_PLUGIN_DIR . '/includes/class.plugin.php');
   
       		new WINP_Plugin(__FILE__, array(
   
       			'prefix' => 'wbcr_inp_',
   
       			'plugin_name' => 'wbcr_insert_php',
   
       			'plugin_title' => __('PHP code snippets (Insert PHP)', 'insert-php'),
   
       			'plugin_version' => '2.0.4',
   
       			'required_php_version' => '5.2',
   
       			'required_wp_version' => '4.2',
   
       			'plugin_build' => 'free',
   
       			//'updates' => WINP_PLUGIN_DIR . '/updates/'
   
       		));
   
       	} else {
   
       		// Notification about the old version of WordPress
   
       		add_action('admin_notices', function () {
   
       			echo '<div class="notice notice-error"><p>' . __('You are using the old version of WordPress, for the <b>PHP code snippets (Insert PHP)</b> plugin you need WordPress 4.2 and higher versions!', 'insert-php') . '</p></div>';
   
       		});
   
       	}
   
       	/*
   
       	Note: This plugin requires WordPress version 3.3.1 or higher.
   
       	Information about the Insert PHP plugin can be found here:
   
       	http://www.willmaster.com/software/WPplugins/go/iphphome_iphplugin
   
       	Instructions and examples can be found here:
   
       	http://www.willmaster.com/software/WPplugins/go/iphpinstructions_iphplugin
   
       	*/
   
       	// todo: This is the code of the old version of the plugin, left unchanged for compatibility. Delete in the new major version of the plugin
   
       	if( !function_exists('will_bontrager_insert_php') ) {
   
       		function will_bontrager_insert_php($content)
   
       		{
   
       			$will_bontrager_content = $content;
   
       			preg_match_all('!\[insert_php[^\]]*\](.*?)\[/insert_php[^\]]*\]!is', $will_bontrager_content, $will_bontrager_matches);
   
       			$will_bontrager_nummatches = count($will_bontrager_matches[0]);
   
       			for($will_bontrager_i = 0; $will_bontrager_i < $will_bontrager_nummatches; $will_bontrager_i++) {
   
       				ob_start();
   
       				eval($will_bontrager_matches[1][$will_bontrager_i]);
   
       				$will_bontrager_replacement = ob_get_contents();
   
       				ob_clean();
   
       				ob_end_flush();
   
       				$will_bontrager_content = preg_replace('/' . preg_quote($will_bontrager_matches[0][$will_bontrager_i], '/') . '/', $will_bontrager_replacement, $will_bontrager_content, 1);
   
       			}
   
       			return $will_bontrager_content;
   
       		} # function will_bontrager_insert_php()
   
       		add_filter('the_content', 'will_bontrager_insert_php', 9);
   
       	} # if( ! function_exists('will_bontrager_insert_php') )
       ```
   
 * thanks for your help !
 * Judith
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fparse-error-487%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [webcraftic](https://wordpress.org/support/users/webcraftic/)
 * (@webcraftic)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/parse-error-487/#post-10477804)
 * Hi,
 * Sorry delay for reply!
 * You can send your code to me on the mail or post on this forum? If there is an
   error in your code, I can fix it.
 * My email [wordpress.webraftic@gmail.com](https://wordpress.org/support/topic/parse-error-487/wordpress.webraftic@gmail.com?output_format=md)
 * Best regards, Alex
    -  This reply was modified 7 years, 9 months ago by [webcraftic](https://wordpress.org/support/users/webcraftic/).

Viewing 1 replies (of 1 total)

The topic ‘Parse error’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3475630)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [webcraftic](https://wordpress.org/support/users/webcraftic/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/parse-error-487/#post-10477804)
 * Status: not resolved