WordPress PHP version

You can check your .htaccess file. WordPress will check if you have this line: # Use PHP 7.3 as default If it’s not the latest PHP version (i.e PHP 5.6), even if you are running the latest version on your host, your dashboard will show that warning.

Change Woo Custom Endpoint Titles from a Plugin

public function start(){ add_action(‘init’, array($this, ‘knp_supplier_endpoint’)); //Add endpoint urls add_action(‘woocommerce_account_product-submissions_endpoint’, array($this, ‘knp_product_submissions_content’)); add_action(‘woocommerce_account_submission-form_endpoint’, array($this, ‘knp_submission_form_content’)); add_action(‘woocommerce_account_review_endpoint’, array($this, ‘knp_review_content’)); add_action(‘woocommerce_account_delete_endpoint’, array($this, ‘knp_delete_content’)); //Answer using this filter add_filter( ‘the_title’, array($this, ‘knpv_title_filter’), 10, 2); } public function knpv_title_filter($title, $id = null){ global $wp_query; if (in_the_loop() && array_key_exists(‘submission-form’, $wp_query->query)) { $title=”Create / Edit Submission”; } elseif (in_the_loop() && array_key_exists(‘product-submissions’, … Read more

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