wordpress-popular-posts
Last commit date
admin
7 years ago
includes
7 years ago
languages
7 years ago
public
7 years ago
index.php
7 years ago
readme.txt
7 years ago
uninstall.php
7 years ago
wordpress-popular-posts.php
7 years ago
wordpress-popular-posts.php
68 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * The plugin bootstrap file |
| 5 | * |
| 6 | * This file is read by WordPress to generate the plugin information in the plugin |
| 7 | * admin area. This file also includes all of the dependencies used by the plugin, |
| 8 | * registers the activation and deactivation functions, and defines a function |
| 9 | * that starts the plugin. |
| 10 | * |
| 11 | * @link https://cabrerahector.com/ |
| 12 | * @since 4.0.0 |
| 13 | * @package WordPressPopularPosts |
| 14 | * |
| 15 | * @wordpress-plugin |
| 16 | * Plugin Name: WordPress Popular Posts |
| 17 | * Plugin URI: https://wordpress.org/plugins/wordpress-popular-posts/ |
| 18 | * Description: A highly customizable widget that displays the most popular posts on your blog. |
| 19 | * Version: 4.2.0 |
| 20 | * Author: Hector Cabrera |
| 21 | * Author URI: https://cabrerahector.com/ |
| 22 | * License: GPL-2.0+ |
| 23 | * License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 24 | * Text Domain: wordpress-popular-posts |
| 25 | * Domain Path: /languages |
| 26 | */ |
| 27 | |
| 28 | if ( ! defined( 'WPINC' ) ) { |
| 29 | die(); |
| 30 | } |
| 31 | |
| 32 | define( 'WPP_VER', '4.2.0' ); |
| 33 | |
| 34 | require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordpress-popular-posts-admin-notices.php'; |
| 35 | require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordpress-popular-posts-activator.php'; |
| 36 | |
| 37 | // Can we run? |
| 38 | if ( $errors = WPP_Activator::check_requirements() ) { |
| 39 | if ( isset($_GET['activate']) ) unset($_GET['activate']); |
| 40 | |
| 41 | // Display error message(s) |
| 42 | new WPP_Message( $errors, 'notice-error' ); |
| 43 | // We're done here |
| 44 | return; |
| 45 | } |
| 46 | |
| 47 | /* |
| 48 | * The code that runs during plugin activation. |
| 49 | */ |
| 50 | register_activation_hook( __FILE__, array('WPP_Activator', 'activate') ); |
| 51 | |
| 52 | /* |
| 53 | * The code that runs during plugin activation. |
| 54 | */ |
| 55 | require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordpress-popular-posts-deactivator.php'; |
| 56 | register_deactivation_hook( __FILE__, array('WPP_Deactivator', 'deactivate') ); |
| 57 | |
| 58 | /* |
| 59 | * The core plugins class. |
| 60 | */ |
| 61 | require plugin_dir_path( __FILE__ ) . 'includes/class-wordpress-popular-posts.php'; |
| 62 | |
| 63 | /* |
| 64 | * Begin execution of the plugin. |
| 65 | */ |
| 66 | $wordpress_popular_posts = new WordPressPopularPosts(); |
| 67 | $wordpress_popular_posts->run(); |
| 68 |