Repository navigation
Expand file tree
/
Copy pathback-button-widget.php
More file actions
81 lines (73 loc) · 1.9 KB
/
Copy pathback-button-widget.php
File metadata and controls
81 lines (73 loc) · 1.9 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/**
* Plugin Name: Back Button Widget
* Plugin URI: https://wpfactory.com/item/back-button-widget-wordpress-plugin/
* Description: Back button widget for WordPress.
* Version: 1.8.0
* Author: WPFactory
* Author URI: https://wpfactory.com
* Text Domain: back-button-widget
* Domain Path: /langs
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*
* @package WPFactory\Back_Button_Widget
*/
defined( 'ABSPATH' ) || exit;
if ( 'back-button-widget.php' === basename( __FILE__ ) ) {
if ( ! function_exists( 'alg_back_button_widget_is_pro_activated' ) ) {
/**
* Check if Pro plugin version is activated.
*
* @version 1.8.0
* @since 1.5.0
*/
function alg_back_button_widget_is_pro_activated() {
$plugin = 'back-button-widget-pro/back-button-widget-pro.php';
return (
in_array(
$plugin,
(array) get_option( 'active_plugins', array() ),
true
) ||
(
is_multisite() &&
array_key_exists(
$plugin,
(array) get_site_option( 'active_sitewide_plugins', array() )
)
)
);
}
}
if ( alg_back_button_widget_is_pro_activated() ) {
return;
}
}
/**
* Plugin version.
*/
defined( 'ALG_BACK_BUTTON_WIDGET_VERSION' ) || define( 'ALG_BACK_BUTTON_WIDGET_VERSION', '1.8.0' );
/**
* Plugin file.
*/
defined( 'ALG_BACK_BUTTON_WIDGET_FILE' ) || define( 'ALG_BACK_BUTTON_WIDGET_FILE', __FILE__ );
/**
* Include the main plugin class.
*/
require_once plugin_dir_path( __FILE__ ) . 'includes/class-alg-back-button-widget.php';
if ( ! function_exists( 'alg_back_button_widget' ) ) {
/**
* Returns the main instance of Alg_Back_Button_Widget to prevent the need to use globals.
*
* @version 1.0.0
* @since 1.0.0
*/
function alg_back_button_widget() {
return Alg_Back_Button_Widget::instance();
}
}
/**
* Initialize the plugin.
*/
add_action( 'plugins_loaded', 'alg_back_button_widget' );