-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.php
executable file
·40 lines (33 loc) · 1.26 KB
/
plugin.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
<?php
/*
Plugin Name: Back to Oxygen Templates
Plugin URI: https://wpdevdesign.com/back-to-oxygen-templates-plugin/
Description: Adds "Templates" menu item under "Back to WP" menu in Oxygen editor.
Version: 1.0.1
Author: Sridhar Katakam
Author URI: https://wpdevdesign.com
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
This plugin is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
any later version.
This plugin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with This plugin. If not, see {URI to Plugin License}.
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
add_action( 'oxygen_enqueue_ui_scripts', 'btot_enqueue_files' );
/**
* Loads the plugin's JS file.
*/
function btot_enqueue_files() {
if ( defined( 'SHOW_CT_BUILDER' ) ) {
wp_enqueue_script( 'back-to-oxygen-templates', plugin_dir_url( __FILE__ ) . 'assets/js/main.js', array( 'jquery' ), '1.0.0', true );
}
}