1<?php
2function pw_load_scripts() {
3
4 wp_enqueue_script('pw-script', plugin_dir_url( __FILE__ ) . 'js/pw-script.js');
5 wp_localize_script('pw-script', 'pw_script_vars', array(
6 'alert' => __('Hey! You have clicked the button!', 'pippin')
7 )
8 );
9
10}
11add_action('wp_enqueue_scripts', 'pw_load_scripts');