WP-tools/my-utility-plugin-V2/my-utility-plugin-V2.php

24 lines
659 B
PHP
Raw Permalink Normal View History

<?php
/*
Plugin Name: MUP Plugin
Description: All of the important functionality of your site belongs in this.
Version: 0.1
License: GPL
Author: Your Name
Author URI: yoururl
*/
function pgm_enqueue_styles(){
$template_url = get_template_directory_uri();
$plugin_url = plugin_dir_url( __FILE__ );
wp_register_style( 'pgm-style-css', $plugin_url.'css/style.css', false, NULL, 'all');
wp_enqueue_style( 'pgm-style-css' );
wp_register_script('pgm-custom-script', $plugin_url . 'js/custom-script.js', array('jquery'), null, true);
wp_enqueue_script('pgm-custom-script');
}
add_action( 'wp_enqueue_scripts', 'pgm_enqueue_styles' );
?>