-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkmz-github-repos.php
40 lines (36 loc) · 925 Bytes
/
kmz-github-repos.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
36
37
38
39
40
<?php
/*
Plugin Name: KMZ GitHub Repos
Description: Custom widget for display latest GitHub repos
Version: 0.1
Author: Vladimir Kamuz
Author URI: https://wpdev.pp.ua
Plugin URI: https://github.com/kamuz/wp-github-repos
Licence: GPL2
Text Domain: wpgithubrepos
*/
/**
* Exit if Access Directly
*/
if(!defined('ABSPATH')){
exit;
}
/**
* Load Class
*/
require_once(plugin_dir_path(__FILE__) . '/github-repos-class.php');
/**
* Load Scripts and Styles
*/
function kmz_gr_css_js(){
wp_enqueue_style('kmz_gr_style', plugin_dir_url(__FILE__) . 'css/style.css');
wp_enqueue_script('kmz_gr_script', plugin_dir_url(__FILE__) . 'js/script.js', array('jquery'), '0.0.1', true);
}
add_action('wp_enqueue_scripts', 'kmz_gr_css_js');
/**
* Register widget
*/
function kmz_register_github_repos_widget() {
register_widget( 'GitHub_Repos_Widget' );
}
add_action('widgets_init', 'kmz_register_github_repos_widget');