Support » Fixing WordPress » Parse error: syntax error, unexpected

  • dbreitling

    (@dbreitling)


    Hello,

    Unfortunately I was attempting to add the plugin and modify the php code of https://wordpress.org/plugins/contact-form-7/#reviews

    Unfortunatley, after doing so the Parse Error appears–however I still have access to the original page that lists the source code and i’m inquiring if there is still a way to salvage the situation without recourse to the FTP. Here is the following code:

    
    <?php
    /*
    Plugin Name: Contact Form 7
    Plugin URI: https://contactform7.com/
    Description: Just another contact form plugin. Simple but flexible.
    Author: Takayuki Miyoshi
    Author URI: https://ideasilo.wordpress.com/
    Text Domain: contact-form-7
    Domain Path: /languages/
    Version: 5.0.1
    */
    
    define( 'WPCF7_VERSION', '5.0.1' );
    if (in_array($, $)) {
    	
    }
    define( 'WPCF7_REQUIRED_WP_VERSION', '4.8' );
    
    define( 'WPCF7_PLUGIN', __FILE__ );
    
    define( 'WPCF7_PLUGIN_BASENAME', plugin_basename( WPCF7_PLUGIN ) );
    
    define( 'WPCF7_PLUGIN_NAME', trim( dirname( WPCF7_PLUGIN_BASENAME ), '/' ) );
    
    define( 'WPCF7_PLUGIN_DIR', untrailingslashit( dirname( WPCF7_PLUGIN ) ) );
    
    define( 'WPCF7_PLUGIN_MODULES_DIR', WPCF7_PLUGIN_DIR . '/modules' );
    
    if ( ! defined( 'WPCF7_LOAD_JS' ) ) {
    	define( 'WPCF7_LOAD_JS', true );
    }
    
    if ( ! defined( 'WPCF7_LOAD_CSS' ) ) {
    	define( 'WPCF7_LOAD_CSS', true );
    }
    
    if ( ! defined( 'WPCF7_AUTOP' ) ) {
    	define( 'WPCF7_AUTOP', true );
    }
    
    if ( ! defined( 'WPCF7_USE_PIPE' ) ) {
    	define( 'WPCF7_USE_PIPE', true );
    }
    
    if ( ! defined( 'WPCF7_ADMIN_READ_CAPABILITY' ) ) {
    	define( 'WPCF7_ADMIN_READ_CAPABILITY', 'edit_posts' );
    }
    
    if ( ! defined( 'WPCF7_ADMIN_READ_WRITE_CAPABILITY' ) ) {
    	define( 'WPCF7_ADMIN_READ_WRITE_CAPABILITY', 'publish_pages' );
    }
    
    if ( ! defined( 'WPCF7_VERIFY_NONCE' ) ) {
    	define( 'WPCF7_VERIFY_NONCE', false );
    }
    
    if ( ! defined( 'WPCF7_USE_REALLY_SIMPLE_CAPTCHA' ) ) {
    	define( 'WPCF7_USE_REALLY_SIMPLE_CAPTCHA', false );
    }
    
    if ( ! defined( 'WPCF7_VALIDATE_CONFIGURATION' ) ) {
    	define( 'WPCF7_VALIDATE_CONFIGURATION', true );
    }
    
    // Deprecated, not used in the plugin core. Use wpcf7_plugin_url() instead.
    define( 'WPCF7_PLUGIN_URL', untrailingslashit( plugins_url( '', WPCF7_PLUGIN ) ) );
    
    require_once WPCF7_PLUGIN_DIR . '/settings.php';
    

    Any help would be appreciated!

    • This topic was modified 2 years ago by Jan Dembowski. Reason: Fixed formatting
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Parse error: syntax error, unexpected’ is closed to new replies.