-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwp-crowdfunding.php
68 lines (61 loc) · 1.97 KB
/
wp-crowdfunding.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/*
* Plugin Name: WP Crowdfunding
* Plugin URI: https://www.themeum.com/product/wp-crowdfunding-plugin/
* Description: The Ultimate Fundraising and Backer Plugin for WordPress.
* Version: 2.1.12
* Author: Themeum
* Author URI: https://themeum.com
* Text Domain: wp-crowdfunding
* Requires at least: 5.9
* Tested up to: 6.6.2
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
*/
defined( 'ABSPATH' ) || exit;
/**
* Support for Multi Network Site
*/
if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
require_once ABSPATH . '/wp-admin/includes/plugin.php';
}
/**
* @Type
* @Version
* @Directory URL
* @Directory Path
* @Plugin Base Name
*/
define( 'WPCF_FILE', __FILE__ );
define( 'WPCF_VERSION', '2.1.11' );
define( 'WPCF_DIR_URL', plugin_dir_url( WPCF_FILE ) );
define( 'WPCF_DIR_PATH', plugin_dir_path( WPCF_FILE ) );
define( 'WPCF_BASENAME', plugin_basename( WPCF_FILE ) );
/**
* Load Text Domain Language
*/
add_action( 'init', 'wpcf_language_load' );
function wpcf_language_load() {
load_plugin_textdomain( 'wp-crowdfunding', false, basename( dirname( WPCF_FILE ) ) . '/languages/' );
}
if ( ! function_exists( 'wpcf_function' ) ) {
function wpcf_function() {
require_once WPCF_DIR_PATH . 'includes/Functions.php';
return new \WPCF\Functions();
}
}
if ( ! class_exists( 'Crowdfunding' ) ) {
require_once WPCF_DIR_PATH . 'includes/Crowdfunding.php';
require_once WPCF_DIR_PATH . 'includes/register_api_hook.php';
new \WPCF\Crowdfunding();
}
// wp_login_form() to display login form in a jQuery dialog window.
add_action( 'wp_login_failed', 'wpcf_front_end_login_fail' ); // hook failed login
function wpcf_front_end_login_fail( $username ) {
$referrer = $_SERVER['HTTP_REFERER'];
if ( ! empty( $referrer ) && ! strstr( $referrer, 'wp-login' ) && ! strstr( $referrer, 'wp-admin' ) ) {
wp_redirect( $referrer . '?login=failed' );
exit;
}
}