-
Notifications
You must be signed in to change notification settings - Fork 1
/
tinyevents.php
35 lines (31 loc) · 1.29 KB
/
tinyevents.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/*
Plugin Name: Tiny Events
Plugin URI: https://github.com/m9n/tinyevents
Description: A minimal events plugin for WordPress. Does the basics with gusto. Packed with ideas for extending it "the WordPress way", to perfectly suit your needs.
Version: 0.1
Author: Mina Nielsen
Author URI: http://minanielsen.net
License: GPL V2 or higher
License URI: https://github.com/m9n/tinyevents/blob/master/LICENSE
*/
//require 'inc/admin.php';
require 'inc/functions.php';
require 'inc/post-types.php';
require 'inc/fields.php';
//require 'inc/widgets.php';
require 'inc/shortcodes.php';
function tinyevents_activate() {
flush_rewrite_rules();
}
register_activation_hook( __FILE__, 'tinyevents_activate' );
function tinyevents_enqueue_admin_styles_and_scripts() {
wp_enqueue_style( 'tinyevents', plugin_dir_url( __FILE__ ) . 'css/admin.css' );
wp_enqueue_script( 'jquery-ui-datepicker' );
wp_enqueue_script( 'tinyevents-js', plugin_dir_url( __FILE__ ) . 'js/tinyevents.js' );
}
add_action( 'admin_enqueue_scripts', 'tinyevents_enqueue_admin_styles_and_scripts' );
function tinyevents_enqueue_styles_and_scripts() {
wp_enqueue_style( 'tinyevents', plugin_dir_url( __FILE__ ) . 'css/tinyevents.css' );
}
add_action( 'wp_enqueue_scripts', 'tinyevents_enqueue_styles_and_scripts' );