forked from darkwhispering/Advanced-Browser-Check
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadvanced-browser-check.php
More file actions
44 lines (33 loc) · 1.09 KB
/
Copy pathadvanced-browser-check.php
File metadata and controls
44 lines (33 loc) · 1.09 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
<?php
/*
Plugin Name: Advanced Browser Check
Plugin URI: http://darkwhispering.com/wp-plugins/advanced-browser-check
Description: Tell IE users to change browser? Or is your site for Chrome only? Now you choose what browsers should trigger a warning popup or not on your site.
Author: Mattias Hedman
Version: 4.2.1
Author URI: http://www.darkwhispering.com
*/
define( 'ABC_VERSION', '4.2.1' );
if ( ! defined('ABC_DIR_PATH' ) )
{
define( 'ABC_DIR_PATH', plugin_dir_path( __FILE__ ) );
}
add_action( 'wp_ajax_abc_ajax', 'abc_ajax' );
add_action( 'wp_ajax_nopriv_abc_ajax', 'abc_ajax' );
load_plugin_textdomain( 'advanced-browser-check', false, basename( dirname( __FILE__ ) ) . '/languages' );
// Create html output on ajax request
function abc_ajax()
{
include_once( 'abc-core.php' );
include_once( 'abc-output.php' );
$output = new ABC_Output;
echo $output->html();
die();
}
// If it's not an ajax request, load settings page
if ( ! defined('DOING_AJAX') || ! DOING_AJAX )
{
include_once( 'abc-core.php' );
include_once( 'abc-settings-page.php' );
new ABC_Core;
}