From 992a9d6ca186bb4399143dd5ee72a27a3b4909aa Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 26 Oct 2020 18:03:48 +0100 Subject: Initial commit --- src/MetaBox.php | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 src/MetaBox.php (limited to 'src/MetaBox.php') diff --git a/src/MetaBox.php b/src/MetaBox.php new file mode 100644 index 0000000..d11336f --- /dev/null +++ b/src/MetaBox.php @@ -0,0 +1,81 @@ + + + $file, + 'codemirror' => [ + 'theme' => Settings::getCodeMirrorTheme(), + ], + ]); + wp_add_inline_script('code-editor', sprintf('jQuery( function() { wp.codeEditor.initialize( "timber-editor_content", %s ); } );', wp_json_encode($settings))); + } +} -- cgit v1.2.3