Skip to content

Commit 16b3f20

Browse files
committed
Implementing a Snippet Structure
1 parent 5f63552 commit 16b3f20

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
# GravityView-Snippets
2-
Little plugins to extend the functionality of GravityView
1+
# Plugins Index
2+
Not all the plugins are displayed here, because some of them are specific to a customer.
3+
4+
Each branch on this Repository is a plugin, so you can [see them all here](https://github.com/katzwebservices/gv-snippets/branches/active).

plugin.php

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
/**
3+
* Plugin Name: GV Addon: __description__
4+
* Plugin URI: https://github.com/katzwebservices/gv-snippets/tree/__ID__
5+
* Description: __description__
6+
* Version: 0.1.0
7+
* Author: __author__
8+
* Author URI: __author_url__
9+
* License: GPL-2.0+
10+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
11+
*/
12+
13+
// If this file is called directly, abort.
14+
if ( ! defined( 'WPINC' ) ){
15+
die;
16+
}
17+
18+
class GV_Snippet_ID {
19+
public static $ID = ID;
20+
21+
private static $_instance = null;
22+
23+
public static function instance(){
24+
if ( ! ( self::$_instance instanceof self ) ) {
25+
self::$_instance = new self();
26+
}
27+
28+
return self::$_instance;
29+
}
30+
31+
public function __construct(){
32+
33+
}
34+
}
35+
add_action( 'plugins_loaded', array( 'GV_Snippet_ID', 'instance' ), 15 );

0 commit comments

Comments
 (0)