Skip to content

Commit dc771b1

Browse files
committed
Initial commit
0 parents  commit dc771b1

File tree

20 files changed

+7431
-0
lines changed

20 files changed

+7431
-0
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.php]
14+
indent_size = 4

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Application
2+
cache
3+
.cache-loader
4+
5+
# Remote Sync
6+
.remote-sync.json
7+
8+
# WP-CLI
9+
db-sync
10+
*.sql
11+
12+
# Vendor (e.g. Composer)
13+
vendor
14+
15+
# Node Package Manager
16+
node_modules
17+
18+
# Debug
19+
npm-debug.log
20+
yarn-error.log

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ACF Move WP Editor
2+
[![Packagist](https://img.shields.io/packagist/v/log1x/acf-move-wp-editor.svg?style=flat-square)](https://packagist.org/packages/log1x/acf-move-wp-editor)
3+
[![Packagist Downloads](https://img.shields.io/packagist/dt/log1x/acf-move-wp-editor.svg?style=flat-square)](https://packagist.org/packages/log1x/acf-move-wp-editor)
4+
5+
This is a simple ACF Field that moves the WordPress content editor of a post or page to the location of this field.
6+
7+
This can be useful for cleaning up your Edit Post screen with something like ACF tabs:
8+
9+
![Example](https://log1x.com/screenshots/2017-09-13_17-16-47_QrdD0.png)
10+
11+
## Installation
12+
Install ACF Move WP Editor using Composer:
13+
14+
```
15+
$ composer require log1x/move-wp-editor:dev-master
16+
```

acf-move-wp-editor.php

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?php
2+
/*
3+
Plugin Name: Advanced Custom Fields: Move WP Editor
4+
Plugin URI: https://github.com/log1x/acf-move-wp-editor
5+
Description: A simple ACF Field that moves the WordPress content editor of a post or page to the location of this field.
6+
Version: 1.0.0
7+
Author: Log1x
8+
Author URI: https://log1x.com
9+
10+
License: MIT License
11+
License URI: http://opensource.org/licenses/MIT
12+
*/
13+
14+
namespace Acf\Field\MoveWPEditor;
15+
16+
// Exit if accessed directly.
17+
if (!defined('ABSPATH')) {
18+
exit;
19+
}
20+
21+
if (!class_exists('init')) {
22+
class init
23+
{
24+
/**
25+
* Construct
26+
*/
27+
public function __construct()
28+
{
29+
$this->settings = [
30+
'version' => '1.0.0',
31+
'url' => plugin_dir_url(__FILE__),
32+
'path' => plugin_dir_path(__FILE__)
33+
];
34+
35+
load_plugin_textdomain('acf-move-wp-editor', false, plugin_basename(dirname(__FILE__ )) . '/resources/lang');
36+
add_action('acf/include_field_types', [$this, 'fields']);
37+
add_action('acf/register_fields', [$this, 'fields']);
38+
}
39+
40+
41+
/**
42+
* Include our ACF Field Types
43+
*
44+
* @param integer $version
45+
* @return void
46+
*/
47+
public function fields($version = 5)
48+
{
49+
include_once('fields/field.php');
50+
}
51+
}
52+
53+
// Initialize
54+
new init();
55+
}

composer.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "log1x/acf-move-wp-editor",
3+
"type": "wordpress-plugin",
4+
"license": "MIT",
5+
"description": "A simple ACF Field that moves the WordPress content editor of a post or page to the location of this field.",
6+
"homepage": "https://github.com/log1x/acf-move-wp-editor",
7+
"authors": [
8+
{
9+
"name": "Brandon Nifong",
10+
"email": "log1x@log1x.com",
11+
"homepage": "https://log1x.com"
12+
}
13+
],
14+
"keywords": [
15+
"wordpress"
16+
],
17+
"support": {
18+
"issues": "https://github.com/log1x/acf-move-wp-editor/issues"
19+
},
20+
"require": {
21+
"php": ">=7",
22+
"composer/installers": "~1.0"
23+
},
24+
"require-dev": {
25+
"squizlabs/php_codesniffer": "2.*"
26+
},
27+
"scripts": {
28+
"test": [
29+
"vendor/bin/phpcs --extensions=php --ignore=vendor/ ."
30+
]
31+
}
32+
}

composer.lock

Lines changed: 216 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/images/.gitkeep

Whitespace-only changes.

dist/mix-manifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"/scripts/main.js": "/scripts/main.js",
3+
"/styles/main.css": "/styles/main.css"
4+
}

0 commit comments

Comments
 (0)