This repository has been archived by the owner on May 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
wp-product-review.php
123 lines (109 loc) · 3.5 KB
/
wp-product-review.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
/**
* Main loader file
*
* This file is read by WordPress to generate the plugin information in the plugin
* admin area. This file also includes all of the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
*
* @link https://themeisle.com/
* @since 3.0.0
* @package WPPR
*
* @wordpress-plugin
* Plugin Name: WP Product Review Lite
* Plugin URI: https://themeisle.com/plugins/wp-product-review/
* Description: The highest rated and most complete review plugin, now with rich snippets support. Easily turn your basic posts into in-depth reviews.
* Version: 3.7.11
* Author: ThemeIsle
* Author URI: https://themeisle.com/
* Requires at least: 3.5
* Stable tag: trunk
* WordPress Available: yes
* Pro Slug: wp-product-review-pro
* Requires License: no
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: wp-product-review
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* The code that runs during plugin activation.
* This action is documented in includes/class-wppr-activator.php
*/
function activate_wppr() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-wppr-activator.php';
Wppr_Activator::activate();
}
/**
* The code that runs during plugin deactivation.
* This action is documented in includes/class-wppr-deactivator.php
*/
function deactivate_wppr() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-wppr-deactivator.php';
Wppr_Deactivator::deactivate();
}
register_activation_hook( __FILE__, 'activate_wppr' );
register_deactivation_hook( __FILE__, 'deactivate_wppr' );
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*
* @since 3.0.0
*/
function run_wppr() {
define( 'WPPR_LITE_VERSION', '3.7.11' );
define( 'WPPR_PATH', dirname( __FILE__ ) );
define( 'WPPR_SLUG', 'wppr' );
define( 'WPPR_UPSELL_LINK', 'https://themeisle.com/plugins/wp-product-review/' );
define( 'WPPR_URL', untrailingslashit( plugins_url( '/', __FILE__ ) ) );
define( 'WPPR_CACHE_DISABLED', false );
define( 'WPPR_BASENAME', plugin_basename( __FILE__ ) );
$plugin = new WPPR();
$plugin->run();
require_once WPPR_PATH . '/includes/legacy.php';
require_once WPPR_PATH . '/includes/functions.php';
$vendor_file = WPPR_PATH . '/vendor/autoload_52.php';
if ( is_readable( $vendor_file ) ) {
require_once $vendor_file;
}
add_filter( 'pirate_parrot_log', 'wppr_lite_register_parrot', 10, 1 );
add_filter( 'themeisle_sdk_products', 'wppr_lite_register_sdk' );
}
/**
* Registers with the parrot plugin
*
* @param array $plugins Array of plugins.
*/
function wppr_lite_register_parrot( $plugins ) {
$plugins[] = WPPR_SLUG;
return $plugins;
}
/**
* Register product to sdk.
*
* @param array $products Array of products.
*
* @return array All products registered to sdk.
*/
function wppr_lite_register_sdk( $products ) {
$products[] = __FILE__;
return $products;
}
require( 'class-wppr-autoloader.php' );
WPPR_Autoloader::define_namespaces( array( 'WPPR' ) );
/**
* Invocation of the Autoloader::loader method.
*
* @since 1.0.0
*/
spl_autoload_register( array( 'WPPR_Autoloader', 'loader' ) );
run_wppr();