-
Notifications
You must be signed in to change notification settings - Fork 9
/
acf-child-post-field.php
48 lines (39 loc) · 1.08 KB
/
acf-child-post-field.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
<?php
/**
* Plugin Name: Advanced Custom Fields: Child Post Field
* Plugin URI: https://github.com/lucasstark/acf-child-post-field/
* Description: Adds the ability to manage related posts directly from a parent post.
* Version: 0.0.0-alpha
* Author: Lucas Stark
* Author URI: http://lucasstark.com
* Requires at least: 4.0
* Tested up to: 4.1
*
* Text Domain: acf_child_post
* Domain Path: /i18n/languages/
*
* GitHub Plugin URI: lucasstark/acf-child-post-field
*
* @package ACF_Child_Post_Field
* @category Core
* @author Lucas Stark
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class ACF_Child_Post_Field {
private static $instance;
public static function register() {
if ( self::$instance == null ) {
self::$instance = new ACF_Child_Post_Field();
}
}
public function __construct() {
add_action('acf/include_field_types', array($this, 'on_include_field_types'));
}
public function on_include_field_types() {
require_once 'acf-child-post-field-v5.php';
ACF_Child_Post_Field_V5::register();
}
}
ACF_Child_Post_Field::register();