WordPress generate images size after upload

I see 2 problems in your last part. You didn’t add hook for the code. Without it, I doubt that the add_image_size function will be executed. I suggest you wrap it in another function and add to after_setup_theme hook with add_action function. I think the way you use function_exists is unnecessary. With the way you … Read more

register dependency css and js inside a plugin class

You’re using the incorrect hook. The only hook is wp_enqueue_scripts (plural). You use wp_enqueue_style() and wp_register_script() etc. on that hook, but the hook is always the same. So this: add_action(‘wp_enqueue_script’ , array( $this, ‘initBootstrap’ )); add_action(‘wp_enqueue_style’ , array( $this, ‘initBootstrap’ )); add_action(‘wp_register_script’ , array( $this, ‘initParallax’ )); add_action(‘wp_register_style’ , array( $this, ‘initParallax’ )); add_action(‘wp_register_script’ , … Read more

in_array() says array is a bool?

Welcome to WPSE. I think I see your issue, but without access to the output of rwmb_meta( ‘modules’, array( ‘object_type’ => ‘setting’ ), ‘kdc-site-functions’ ), I cannot be sure. Your problem appears to be that you are looping through $all_modules, but using in_array() to examine $active_modules. Based on your loop, here is what I would … Read more