Skip to content

Commit 936cf99

Browse files
committed
Check for existance of WPEditor ACF field before attempting to append the wordpress editor
Bump dependencies Fix some minor typos
1 parent 5dee423 commit 936cf99

File tree

10 files changed

+11
-197
lines changed

10 files changed

+11
-197
lines changed

dist/mix-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"/scripts/main.js": "/scripts/main.js",
3-
"/styles/main.css": "/styles/main.css"
2+
"/scripts/main.js": "/scripts/main.js?id=e88a03a6bc647c8891c1",
3+
"/styles/main.css": "/styles/main.css?id=d41d8cd98f00b204e980"
44
}

dist/scripts/field.js

Lines changed: 0 additions & 92 deletions
This file was deleted.

dist/scripts/main.js

Lines changed: 1 addition & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/styles/field.css

Lines changed: 0 additions & 2 deletions
This file was deleted.

dist/styles/main.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
/*# sourceMappingURL=resources/assets/styles/main.css.map */
2-
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9tYWluLnN0eWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEiLCJmaWxlIjoiL3N0eWxlcy9tYWluLmNzcyIsInNvdXJjZVJvb3QiOiIifQ==*/

fields/field.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111

1212
/**
13-
* ExampleField
13+
* WP Editor Field
1414
*/
1515
if (!class_exists('WPEditorField')) {
1616
class WPEditorField extends \acf_field

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,5 @@
9292
"stylus-loader": "^3.0.1",
9393
"webpack": "^3.5.5"
9494
},
95-
"dependencies": {
96-
}
95+
"dependencies": {}
9796
}

resources/assets/scripts/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
(function($){
22
$(document).ready(function() {
3+
if ($('.acf-field-wpeditor').length) {
34
$('.acf-field-wpeditor .acf-input').append($('#postdivrich'));
5+
}
46
});
57
})(jQuery);
File renamed without changes.

webpack.mix.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const mix = require('laravel-mix');
1+
const mix = require('laravel-mix');
22

33
/*
44
|--------------------------------------------------------------------------
@@ -12,14 +12,14 @@ const mix = require('laravel-mix');
1212
*/
1313

1414
const resources = 'resources';
15-
const assets = `${resources}/assets`;
16-
const dist = 'dist';
15+
const assets = `${resources}/assets`;
16+
const dist = 'dist';
1717

1818
mix.setPublicPath(dist);
1919
mix.setResourceRoot('../');
2020

2121
// Stylus
22-
mix.stylus(`${assets}/styles/main.styl`, `${dist}/styles/main.css`);
22+
mix.sass(`${assets}/styles/main.scss`, `${dist}/styles/main.css`);
2323

2424
// Javascript
2525
mix.js(`${assets}/scripts/main.js`, `${dist}/scripts`);

0 commit comments

Comments
 (0)