WordPress panel is not loading after plugin activated with error: HTTP ERROR 500

when i try to activate Yoast Seo Plugin, my WordPress panel stop loading and the browser displays: HTTP ERROR 500.

I checked my error_log file and there was this error:

call_user_func_array() expects parameter 1 to be a valid callback, function ‘wp_generate_theme_initialize’ not found or invalid function name in …/wp-includes/class-wp-hook.php on line 286

which the line 286 is:

if ( $the_[‘accepted_args’] == 0 ) {
$value = call_user_func_array( $the_[‘function’], array() );
} elseif ( $the_[‘accepted_args’] >= $num_args ) {
$value = call_user_func_array($the_[‘function’], $args ); //Line 286
} else {
$value = call_user_func_array( $the_[‘function’], array_slice( $args, 0, (int)$the_[‘accepted_args’] ) );
}

I don’t it’s related to my problem or not cause the time of the error was right but when I delete the error_log file and refresh my wordpress panel the error_log file didn’t show any errors…

In case you need my function.php, here is 20 first lines of my code:

<?php
add_action(‘wordpress_theme_initialize’, ‘wp_generate_theme_initialize’);
// function wp_generate_theme_initialize( ) {
// echo “Designed by Mehdi Karimi”;
// }
add_action(‘after_setup_theme’, ‘setup_theme_after_run’, 999);
function setup_theme_after_run() {
if(has_action( ‘wordpress_theme_initialize’, ‘wp_generate_theme_initialize’)) {
add_action(‘wordpress_theme_initialize’, ‘wp_generate_theme_initialize’);
}
}
add_action(‘wp_footer’, ‘setup_theme_after_run_footer’, 1);
function setup_theme_after_run_footer() {
if(did_action(‘wordpress_theme_initialize’ )) {
add_action(‘wp_footer’, ‘wp_generate_theme_initialize’);
}
}

Here is my website: MegaTips
Thanks for your time… ♥

Read more here:: WordPress panel is not loading after plugin activated with error: HTTP ERROR 500

Leave a Reply

Your email address will not be published. Required fields are marked *