-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathGrain.php
56 lines (53 loc) · 1015 Bytes
/
Grain.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace Rye;
/**
* Grain
*
* Here is where you can specify all of the filters,
* actions, shortcodes, helpers and any other methods
* that the theme will need.
*
* Usage:
* You can use this class throughout the theme in the
* following ways.
*
* For static methods (good for helpers):
* Grain::myStaticMethod();
*
* For instance methods (good for singleton needs):
* Rye::$grain->myInstanceMethod();
*
* @packaged rye
**/
class Grain
{
/**
* Constructor
*
* This is a good place to add hooks.
*
* @return void
**/
public function __construct()
{
add_action('init', array($this, '_init'));
}
/**
* Called on WP's init.
*
* @reference http://codex.wordpress.org/Plugin_API/Action_Reference/init
* @return void
**/
public function _init()
{
// Any init stuff here.
}
/**
* Add more methods!
*
* @return void
**/
public function somethingElse()
{
}
}