| @@ -10,11 +10,13 @@ | ||
| 10 | 10 | // phpcs:disable Generic.Files.LineLength |
| 11 | 11 | |
| 12 | 12 | /* |
| 13 | 13 | Plugin Name: Force Refresh |
| 14 | -Plugin URI: | |
| 14 | +Plugin URI: https://github.com/jordanleven/force-refresh | |
| 15 | 15 | Description: Force Refresh is a simple plugin that allows you to force a page refresh for users currently visiting your site. |
| 16 | -Version: 2.1.3 | |
| 16 | +Version: 3.2.1 | |
| 17 | +Requires at least: 5.9 | |
| 18 | +Requires PHP: 7.4 | |
| 17 | 19 | Author: Jordan Leven |
| 18 | 20 | Author URI: https://github.com/jordanleven |
| 19 | 21 | Contributors: |
| 20 | 22 | */ |
| @@ -20,23 +22,20 @@ | ||
| 20 | 22 | */ |
| 21 | 23 | |
| 22 | 24 | // phpcs:enable Generic.Files.LineLength |
| 23 | 25 | |
| 26 | +// The absolute path to the plugin's root directory. | |
| 27 | +define( 'WP_FORCE_REFRESH_PLUGIN_DIR', __DIR__ ); | |
| 24 | 28 | // Define the name of the action for the refresh. This is used with the nonce to create a unique |
| 25 | 29 | // action when admins request a refresh. |
| 26 | 30 | define( 'WP_FORCE_REFRESH_ACTION', 'wp_force_refresh' ); |
| 31 | +// The slug used for Force Refresh on the WordPress.org site. | |
| 32 | +define( 'WP_FORCE_REFRESH_REPOSITORY_SLUG', 'force-refresh' ); | |
| 27 | 33 | // Define the name of the capability used to invoke a refresh. This is used for developers who want |
| 28 | 34 | // to fine-tune control of what types of users and roles can request a refresh. |
| 29 | 35 | define( 'WP_FORCE_REFRESH_CAPABILITY', 'invoke_force_refresh' ); |
| 30 | -// Define the ID for the Handlebars admin notice. This is used to add notifications to the admin | |
| 31 | -// screen when a user requests a refresh. | |
| 32 | -define( 'WP_FORCE_REFRESH_HANDLEBARS_ADMIN_NOTICE_TEMPLATE_ID', 'invoke_force_refresh' ); | |
| 33 | -// Define the option for showing the Force Refresh button in the WordPress Admin Bar. | |
| 34 | -define( 'WP_FORCE_REFRESH_OPTION_SHOW_IN_WP_ADMIN_BAR', 'force_refresh_show_in_wp_admin_bar' ); | |
| 35 | -// Define the option for the refresh interval (how often the site should check for a new version). | |
| 36 | -define( 'WP_FORCE_REFRESH_OPTION_REFRESH_INTERVAL_IN_SECONDS', 'force_refresh_refresh_interval' ); | |
| 37 | -// Define the default refresh interval. | |
| 38 | -define( 'WP_FORCE_REFRESH_OPTION_REFRESH_INTERVAL_IN_SECONDS_DEFAULT', 120 ); | |
| 36 | +// Define the option for whether or not debug mode is active. | |
| 37 | +define( 'WP_FORCE_REFRESH_OPTION_DEBUG_ACTIVE_DATE', 'force_refresh_debug_active_date' ); | |
| 39 | 38 | // All the post types to exclude force refreshing from. |
| 40 | 39 | define( 'WP_FORCE_REFRESH_EXCLUDE_FROM_POST_TYPES', array( 'attachment' ) ); |
| 41 | 40 | // The action used by browsers to get the current site and page versions. This is used to generate |
| 42 | 41 | // the nonce. |
| @@ -51,14 +50,12 @@ | ||
| 51 | 50 | function get_main_plugin_file() { |
| 52 | 51 | return __FILE__; |
| 53 | 52 | } |
| 54 | 53 | |
| 55 | -// Make sure we include the composer autoload file. | |
| 56 | -require_once __DIR__ . '/vendor/autoload.php'; | |
| 54 | +// Include the plugin autoload file. | |
| 55 | +require_once __DIR__ . '/includes/autoload.php'; | |
| 57 | 56 | // Include the functions file. |
| 58 | 57 | require_once __DIR__ . '/includes/functions.php'; |
| 59 | -// Include the handlebars function. | |
| 60 | -require_once __DIR__ . '/includes/function-handlebars.php'; | |
| 61 | 58 | // Register all of our actions. |
| 62 | 59 | require_once __DIR__ . '/includes/actions/actions.php'; |
| 63 | 60 | // Include the API call functions. |
| 64 | 61 | require_once __DIR__ . '/includes/api/api.php'; |