PluginProbe
WP ULike – Like Buttons, Voting & Engagement Analytics / 5.0.7
WP ULike – Like Buttons, Voting & Engagement Analytics v5.0.7
5.2.3 5.2.2 5.2.1 5.2.0 5.1.2 5.1.1 5.1.0 5.0.7 5.0.6 5.0.5 5.0.4 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 All 135 releases
wp-ulike / wp-ulike.php

wp-ulike.php in WP ULike – Like Buttons, Voting & Engagement Analytics 5.0.7, at wp-ulike.php

108 lines 4.5 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 ULike
4 * Plugin URI: https://wpulike.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
5 * Description: Looking to increase user engagement on your WordPress site? WP ULike plugin lets you easily add voting buttons to your content. With customizable settings and detailed analytics, you can track user engagement, optimize your content, and build a loyal following.
6 * Version: 5.0.7
7 * Author: TechnoWich
8 * Author URI: https://technowich.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
9 * Requires PHP: 7.2.5
10 * Requires at least: 6.0
11 * Text Domain: wp-ulike
12 * Domain Path: /languages
13 * Tested up to: 7.0
14 * License: GPL-2.0+
15 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
16 *
17 * WP ULike is free software: you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation, either version 3 of the License, or
20 * any later version.
21 *
22 * WP ULike is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 */
27
28 // If this file is called directly, abort.
29 if ( ! defined( 'ABSPATH' ) ) {
30 exit; // Exit if accessed directly
31 }
32
33 // Do not change these values
34 define( 'WP_ULIKE_PLUGIN_URI' , 'https://wpulike.com/' );
35 define( 'WP_ULIKE_VERSION' , '5.0.7' );
36 define( 'WP_ULIKE_DB_VERSION' , '2.4' );
37 define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
38 define( 'WP_ULIKE_NAME' , 'WP ULike' );
39
40 define( 'WP_ULIKE_DIR' , plugin_dir_path( __FILE__ ) );
41 define( 'WP_ULIKE_URL' , plugins_url( '', __FILE__ ) );
42 define( 'WP_ULIKE_BASENAME' , plugin_basename( __FILE__ ) );
43
44 define( 'WP_ULIKE_ADMIN_DIR' , WP_ULIKE_DIR . 'admin' );
45 define( 'WP_ULIKE_ADMIN_URL' , WP_ULIKE_URL . '/admin' );
46
47 define( 'WP_ULIKE_INC_DIR' , WP_ULIKE_DIR . 'includes' );
48 define( 'WP_ULIKE_INC_URL' , WP_ULIKE_URL . '/includes' );
49
50 define( 'WP_ULIKE_ASSETS_DIR' , WP_ULIKE_DIR . 'assets' );
51 define( 'WP_ULIKE_ASSETS_URL' , WP_ULIKE_URL . '/assets' );
52
53 /**
54 * Initialize the plugin
55 * ===========================================================================*/
56
57 require WP_ULIKE_INC_DIR . '/action.php';
58 // Register hooks that are fired when the plugin is activated or deactivated.
59 register_activation_hook ( __FILE__, array( 'wp_ulike_register_action_hook', 'activate' ) );
60 register_deactivation_hook( __FILE__, array( 'wp_ulike_register_action_hook', 'deactivate' ) );
61
62 // Load Pro license validator
63 require_once WP_ULIKE_INC_DIR . '/pro.php';
64
65 if ( ! version_compare( PHP_VERSION, '7.2.5', '>=' ) ) {
66 add_action( 'admin_notices', 'wp_ulike_fail_php_version' );
67 } elseif ( ! version_compare( get_bloginfo( 'version' ), '6.0', '>=' ) ) {
68 add_action( 'admin_notices', 'wp_ulike_fail_wp_version' );
69 } else {
70 // Show notice if Pro version has invalid license, but still allow plugin to run
71 if ( WP_Ulike_Pro_Validator::check_license_validity() === false ) {
72 add_action( 'admin_notices', array( 'WP_Ulike_Pro_Validator', 'fail_pro_license_notice' ) );
73 }
74
75 if( ! class_exists( 'WpUlikeInit' ) ) {
76 require WP_ULIKE_INC_DIR . '/plugin.php';
77 }
78 }
79
80 /**
81 * WP ULike admin notice for minimum PHP version.
82 *
83 * Warning when the site doesn't have the minimum required PHP version.
84 *
85 * @return void
86 */
87 function wp_ulike_fail_php_version() {
88 /* translators: %s: PHP version */
89 $message = sprintf( esc_html__( 'WP ULike requires PHP version %s+, plugin is currently NOT RUNNING.', 'wp-ulike' ), '7.2.5' );
90 $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
91 echo wp_kses_post( $html_message );
92 }
93
94 /**
95 * WP ULike admin notice for minimum WordPress version.
96 *
97 * Warning when the site doesn't have the minimum required WordPress version.
98 *
99 * @return void
100 */
101 function wp_ulike_fail_wp_version() {
102 /* translators: %s: WordPress version */
103 $message = sprintf( esc_html__( 'WP ULike requires WordPress version %s+. Because you are using an earlier version, the plugin is currently NOT RUNNING.', 'wp-ulike' ), '6.0' );
104 $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
105 echo wp_kses_post( $html_message );
106 }
107
108 /*============================================================================*/