Support Forum
Support › MB Settings Page › Settings Page Undefined Error
I'm getting this error all of the sudden. I didn't change anything in the code for this page - but this just appeared this morning -
Fatal error: Call to undefined method MB_Settings_Page_Meta_Box::get_class_name() in /Users/silvabook/Documents/Sites/emilybennington.local/wp-content/plugins/mb-settings-page/inc/settings-page-meta-box.php on line 99
<?php
add_filter( 'mb_settings_pages', 'prefix_settings_pages' );
function prefix_settings_pages( $settings_pages )
{
$settings_pages[] = array(
'id' => 'social-options',
'option_name' => 'social_options',
'menu_title' => __( 'Social Options', 'textdomain' ),
'icon_url' => 'dashicons-images-alt',
'submenu_title' => __( 'Settings', 'textdomain' ), // Note this
);
return $settings_pages;
}
add_filter( 'rwmb_meta_boxes', 'prefix_options_meta_boxes' );
function prefix_options_meta_boxes( $meta_boxes )
{
$meta_boxes[] = array(
'id' => 'general',
'title' => __( 'Global Site Options', 'textdomain' ),
'settings_pages' => 'social-options',
'fields' => array(
// TEXT
array(
// Field name - Will be used as label
'name' => __( 'Facebook Link', 'rwmb' ),
// Field ID, i.e. the meta key
'id' => "facebook_link",
// Field description (optional)
'desc' => __( 'Ex: http://facebook.com/your_user_name', 'rwmb' ),
'type' => 'text',
// Default value (optional)
'std' => __( '', 'rwmb' ),
// CLONES: Add to make the field cloneable (i.e. have multiple value)
'clone' => false,
),
// TEXT
array(
// Field name - Will be used as label
'name' => __( 'Twitter Link', 'rwmb' ),
// Field ID, i.e. the meta key
'id' => "twitter_link",
// Field description (optional)
'desc' => __( 'Ex: http://facebook.com/your_user_name', 'rwmb' ),
'type' => 'text',
// Default value (optional)
'std' => __( '', 'rwmb' ),
// CLONES: Add to make the field cloneable (i.e. have multiple value)
'clone' => false,
),
// TEXT
array(
// Field name - Will be used as label
'name' => __( 'Youtube Link', 'rwmb' ),
// Field ID, i.e. the meta key
'id' => "youtube_link",
// Field description (optional)
'desc' => __( 'Ex: http://facebook.com/your_user_name', 'rwmb' ),
'type' => 'text',
// Default value (optional)
'std' => __( '', 'rwmb' ),
// CLONES: Add to make the field cloneable (i.e. have multiple value)
'clone' => false,
),
// TEXT
array(
// Field name - Will be used as label
'name' => __( 'Instagram Link', 'rwmb' ),
// Field ID, i.e. the meta key
'id' => "instagram_link",
// Field description (optional)
'desc' => __( 'Ex: http://facebook.com/your_user_name', 'rwmb' ),
'type' => 'text',
// Default value (optional)
'std' => __( '', 'rwmb' ),
// CLONES: Add to make the field cloneable (i.e. have multiple value)
'clone' => false,
),
// TEXT
array(
// Field name - Will be used as label
'name' => __( 'Linked In Link', 'rwmb' ),
// Field ID, i.e. the meta key
'id' => "linkedin_link",
// Field description (optional)
'desc' => __( 'Ex: http://linkedin.com/your_user_name', 'rwmb' ),
'type' => 'text',
// Default value (optional)
'std' => __( '', 'rwmb' ),
// CLONES: Add to make the field cloneable (i.e. have multiple value)
'clone' => false,
),
// TEXT
array(
// Field name - Will be used as label
'name' => __( 'Email Address', 'rwmb' ),
// Field ID, i.e. the meta key
'id' => "mailto_link",
// Field description (optional)
'desc' => __( 'Ex: [email protected]', 'rwmb' ),
'type' => 'text',
// Default value (optional)
'std' => __( '', 'rwmb' ),
// CLONES: Add to make the field cloneable (i.e. have multiple value)
'clone' => false,
),
),
);
return $meta_boxes;
}
?>
I updated the plugin with an download from here and it went away. Sorry about that - not sure what happened but reinstalling the plugin fixed it. 🙂
It's fine :). If you see any error, please just let me know.