This is the error:
Call to a member function check_capabilities() on a non-object in /home/content/54/11786754/html/wp-includes/class-wp-customize-control.php on line 161
and this is my code in the functions.php
function lmao_customizer_register($wp_customize) {
$wp_customize->add_section('lmao_colors', array(
'title' => __('colors', 'lmao'),
'description' => 'modify the theme colors'
));
$wp_customize->add_setting('background_color', array(
'default' => '#fff',
'type' => 'option'
));
$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'background_color', array(
'label' => __('Edit Background Color', 'lmao'),
'section' => 'lmao_colors',
'settings' => 'background_color'
) ));
$wp_customize->add_setting('link_color', array(
'default' => '#fff',
'type' => 'option'
));
$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_color', array(
'label' => __('Edit link Color', 'lmao'),
'section' => 'lmao_colors',
'settings' => 'link_color'
) ));
$wp_customize->add_setting('link_background_color', array(
'default' => '#fff',
'type' => 'option'
));
$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_background_color', array(
'label' => __('Edit link background Color', 'lmao'),
'section' => 'lmao_colors',
'settings' => 'link_background_color'
) ));
$wp_customize->add_setting('link_background_color_hover', array(
'default' => '#fff',
'type' => 'option'
));
$wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_background_color_hover', array(
'label' => __('Edit link background hover Color', 'lmao'),
'section' => 'lmao_colors',
'settings' => 'link_background_color_hover'
) ));
//start image settings
$wp_customize->add_section('lmao_images', array(
'title' => __('Images', 'lmao'),
'description' => 'modify the theme images'
));
$wp_customize->add_setting('main_image', array(
'default' => 'http://hottraxstudioproductions.com/rawr/wp-content/uploads/2014/04/radio-logo.jpg',
'type' => 'option'
));
$wp_customize->add_control( new WP_Customize_image_Control($wp_customize, 'main_image', array(
'label' => __('Edit main image', 'lmao'),
'section' => 'lmao_images',
'settings' => 'main_image'
) ));
//start copyright settings
$wp_customize->add_section('lmao_copyright', array(
'title' => __('Copyright_Details', 'lmao'),
'description' => 'Edit copyright info'
));
$wp_customize->add_setting('Copyright_Details', array(
'default' => 'Copyright',
'type' => 'option'
));
$wp_customize->add_control('Copyright_Details', array(
'label' => __('Edit copyright info', 'lmao'),
'section' => 'lmao_copyright',
'settings' => 'copyright_details'
));
}
function lmao_css_customizer() {
?>
<style type="text/css">
body { background-color: #<?php echo get_theme_mod('background_color'); ? >;}
nav ul li a {
color: <?php echo get_theme_mod('link_color'); ?>;
background-color: <?php echo get_theme_mod('link_background_color'); ?>;
}
nav ul li a:hover {
background-color: <?php echo get_theme_mod('link_background_color_hover'); ?>;
}
</style>
<?php
}
add_action('wp_head', 'lmao_css_customizer');
add_action('customize_register', 'LMAO_customizer_register');
Please let me know if you need any more information…