-
Notifications
You must be signed in to change notification settings - Fork 2
/
wp-opauth.php
51 lines (45 loc) · 1.65 KB
/
wp-opauth.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
<?php
/*
Plugin Name: Opauth
Plugin URI: http://labculturadigital.org/
Description: Adds Opauth (opauth.org) support
Author: Laboratório de Cultura Digital - Flávio Zavan
Version: 0.01
Text Domain: wp-opauth
Network: true
*/
define('WPOPAUTH_CONF_FILE',
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'opauth.conf.php');
define('WPOPAUTH_OPAUTH_PATH',
dirname(__FILE__)
. DIRECTORY_SEPARATOR . 'opauth'
. DIRECTORY_SEPARATOR . 'lib'
. DIRECTORY_SEPARATOR . 'Opauth');
define('WPOPAUTH_PATH', dirname(__FILE__));
define('WPOPAUTH_USER_TABLE_NAME', 'wpopauth_users');
define('WPOPAUTH_OPAUTH_CLASS_FILE',
WPOPAUTH_OPAUTH_PATH . DIRECTORY_SEPARATOR . 'Opauth.php');
define('WPOPAUTH_DEFAULT_OPENID_ICON',
substr(plugins_url('favicons/openid.png', __FILE__), strlen(site_url())));
/* 4 kilobytes should be enough for tiny 16x16 icons */
define('WPOPAUTH_MAXIMUM_ICON_SIZE', 1 << 12);
define('WPOPAUTH_INVALID_EMAIL', '[email protected]');
define('WPOPAUTH_REDIRECT_STRATEGY', '_redirect');
/* This is not the best place for loading the translations. But we need for the
* error message below. */
load_plugin_textdomain('wp-opauth', false,
dirname(plugin_basename(__FILE__)) . '/languages/');
if (!file_exists(WPOPAUTH_OPAUTH_CLASS_FILE))
{
trigger_error(__('The Opauth class file was not found.', 'wp-opauth') . ' '
. __('Did you download the submodules?', 'wp-opauth') . ' '
. __('Read the README file for more information', 'wp-opauth'),
E_USER_NOTICE);
return;
}
require_once WPOPAUTH_CONF_FILE;
require_once WPOPAUTH_OPAUTH_CLASS_FILE;
require_once WPOPAUTH_PATH . DIRECTORY_SEPARATOR . 'wpopauth.php';
global $WPOpauth;
$WPOpauth = new WPOpauth($config);
?>