Plugin shows js and css error which is not there in file structure
-
Hello Author,
Greetings for the day!
Your plugin shows .css and .js errors when plugin is active. The issue is with toolkit.php line#168 & #173 where you have used css and js file which is actually not in plugin folder.
public function enqueue_scripts() { /** * All styles goes here */ wp_enqueue_style( 'baseplugin-styles', plugins_url( 'assets/css/style.css', __FILE__ ), false, date( 'Ymd' ) ); /** * All scripts goes here */ wp_enqueue_script( 'baseplugin-scripts', plugins_url( 'assets/js/script.js', __FILE__ ), array( 'jquery' ), false, true ); /** * Example for setting up text strings from Javascript files for localization * * Uncomment line below and replace with proper localization variables. */ // $translation_array = array( 'some_string' => __( 'Some string to translate', 'baseplugin' ), 'a_value' => '10' ); // wp_localize_script( 'base-plugin-scripts', 'baseplugin', $translation_array ) ); }
You can easily check same from browser console.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Plugin shows js and css error which is not there in file structure’ is closed to new replies.