PluginProbe
Rate My Post – Star Rating Plugin by FeedbackWP / trunk
Rate My Post – Star Rating Plugin by FeedbackWP vtrunk
4.2.5 4.3.0 4.3.1 4.3.2 4.4.0 4.4.1 4.4.2 4.4.3 4.4.4 4.5.0 4.5.1 4.5.2 trunk 1.0 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 2.0.0 2.0.1 2.0.2 2.1.0 All 75 releases
rate-my-post / rate-my-post.php

rate-my-post.php in Rate My Post – Star Rating Plugin by FeedbackWP trunk, at rate-my-post.php

86 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Plugin Name: FeedbackWP - Rate My Post - WP Rating System
5 * Plugin URI: https://feedbackwp.com
6 * Description: Allows you to easily add rating functionality to your WordPress website.
7 * Version: 4.5.2
8 * Author: FeedbackWP
9 * Author URI: https://feedbackwp.com/
10 * License: GPL-2.0+
11 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12 * Text Domain: rate-my-post
13 * Domain Path: /languages
14 */
15
16 // If this file is called directly, abort.
17 if ( ! defined('WPINC')) die;
18
19 // PRO version is installed
20 if (class_exists('Rate_My_Post')) {
21 add_action('admin_notices', 'rmp_disable_notice');
22
23 return;
24 }
25
26 // Show admin notice if PRO version is detected
27 function rmp_disable_notice()
28 {
29 ?>
30 <div class="rmp-admin-notice notice notice-error">
31 <h2>FeedbackWP <?php echo esc_html__('Notice: Plugin Deactivated', 'rate-my-post'); ?></h2>
32 <p><?php echo esc_html__('Plugin has been deactivated because the PRO version was detected.', 'rate-my-post'); ?></p>
33 </div>
34 <?php
35 }
36
37 // Plugin version
38 define('RATE_MY_POST_VERSION', '4.5.2');
39 define('RATE_MY_POST_SYSTEM_FILE_PATH', __FILE__);
40
41 // Plugin activation
42 function activate_rate_my_post()
43 {
44 require_once plugin_dir_path(__FILE__) . 'includes/class-rate-my-post-activator.php';
45 Rate_My_Post_Activator::activate();
46 }
47
48 // Plugin deactivation
49 function deactivate_rate_my_post()
50 {
51 require_once plugin_dir_path(__FILE__) . 'includes/class-rate-my-post-deactivator.php';
52 Rate_My_Post_Deactivator::deactivate();
53 }
54
55 // Plugin upgrade
56 function upgrade_rate_my_post()
57 {
58 require_once plugin_dir_path(__FILE__) . 'includes/class-rate-my-post-upgrader.php';
59 Rate_My_Post_Upgrader::upgrade();
60 }
61
62 register_activation_hook(__FILE__, 'activate_rate_my_post');
63 register_deactivation_hook(__FILE__, 'deactivate_rate_my_post');
64 add_action('plugins_loaded', 'upgrade_rate_my_post');
65
66 //developer functions
67 require plugin_dir_path(__FILE__) . 'includes/dev-functions.php';
68 require plugin_dir_path(__FILE__) . 'includes/Shogun.php';
69
70 // The core plugin class
71 require plugin_dir_path(__FILE__) . 'includes/class-rate-my-post.php';
72
73 if (file_exists(dirname(__FILE__) . '/vendor/autoload.php')) {
74 require_once dirname(__FILE__) . '/vendor/autoload.php';
75 }
76
77
78 // Execute the plugin
79 function run_rate_my_post()
80 {
81 $plugin = new Rate_My_Post();
82 $plugin->run();
83 }
84
85 run_rate_my_post();
86