asset version code is buggy
-
in the osom-modal-login.php there is this code:
wp_enqueue_style( ‘osom-ml-admin-style’, $plugin_url . ‘/assets/css/admin-osom-modal-login.css’, OSOM_ML_VERSION, true );
and
wp_enqueue_style( ‘osom-ml-style’, $plugin_url . ‘/assets/css/osom-modal-login.css’, OSOM_ML_VERSION, true );
so when I tried change the css file, then I changed the version of OSOM_ML_VERSION, the loaded assets (css file) is not changing.
the parameter of wp_enqueue_style is wp_enqueue_style( string $handle, string $src = ”, string[] $deps = array(), string|bool|null $ver = false, string $media = ‘all’ )
so the correct code will be
wp_enqueue_style( ‘osom-ml-admin-style’, $plugin_url . ‘/assets/css/admin-osom-modal-login.css’, ”, OSOM_ML_VERSION, ‘all’ );
and
wp_enqueue_style( ‘osom-ml-style’, $plugin_url . ‘/assets/css/osom-modal-login.css’, ”, OSOM_ML_VERSION, ‘all’ );
I have tried the last one and it’s working.
You must be logged in to reply to this topic.