PluginProbe
WP-PostViews / trunk
WP-PostViews vtrunk
2.0.1 2.0.0 1.01 1.02 1.10 1.11 1.20 1.30 1.31 1.40 1.50 1.66 1.67 1.68 1.69 1.70 1.71 1.72 1.73 1.74 1.75 1.76 1.76.1 1.77 1.78 All 29 releases
wp-postviews / wp-postviews.php

wp-postviews.php in WP-PostViews trunk, at wp-postviews.php

91 lines 3.3 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-PostViews
4 * Plugin URI: https://lesterchan.net/portfolio/programming/php/
5 * Description: Enables you to display how many times a post/page had been viewed.
6 * Version: 2.0.1
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-postviews
14 * Domain Path: /languages
15 *
16 * @package WP-PostViews
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 // Exit if accessed directly.
38 defined( 'ABSPATH' ) || exit;
39
40 /**
41 * WP-PostViews version. Compared against the 'plugin' marker in wp_postviews_version.
42 */
43 define( 'WP_POSTVIEWS_VERSION', '2.0.1' );
44
45 /**
46 * Schema counter. Compared against the 'db' marker in wp_postviews_version.
47 *
48 * Starts at 1: the plugin owns no table, and the row it did keep before 2.0.0
49 * held a plugin version string rather than a counter, so there is no earlier
50 * number an install could be told it had gone backwards from.
51 */
52 define( 'WP_POSTVIEWS_DB_VERSION', '1' );
53
54 /**
55 * Plugin slug, text domain and menu slug.
56 */
57 define( 'WP_POSTVIEWS_SLUG', 'wp-postviews' );
58
59 /**
60 * WP-PostViews main file.
61 */
62 define( 'WP_POSTVIEWS_MAIN_FILE', __FILE__ );
63
64 /**
65 * Filesystem path of the plugin directory, with a trailing slash.
66 */
67 define( 'WP_POSTVIEWS_DIR', plugin_dir_path( __FILE__ ) );
68
69 /**
70 * URL of the plugin directory, with a trailing slash.
71 */
72 define( 'WP_POSTVIEWS_URL', plugin_dir_url( __FILE__ ) );
73
74 // Classes. Required at file load because the activation hook and the option
75 // accessor are both reached before any action fires.
76 require_once WP_POSTVIEWS_DIR . 'includes/class-wp-postviews-options.php';
77 require_once WP_POSTVIEWS_DIR . 'includes/class-wp-postviews-display.php';
78 require_once WP_POSTVIEWS_DIR . 'includes/class-wp-postviews-query.php';
79 require_once WP_POSTVIEWS_DIR . 'includes/class-wp-postviews-counter.php';
80 require_once WP_POSTVIEWS_DIR . 'includes/class-wp-postviews-blocks.php';
81 require_once WP_POSTVIEWS_DIR . 'includes/class-wp-postviews-core.php';
82 require_once WP_POSTVIEWS_DIR . 'includes/class-wp-postviews-api.php';
83 require_once WP_POSTVIEWS_DIR . 'includes/class-wp-postviews-widget.php';
84 require_once WP_POSTVIEWS_DIR . 'includes/class-wp-postviews-admin.php';
85 require_once WP_POSTVIEWS_DIR . 'includes/class-wp-postviews-settings.php';
86 require_once WP_POSTVIEWS_DIR . 'includes/class-wp-postviews-wpstats.php';
87 require_once WP_POSTVIEWS_DIR . 'includes/class-wp-postviews.php';
88 require_once WP_POSTVIEWS_DIR . 'includes/template-tags.php';
89
90 WP_PostViews::init();
91