-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathacf-bbpress_forums.php
executable file
·69 lines (55 loc) · 1.06 KB
/
acf-bbpress_forums.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
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/*
Plugin Name: Advanced Custom Fields: bbPress Forums
Plugin URI: https://github.com/stormuk/bbPress-ACF-field
Description: bbPress forum field for ACF
Version: 1.0.0
Author: Adam Pope - Storm Consultancy
Author URI: http://www.stormconsultancy.co.uk
License: MIT
License URI: http://opensource.org/licenses/MIT
*/
class acf_field_bbpress_forums_plugin
{
/*
* Construct
*
* @description:
* @since: 3.6
* @created: 1/04/13
*/
function __construct()
{
// version 4+
add_action('acf/register_fields', array($this, 'register_fields'));
// version 3-
add_action( 'init', array( $this, 'init' ), 5);
}
/*
* Init
*
* @description:
* @since: 3.6
* @created: 1/04/13
*/
function init()
{
if(function_exists('register_field'))
{
register_field('acf_field_bbpress_forums', dirname(__File__) . '/bbpress_forums-v3.php');
}
}
/*
* register_fields
*
* @description:
* @since: 3.6
* @created: 1/04/13
*/
function register_fields()
{
include_once('bbpress_forums-v4.php');
}
}
new acf_field_bbpress_forums_plugin();
?>