-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathwp-postratings.php
More file actions
111 lines (96 loc) · 4.19 KB
/
Copy pathwp-postratings.php
File metadata and controls
111 lines (96 loc) · 4.19 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
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
<?php
/**
* Plugin Name: WP-PostRatings
* Plugin URI: https://lesterchan.net/portfolio/programming/php/
* Description: Adds an AJAX rating system for your WordPress site's content.
* Version: 2.0.1
* Requires at least: 6.8
* Requires PHP: 8.2
* Author: Lester 'GaMerZ' Chan
* Author URI: https://lesterchan.net
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: wp-postratings
* Domain Path: /languages
*
* @package WP-PostRatings
*/
/*
Copyright 2026 Lester Chan (email : [email protected])
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* WP-PostRatings version. Compared against the 'plugin' marker in wp_postratings_version.
*/
define( 'WP_POSTRATINGS_VERSION', '2.0.1' );
/**
* Schema counter. Compared against the 'db' marker in wp_postratings_version.
*
* Starts at 3 rather than 1 because it replaces two separate counters that
* existed before 2.0.0 -- postratings_db_version, which had reached 2, and
* postratings_options_version, which had reached 3. Taking the higher of the
* two means no installed site is ever told its schema went backwards.
*/
define( 'WP_POSTRATINGS_DB_VERSION', '3' );
/**
* Plugin slug, text domain and menu slug.
*/
define( 'WP_POSTRATINGS_SLUG', 'wp-postratings' );
/**
* WP-PostRatings main file.
*/
define( 'WP_POSTRATINGS_MAIN_FILE', __FILE__ );
/**
* Filesystem path of the plugin directory, with a trailing slash.
*/
define( 'WP_POSTRATINGS_DIR', plugin_dir_path( __FILE__ ) );
/**
* URL of the plugin directory, with a trailing slash.
*/
define( 'WP_POSTRATINGS_URL', plugin_dir_url( __FILE__ ) );
/**
* Left over from the image sets, which 2.0.0 replaced with SVG shapes.
*
* Renamed from RATINGS_IMG_EXT, which carried no plugin prefix. There is no
* file extension left to choose, so nothing in the plugin reads it; it is
* defined only so a theme that still does gets an answer rather than a notice.
*/
if ( ! defined( 'WP_POSTRATINGS_IMG_EXT' ) ) {
define( 'WP_POSTRATINGS_IMG_EXT', 'svg' );
}
require_once __DIR__ . '/includes/class-wp-postratings-shapes.php';
require_once __DIR__ . '/includes/class-wp-postratings-options.php';
require_once __DIR__ . '/includes/class-wp-postratings-data.php';
require_once __DIR__ . '/includes/class-wp-postratings-api.php';
require_once __DIR__ . '/includes/class-wp-postratings-install.php';
require_once __DIR__ . '/includes/class-wp-postratings-template.php';
require_once __DIR__ . '/includes/class-wp-postratings-rating.php';
require_once __DIR__ . '/includes/class-wp-postratings-blocks.php';
require_once __DIR__ . '/includes/class-wp-postratings-comments.php';
require_once __DIR__ . '/includes/class-wp-postratings-stats.php';
require_once __DIR__ . '/includes/class-wp-postratings-widget.php';
require_once __DIR__ . '/includes/class-wp-postratings-wpstats.php';
require_once __DIR__ . '/includes/class-wp-postratings-settings.php';
require_once __DIR__ . '/includes/class-wp-postratings-admin.php';
require_once __DIR__ . '/includes/class-wp-postratings.php';
require_once __DIR__ . '/includes/template-tags.php';
require_once __DIR__ . '/includes/deprecated.php';
// class-wp-postratings-logs-table.php is loaded on demand by the log screen: it
// pulls in wp-admin/includes/class-wp-list-table.php, which has no business
// being loaded on a front end request. The two classes above only *register*
// hooks when is_admin(), so loading them costs a file read and nothing else --
// and it keeps them reachable from the test suite, which does not run as admin.
WP_PostRatings::get_instance();