PluginProbe
WowOptin: Next-Gen Popup Maker – Create Stunning Popups and Optins for Lead Generation / 1.4.40
WowOptin: Next-Gen Popup Maker – Create Stunning Popups and Optins for Lead Generation v1.4.40
1.4.47 1.4.46 1.4.45 1.4.44 1.4.43 1.4.42 1.4.41 1.4.40 1.4.39 1.4.38 1.4.37 1.4.36 1.1.2 1.2.0 1.2.1 1.2.2 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 All 63 releases
optin / optin.php

optin.php in WowOptin: Next-Gen Popup Maker – Create Stunning Popups and Optins for Lead Generation 1.4.40, at optin.php

102 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: WowOptin
4 * Description: A WordPress Optin plugin helps capture visitor info through customizable forms to grow your email list and boost lead generation!
5 * Requires at least: 6.4
6 * Requires PHP: 7.4
7 * Version: 1.4.40
8 * Author: WPXPO
9 * Author URI: https://wpxpo.com/
10 * License: GPLv3
11 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
12 * Text Domain: optin
13 * Domain Path: /languages
14 *
15 * @package optin
16 */
17
18 // If this file is called directly, abort.
19 if ( ! defined( 'WPINC' ) ) {
20 die;
21 }
22
23
24 define( 'OPTN_VERSION', '1.4.40' );
25 define( 'OPTN_BASE', plugin_basename( __FILE__ ) );
26 define( 'OPTN_DIR', plugin_dir_path( __FILE__ ) );
27 define( 'OPTN_URL', plugin_dir_url( __FILE__ ) );
28 define( 'OPTN_MIN_CAPABILITY', 'edit_pages' );
29 define( 'OPTN_CACHE_DAY', 3 );
30
31 use OPTN\Includes\Activator;
32 use OPTN\Includes\Deactivator;
33 use OPTN\Includes\Init;
34
35 /**
36 * The code that runs during plugin activation.
37 */
38 function optn_activate_plugin() {
39 Activator::activate();
40 }
41
42 /**
43 * The code that runs during plugin deactivation.
44 */
45 function optn_deactivate_plugin() {
46 Deactivator::deactivate();
47 }
48
49 register_activation_hook( __FILE__, 'optn_activate_plugin' );
50 register_deactivation_hook( __FILE__, 'optn_deactivate_plugin' );
51
52
53 /**
54 * Autoloader function
55 *
56 * @param string $class_name class name.
57 * @return void
58 */
59 function optn_autoloader( $class_name ) {
60 $namespace = 'OPTN\\';
61 $base_dir = OPTN_DIR;
62
63 $len = strlen( $namespace );
64 if ( strncmp( $namespace, $class_name, $len ) !== 0 ) {
65 return;
66 }
67
68 $relative_class = substr( $class_name, $len );
69
70 $segments = explode( '\\', $relative_class );
71 $file_name = array_pop( $segments );
72 $subfolder = strtolower( implode( '/', $segments ) );
73
74 $prefix = ( strpos( $subfolder, 'traits' ) !== false ) ? 'trait-' : 'class-';
75
76 $file_name = strtolower(
77 preg_replace( '/([a-z])([A-Z])/', '$1-$2', $file_name )
78 );
79
80 $file = rtrim( $base_dir . $subfolder, '/' ) . '/' . $prefix . $file_name . '.php';
81
82 if ( file_exists( $file ) ) {
83 require_once $file;
84 return;
85 }
86 }
87
88 spl_autoload_register( 'optn_autoloader' );
89
90
91 /**
92 * Begins execution of the plugin.
93 *
94 * @since 1.0.0
95 */
96 function optn_run_plugin() {
97 $plugin = new Init();
98 $plugin->run();
99 }
100
101 optn_run_plugin();
102