Title: Fatal error: Call to undefined function register_setting()
Last modified: January 16, 2017

---

# Fatal error: Call to undefined function register_setting()

 *  [mrsmill](https://wordpress.org/support/users/mrsmill/)
 * (@mrsmill)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-register_setting/)
 * After a recent update my login is blocked by a coding mismatch.
    Full message:
   Fatal error: Call to undefined function register_setting() in /websites/123reg/
   LinuxPackage21/ur/su/la/ursulaholdengill.com/public_html/wp-content/plugins/event-
   list/includes/options.php on line 70
 * I am happy to go to ftp and search for line 70 and adapt the ‘events list’ plugin.
   But I am not sure what to delete and what to replace it with.
 * Help would be amazing.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [mrsmill](https://wordpress.org/support/users/mrsmill/)
 * (@mrsmill)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-register_setting/#post-8661777)
 * UPDATE: Realised I have switched the website to 123reg hosting and now I am unsure
   how to access backroom via ftp. (Previously hosted via a friend and I had all
   ftp login details).
 *  Thread Starter [mrsmill](https://wordpress.org/support/users/mrsmill/)
 * (@mrsmill)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-register_setting/#post-8661800)
 *     ```
       <?php
       if(!defined('WPINC')) {
       	exit;
       }
   
       // This class handles all available options
       class EL_Options {
   
       	private static $instance;
       	public $options;
   
       	public static function &get_instance() {
       		// Create class instance if required
       		if(!isset(self::$instance)) {
       			self::$instance = new self();
       		}
       		// Return class instance
       		return self::$instance;
       	}
   
       	private function __construct() {
       		add_action('init', array(&$this, 'init_options'), 1);
       		add_action('admin_init', array(&$this, 'register_options'));
       	}
   
       	public function init_options() {
       		$this->options = array(
       			'el_db_version'           => array('section' => 'system',     'std_val' => ''),
   
       			'el_categories'           => array('section' => 'categories', 'std_val' => null),
       			'el_sync_cats'            => array('section' => 'categories', 'std_val' => ''),
   
       			'el_import_file'          => array('section' => 'import',     'std_val' => ''),
       			'el_import_date_format'   => array('section' => 'import',     'std_val' => 'Y-m-d'),
   
       			'el_no_event_text'        => array('section' => 'general',    'std_val' => 'no event'),
       			'el_multiday_filterrange' => array('section' => 'general',    'std_val' => '1'),
       			'el_date_once_per_day'    => array('section' => 'general',    'std_val' => ''),
       			'el_html_tags_in_time'    => array('section' => 'general',    'std_val' => ''),
       			'el_html_tags_in_loc'     => array('section' => 'general',    'std_val' => ''),
   
       			'el_show_details_text'    => array('section' => 'frontend',   'std_val' => __('Show details','event-list')),
       			'el_hide_details_text'    => array('section' => 'frontend',   'std_val' => __('Hide details','event-list')),
       			'el_disable_css_file'     => array('section' => 'frontend',   'std_val' => ''),
   
       			'el_edit_dateformat'      => array('section' => 'admin',      'std_val' => ''),
   
       			'el_enable_feed'          => array('section' => 'feed',       'std_val' => ''),
       			'el_feed_name'            => array('section' => 'feed',       'std_val' => 'event-list'),
       			'el_feed_description'     => array('section' => 'feed',       'std_val' => 'Eventlist Feed'),
       			'el_feed_upcoming_only'   => array('section' => 'feed',       'std_val' => ''),
       			'el_head_feed_link'       => array('section' => 'feed',       'std_val' => '1'),
       			'el_feed_link_pos'        => array('section' => 'feed',       'std_val' => 'bottom'),
       			'el_feed_link_align'      => array('section' => 'feed',       'std_val' => 'left'),
       			'el_feed_link_text'       => array('section' => 'feed',       'std_val' => 'RSS Feed'),
       			'el_feed_link_img'        => array('section' => 'feed',       'std_val' => '1'),
       		);
       	}
   
       	public function load_options_helptexts() {
       		require_once(EL_PATH.'includes/options_helptexts.php');
       		foreach($options_helptexts as $name => $values) {
       			$this->options[$name] += $values;
       		}
       		unset($options_helptexts);
       	}
   
       	public function register_options() {
       		foreach($this->options as $oname => $o) {
       			register_setting('el_'.$o['section'], $oname);
       		}
       	}
   
       	public function set($name, $value) {
       		if(isset($this->options[$name])) {
       			return update_option($name, $value);
       		}
       		else {
       			return false;
       		}
       	}
   
       	public function get($name) {
       		if(isset($this->options[$name])) {
       			return get_option($name, $this->options[$name]['std_val']);
       		}
       		else {
       			return null;
       		}
       	}
       }
       ?>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Fatal error: Call to undefined function register_setting()’ is closed
to new replies.

## Tags

 * [events list](https://wordpress.org/support/topic-tag/events-list/)

 * 2 replies
 * 1 participant
 * Last reply from: [mrsmill](https://wordpress.org/support/users/mrsmill/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-register_setting/#post-8661800)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
