-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathacf-move-wp-editor.php
55 lines (47 loc) · 1.34 KB
/
acf-move-wp-editor.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
<?php
/*
Plugin Name: Advanced Custom Fields: Move WP Editor
Plugin URI: https://github.com/log1x/acf-move-wp-editor
Description: A simple ACF Field that moves the WordPress content editor of a post or page to the location of this field.
Version: 1.0.0
Author: Log1x
Author URI: https://log1x.com
License: MIT License
License URI: http://opensource.org/licenses/MIT
*/
namespace Acf\Field\MoveWPEditor;
// Exit if accessed directly.
if (!defined('ABSPATH')) {
exit;
}
if (!class_exists('init')) {
class init
{
/**
* Construct
*/
public function __construct()
{
$this->settings = [
'version' => '1.0.0',
'url' => plugin_dir_url(__FILE__),
'path' => plugin_dir_path(__FILE__)
];
load_plugin_textdomain('acf-move-wp-editor', false, plugin_basename(dirname(__FILE__ )) . '/resources/lang');
add_action('acf/include_field_types', [$this, 'fields']);
add_action('acf/register_fields', [$this, 'fields']);
}
/**
* Include our ACF Field Types
*
* @param integer $version
* @return void
*/
public function fields($version = 5)
{
include_once('fields/field.php');
}
}
// Initialize
new init();
}