$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>theme development - WordPress panel is not loading after plugin activated with error: HTTP ERROR 500|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin9PV0评论

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... ♥

Post a comment

comment list (0)

  1. No comments so far