Class "acf_options_page" not found
-
Hi,
I’m experiencing a problem with the plugin when I install it. It throws the error: Class “acf_options_page” not found within the file:
/ultimate-metabox-tabs/extensions/acf/options_page_mod.phpDo I need to have the Options Page plugin for ACF installed in order to use this plugin?
I’m using version 4.0.2 of the Advanced Custom Fields plugin.
Cheers,
– Emil
-
You do not the Options Page plugin for this to work. I’ll work on a patch to fix this, in the meantime, replace the file code with this. (simply adding the class_exists() check)
if (class_exists('acf_options_page')) { class umt_acf_options_page extends acf_options_page { var $umt; function __construct($parent) { $this->umt = $parent; // Setup Addon global $acf; if (isset($acf->options_page)) { // call the original acf_options_page constructor parent::__construct($acf); // setup initiation procedure add_action('init',array($this,'init'),99); // setup register options page init add_action('admin_init',array($this,'umt_admin_init')); } else { trigger_error("ACF Options Page support for Ultimate Metabox Tabs has become broken. Please contact the developer. For now, disable the extension."); } } function init() { global $acf; // remove the admin menu hook remove_action('admin_menu', array($acf->options_page,'admin_menu')); // override the original options page $acf->options_page = $this; } function admin_body_class($classes) { $classes = str_replace(" umt_no_margin","",$classes); return $classes; } function umt_admin_init() { // register metatabs page umt_register_settings_page($this->umt_slug,$this->umt_name); } function admin_head() { $this->umt->metatab_load_settings_page($this->umt_slug); $this->umt->admin_head(); add_filter('admin_body_class',array($this,'admin_body_class')); parent::admin_head(); } function admin_print_scripts() { $this->umt->metatab_load_settings_page($this->umt_slug); parent::admin_print_scripts(); // remove original filter, only if on the 'options page' remove_filter('richedit_pre', array($this->umt,'richedit_pre'),99); $this->umt->admin_print_scripts(); } function admin_print_styles() { parent::admin_print_styles(); $this->umt->admin_print_styles(); } function html() { parent::html(); // append metabox tabs $this->umt->metatab_create(); } } }Hi,
thanks for your quick response.
Well this was actually my initially thought to do but when I do that I get following error (which is displayed at the top of the admin page, but still makes it possible for me to use the system):
Warning: Attempt to assign property of non-object in /wp-content/plugins/ultimate-metabox-tabs/ultimate-metabox-tabs.php on line 300 Warning: Attempt to assign property of non-object in /wp-content/plugins/ultimate-metabox-tabs/ultimate-metabox-tabs.php on line 301 Warning: Attempt to assign property of non-object in /wp-content/plugins/ultimate-metabox-tabs/ultimate-metabox-tabs.php on line 302 Warning: Attempt to assign property of non-object in /wp-content/plugins/ultimate-metabox-tabs/ultimate-metabox-tabs.php on line 303 Warning: Attempt to assign property of non-object in /wp-content/plugins/ultimate-metabox-tabs/ultimate-metabox-tabs.php on line 304
The topic ‘Class "acf_options_page" not found’ is closed to new replies.