PluginProbe
WP-PostRatings / 2.0.2
WP-PostRatings v2.0.2
2.0.2 2.0.1 2.0.0 trunk 1.00 1.00beta 1.01 1.02 1.02a 1.03 1.03(wp1.52) 1.04 1.05 1.10 1.11 1.20 1.30 1.31 1.40 1.50 1.65 1.77 1.78 1.79 1.80 All 45 releases
wp-postratings / wp-postratings.php

wp-postratings.php in WP-PostRatings 2.0.2, at wp-postratings.php

110 lines 4.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: WP-PostRatings
4 * Plugin URI: https://lesterchan.net/portfolio/programming/php/
5 * Description: Adds an AJAX rating system for your WordPress site's content.
6 * Version: 2.0.2
7 * Requires at least: 6.8
8 * Requires PHP: 8.2
9 * Author: Lester 'GaMerZ' Chan
10 * Author URI: https://lesterchan.net
11 * License: GPLv2 or later
12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
13 * Text Domain: wp-postratings
14 * Domain Path: /languages
15 *
16 * @package WP-PostRatings
17 */
18
19 /*
20 Copyright 2026 Lester Chan (email : lesterchan@gmail.com)
21
22 This program is free software; you can redistribute it and/or modify
23 it under the terms of the GNU General Public License as published by
24 the Free Software Foundation; either version 2 of the License, or
25 (at your option) any later version.
26
27 This program is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 GNU General Public License for more details.
31
32 You should have received a copy of the GNU General Public License
33 along with this program; if not, write to the Free Software
34 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
35 */
36
37 defined( 'ABSPATH' ) || exit;
38
39 /**
40 * WP-PostRatings version. Compared against the 'plugin' marker in wp_postratings_version.
41 */
42 define( 'WP_POSTRATINGS_VERSION', '2.0.2' );
43
44 /**
45 * Schema counter. Compared against the 'db' marker in wp_postratings_version.
46 *
47 * Starts at 3 rather than 1 because it replaces two separate counters that
48 * existed before 2.0.0 -- postratings_db_version, which had reached 2, and
49 * postratings_options_version, which had reached 3. Taking the higher of the
50 * two means no installed site is ever told its schema went backwards.
51 */
52 define( 'WP_POSTRATINGS_DB_VERSION', '3' );
53
54 /**
55 * Plugin slug, text domain and menu slug.
56 */
57 define( 'WP_POSTRATINGS_SLUG', 'wp-postratings' );
58
59 /**
60 * WP-PostRatings main file.
61 */
62 define( 'WP_POSTRATINGS_MAIN_FILE', __FILE__ );
63
64 /**
65 * Filesystem path of the plugin directory, with a trailing slash.
66 */
67 define( 'WP_POSTRATINGS_DIR', plugin_dir_path( __FILE__ ) );
68
69 /**
70 * URL of the plugin directory, with a trailing slash.
71 */
72 define( 'WP_POSTRATINGS_URL', plugin_dir_url( __FILE__ ) );
73
74 /**
75 * Left over from the image sets, which 2.0.0 replaced with SVG shapes.
76 *
77 * Renamed from RATINGS_IMG_EXT, which carried no plugin prefix. There is no
78 * file extension left to choose, so nothing in the plugin reads it; it is
79 * defined only so a theme that still does gets an answer rather than a notice.
80 */
81 if ( ! defined( 'WP_POSTRATINGS_IMG_EXT' ) ) {
82 define( 'WP_POSTRATINGS_IMG_EXT', 'svg' );
83 }
84
85 require_once __DIR__ . '/includes/class-wp-postratings-shapes.php';
86 require_once __DIR__ . '/includes/class-wp-postratings-options.php';
87 require_once __DIR__ . '/includes/class-wp-postratings-data.php';
88 require_once __DIR__ . '/includes/class-wp-postratings-api.php';
89 require_once __DIR__ . '/includes/class-wp-postratings-install.php';
90 require_once __DIR__ . '/includes/class-wp-postratings-template.php';
91 require_once __DIR__ . '/includes/class-wp-postratings-rating.php';
92 require_once __DIR__ . '/includes/class-wp-postratings-blocks.php';
93 require_once __DIR__ . '/includes/class-wp-postratings-comments.php';
94 require_once __DIR__ . '/includes/class-wp-postratings-stats.php';
95 require_once __DIR__ . '/includes/class-wp-postratings-widget.php';
96 require_once __DIR__ . '/includes/class-wp-postratings-wpstats.php';
97 require_once __DIR__ . '/includes/class-wp-postratings-settings.php';
98 require_once __DIR__ . '/includes/class-wp-postratings-admin.php';
99 require_once __DIR__ . '/includes/class-wp-postratings.php';
100 require_once __DIR__ . '/includes/template-tags.php';
101 require_once __DIR__ . '/includes/deprecated.php';
102
103 // class-wp-postratings-logs-table.php is loaded on demand by the log screen: it
104 // pulls in wp-admin/includes/class-wp-list-table.php, which has no business
105 // being loaded on a front end request. The two classes above only *register*
106 // hooks when is_admin(), so loading them costs a file read and nothing else --
107 // and it keeps them reachable from the test suite, which does not run as admin.
108
109 WP_PostRatings::get_instance();
110