Failing to activate plugin?
-
Hi there,
I’ve just installed this plugin and after activating it my WordPress dashboard and website is now displaying a whole chunk of code at the top. Any idea why this is happening?
Thanks,
PhilExtract:
"oken = 'jot-plugin'; $this->version = '1.0.10'; $installed_version = get_option($this->token . '-version'); if ($installed_version < $this->version) { $this->apply_updates(); } $this->plugin_url = plugin_dir_url( __FILE__ ); $this->plugin_path = plugin_dir_path( __FILE__ ); require_once( 'classes/class-jot-plugin-settings.php' ); $this->settings = Joy_Of_Text_Plugin_Settings::instance(); require_once( 'classes/class-jot-plugin-messenger.php' ); $this->messenger = Joy_Of_Text_Plugin_Messenger::instance(); require_once( 'classes/class-jot-plugin-admin.php' ); $this->admin = Joy_Of_Text_Plugin_Admin::instance(); require_once( 'classes/class-jot-plugin-options.php' ); $this->options = Joy_Of_Text_Plugin_Options::instance(); require_once( 'classes/class-jot-plugin-shortcodes.php' ); $this->shortcodes = Joy_Of_Text_Plugin_Shortcodes::instance(); register_activation_hook( __FILE__, array( $this, 'install' ) ); add_filter('plugin_action_links', array($this, 'plugin_action_links'), 10, 2); add_action('wp_enqueue_scripts', array( $this, 'initialise_plugin' )); add_action('admin_enqueue_scripts', array( $this, 'initialise_plugin' )); add_filter('query_vars', array($this,'messageid_query_vars')); add_action('parse_request', array($this,'parse_voicecall_request')); $this->smsproviders = $this->get_smsproviders(); $this->currentsmsprovidername = $this->settings->get_current_smsprovider(); if ($this->currentsmsprovidername != 'default' && !empty($this->currentsmsprovidername)) { require_once( 'classes/smsproviders/class-jot-provider-' . $this->currentsmsprovidername . '.php' ); $this->currentsmsprovider = Joy_Of_Text_Plugin_Smsprovider::instance(); } else { // Set the SMS provider to 'default' $smsprov = get_option('jot-plugin-smsprovider'); $smsprov['jot-smsproviders'] = 'default' ; update_option('jot-plugin-smsprovider',$smsprov); } $this->lastgrpid = $this->jot_get_groupid(); $this->_log_version_number(); } // End __construct() /** * Main Joy_Of_Text_Plugin Instance * * Ensures only one instance of Joy_Of_Text_Plugin is loaded or can be loaded. * */ public static function instance () { if ( is_null( self::$_instance ) ) self::$_instance = new self(); return self::$_instance; } // End instance() /** * Load the localisation file. */ public function load_plugin_textdomain() { load_plugin_textdomain( 'jot-plugin', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); } // End load_plugin_textdomain() /** * Add settings link */ function plugin_action_links($links, $file) { static $this_plugin; if (!$this_plugin) { $this_plugin = plugin_basename(__FILE__); } // check to make sure we are on the correct plugin if ($file == $this_plugin) { // the anchor tag and href to the URL we want. For a "Settings" link, this needs to be the url of your settings page $settings_link = 'Settings'; // add the link to the list array_unshift($links, $settings_link); } return $links; } /** * Cloning is forbidden. */ public function __clone () { _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?' ), '1.0.0' ); } // End __clone() /** * Unserializing instances of this class is forbidden. */ public function __wakeup () { _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?' ), '1.0.0' ); } // End __wakeup() /** * Installation. Runs on activation. */ public function install () { global $wpdb; // Create groups table $table = $wpdb->prefix."jot_groups"; $structure = "CREATE TABLE IF NOT EXISTS $table ( jot_groupid INT(9) NOT NULL AUTO_INCREMENT, jot_groupname VARCHAR(40) NOT NULL, jot_groupdesc VARCHAR(60) NOT NULL, jot_ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP, UNIQUE KEY jot_groupid (jot_groupid) );"; $wpdb->query($structure); // Create group members table $table = $wpdb->prefix."jot_groupmembers"; $structure = "CREATE TABLE IF NOT EXISTS $table ( jot_grpmemid INT(9) NOT NULL AUTO_INCREMENT, jot_grpid INT(9) NOT NULL, jot_grpmemname VARCHAR(40) NOT NULL, jot_grpmemnum VARCHAR(40) NOT NULL, jot_grpmemts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, UNIQUE KEY jot_grpmemid (jot_grpmemid ) );"; $wpdb->query($structure); // Create group invite table $table = $wpdb->prefix."jot_groupinvites"; $structure = "CREATE TABLE IF NOT EXISTS $table ( jot_grpid INT(9) NOT"
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Failing to activate plugin?’ is closed to new replies.