-
Notifications
You must be signed in to change notification settings - Fork 2
/
autocomplete.php
63 lines (52 loc) · 2.44 KB
/
autocomplete.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
56
57
58
59
60
61
62
63
<?php
/**
* @package autocomplete
*/
/*
Plugin Name: AutoComplete.sh
Plugin URI: https://www.autocomplete.sh
Description: Make your blog posts intelligent with AutoComplete's NLP text generation API.
Version: 1.0
Author: AutoComplete.sh
Author URI: https://github.com/AutoComplete-sh
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: autocomplete
*/
/*
This program 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 (at your option) any later version.
This program 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 program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Copyright 2022 AutoComplete.sh.
*/
// Make sure we don't expose any info if called directly
if ( !function_exists( 'add_action' ) ) {
echo 'This plugin cannot be called directly';
exit;
}
define( 'AUTOCOMPLETE_VERSION', '1.0.0-'.time() );
define( 'AUTOCOMPLETE_MINIMUM_WP_VERSION', '5.0' );
define( 'AUTOCOMPLETE_DESCRIPTION', 'Make your blog posts intelligent with AutoComplete\'s NLP text generation API');
define( 'AUTOCOMPLETE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'AUTOCOMPLETE_URL', 'https://autocomplete.sh');
define( 'AUTOCOMPLETE_ATTRIBUTION', '?r=ac-wp-plugin&cs=ac-wp-plugin&crs=1653005781');
define( 'AUTOCOMPLETE_URL_API', 'https://api.autocomplete.sh/v1');
define( 'AUTOCOMPLETE_EMAIL_SUPPORT', '[email protected]');
require_once(AUTOCOMPLETE_PLUGIN_DIR . 'helpers.php');
register_activation_hook( __FILE__, array( 'AutoComplete', 'plugin_activation' ) );
register_deactivation_hook( __FILE__, array( 'AutoComplete', 'plugin_deactivation' ) );
require_once( AUTOCOMPLETE_PLUGIN_DIR . 'class.autocomplete.php' );
require_once( AUTOCOMPLETE_PLUGIN_DIR . 'class.autocomplete_metabox.php' );
add_action( 'init', array( 'AutoComplete', 'init' ) );
if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
require_once( AUTOCOMPLETE_PLUGIN_DIR . 'class.autocomplete_admin.php' );
add_action( 'init', array( 'AutoComplete_Admin', 'init' ) );
}