PluginProbe
FakerPress / 0.7.1
FakerPress v0.7.1
0.9.2 trunk 0.1.0 0.1.1 0.1.2 0.1.3 0.5.2 0.5.3 0.6.1 0.6.2 0.6.3 0.6.4 0.6.5 0.6.6 0.7.0 0.7.1 0.7.2 0.8.0 0.9.0 0.9.1
fakerpress / fakerpress.php

fakerpress.php in FakerPress 0.7.1, at fakerpress.php

45 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: FakerPress
4 * Plugin URI: https://fakerpress.com
5 * Description: FakerPress is a clean way to generate fake data to your WordPress installation, great for developers who need testing
6 * Version: 0.7.1
7 * Author: Gustavo Bordoni
8 * Author URI: https://bordoni.me
9 * Text Domain: fakerpress
10 * License: GPL-2.0+
11 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12 * Domain Path: /languages
13 * GitHub Plugin URI: https://github.com/bordoni/fakerpress
14 */
15
16 // Need to store this variable before leaving this file.
17 define( '__FP_FILE__', __FILE__ );
18
19 /**
20 * Version compares to PHP 7.4, so we can use namespaces, anonymous functions
21 * and a lot of packages require 7.4, so...
22 */
23 if ( PHP_VERSION_ID < 70400 ) {
24 if ( ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && is_admin() ) {
25 require_once ABSPATH . 'wp-admin/includes/plugin.php';
26
27 if ( ! is_plugin_active( plugin_basename( __FP_FILE__ ) ) ) {
28 wp_print_styles( 'open-sans' );
29 echo "<style>body{margin: 0 2px;font-family: 'Open Sans',sans-serif;font-size: 13px;line-height: 1.5em;}</style>";
30 echo '<b>FakerPress</b> requires PHP 7.4 or higher, and the plugin has now disabled itself.' .
31 '<br />' .
32 'To allow better control over dates, advanced security improvements and performance gain.' .
33 '<br />' .
34 'Contact your Hosting or your system administrator and ask for this Upgrade to version 7.4 of PHP.';
35 exit;
36 }
37
38 deactivate_plugins( __FP_FILE__ );
39 }
40 } else {
41 require_once dirname( __FP_FILE__ ) . '/src/functions/load.php';
42 // Add a second action to handle the case where Common is not loaded, we still want to let the user know what is happening.
43 add_action( 'plugins_loaded', 'fakerpress_load_plugin', 50 );
44 }
45