solved 404 not found on get style and script

This commit is contained in:
lenovo
2022-10-26 14:05:02 +02:00
parent 4b053a5582
commit c9e794b4ec
4 changed files with 8 additions and 23 deletions

View File

@@ -27,12 +27,6 @@ function console_log($output, $with_script_tags = true) {
echo $js_code;
}
//add_action( "plugins_loaded", "plugin_path" ) ;
//function plugin_path(){
// define( 'PLUGIN_DIR_PATH', dirname(__FILE__) );
// define( 'PLUGIN_URL_PATH', WP_PLUGIN_URL.'/'.plugin_basename( dirname(__FILE__) ).'/' );
//}
add_action('admin_menu', 'ink_menu_page');
function ink_menu_page() {
add_menu_page('GM', 'Google Map', 'manage_options', 'gm_setting', 'ink_gm_setting', '', 120);
@@ -72,14 +66,8 @@ add_action( 'init', 'my_init_script' );
function my_init_script() {
$script_path = plugins_url('script.js', __FILE__);
wp_enqueue_script('my_script', $script_path, array('jquery'));
console_log("script_path :");
console_log($script_path);
//$style_path = plugins_url('temp/style.css', dirname(__FILE__));
$style_path = plugins_url('style.css', __FILE__);
//$style_path = PLUGIN_URL_PATH . "style.css";
wp_enqueue_style('my_style', $style_path);
console_log("style_path :");
console_log($style_path);
}
function show_google_map() {