PluginProbe
ONTRApages / 1.2
ONTRApages v1.2
trunk 1.1.7 1.1.8 1.2 1.2.10 1.2.11 1.2.12
ontrapages / ontrapages.php

ontrapages.php in ONTRApages 1.2, at ontrapages.php

82 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package ONTRApages
4 */
5 /*
6 Plugin Name: ONTRApages
7 Plugin URI: http://ONTRApages.com
8 Description: ONTRApages for WordPress allows ONTRAPORT & ONTRApages.com users to connect to their accounts and easily host their landing pages on their own WordPress sites. Get your free ONTRApages.com account today.
9 Version: 1.2
10 Author: ONTRAPORT
11 Author URI: http://ONTRAPORT.com/
12 License: GPLv2 or later
13 Text Domain: ONTRApages.com
14 */
15
16 /*
17 This program is free software; you can redistribute it and/or
18 modify it under the terms of the GNU General Public License
19 as published by the Free Software Foundation; either version 2
20 of the License, or (at your option) any later version.
21
22 This program is distributed in the hope that it will be useful,
23 but WITHOUT ANY WARRANTY; without even the implied warranty of
24 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 GNU General Public License for more details.
26
27 You should have received a copy of the GNU General Public License
28 along with this program; if not, write to the Free Software
29 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30 */
31
32 // Don't show anything if called directly
33 if ( !function_exists( 'add_action' ) )
34 {
35 exit;
36 }
37
38 define( 'ONTRAPAGES_VERSION', '1.2' );
39 define( 'ONTRAPAGES__MINIMUM_WP_VERSION', '4.0' );
40 define( 'ONTRAPAGES__PLUGIN_URL', plugin_dir_url( __FILE__ ) );
41 define( 'ONTRAPAGES__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
42 define( 'OPAPI', 'https://api.ontraport.com/1/' );
43 define( 'OPGAPI', 'https://api.ontrapages.com/' );
44
45 require_once( ONTRAPAGES__PLUGIN_DIR . 'OPCoreFunctions.php' );
46 require_once( ONTRAPAGES__PLUGIN_DIR . 'OPAdminSettings.php' );
47 require_once( ONTRAPAGES__PLUGIN_DIR . 'OPObjects.php' );
48 require_once( ONTRAPAGES__PLUGIN_DIR . 'ONTRApages.php' );
49 // require_once( ONTRAPAGES__PLUGIN_DIR . 'ONTRAforms.php' );
50
51 // Run these functions on WP plugin activation and deactivation
52 register_activation_hook( __FILE__, array( 'OPAdminSettings', 'ontrapagesActivation' ) );
53 register_deactivation_hook( __FILE__, array( 'OPAdminSettings', 'ontrapagesDeactivation' ) );
54
55 // Initialize OP page and form settings
56 add_action( 'init', array( 'ONTRApages', 'init' ) );
57 // add_action( 'init', array( 'ONTRAforms', 'init' ) );
58
59 // Admin settings
60 if ( is_admin() )
61 {
62 require_once( ONTRAPAGES__PLUGIN_DIR . 'OPObjects.php' );
63 require_once( ONTRAPAGES__PLUGIN_DIR . 'ONTRApagesAdmin.php' );
64 // require_once( ONTRAPAGES__PLUGIN_DIR . 'ONTRAformsAdmin.php' );
65
66 // Initialize OP Admin settings and add admin scripts / styles
67 add_action( 'admin_menu', array( 'OPAdminSettings', 'adminSettings' ) );
68 add_action( 'admin_enqueue_scripts', array( 'OPAdminSettings', 'adminScripts' ) );
69
70 // Initialize any necessary Admin Settings &/or checks
71 add_action( 'init', array( 'OPAdminSettings', 'init' ) );
72
73 // Initalize OP Admin page and form settings
74 add_action( 'init', array( 'ONTRApagesAdmin', 'init' ) );
75 // add_action( 'init', array( 'ONTRAformsAdmin', 'init' ) );
76
77 // Fix the wrong API settings that were set in v1.1
78 if ( get_option('opAPIFix') === false )
79 {
80 OPAdminSettings::fixAPISettings();
81 }
82 }