| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: ReCrawler |
| 4 |
* Description: ReCrawler is a small WordPress Plugin for quickly notifying search engines whenever their website content is created, updated, or deleted. |
| 5 |
* Version: 1.1.0 |
| 6 |
* Author: Mikhail Kobzarev |
| 7 |
* Author URI: https://www.kobzarev.com/ |
| 8 |
* Plugin URI: https://wordpress.org/plugins/recrawler/ |
| 9 |
* GitHub Plugin URI: https://github.com/mihdan/recrawler |
| 10 |
* Requires PHP: 8.2 |
| 11 |
* Requires at least: 6.4 |
| 12 |
* License: GPLv2 or later |
| 13 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 14 |
* |
| 15 |
* @link https://github.com/mihdan/recrawler |
| 16 |
* @package Mihdan\ReCrawler |
| 17 |
*/ |
| 18 |
|
| 19 |
namespace Mihdan\ReCrawler; |
| 20 |
|
| 21 |
if ( ! defined( 'ABSPATH' ) ) { |
| 22 |
exit; |
| 23 |
} |
| 24 |
|
| 25 |
define( 'RECRAWLER_VERSION', '1.1.0' ); |
| 26 |
define( 'RECRAWLER_SLUG', 'recrawler' ); |
| 27 |
define( 'RECRAWLER_PREFIX', 'recrawler' ); |
| 28 |
define( 'RECRAWLER_NAME', 'ReCrawler' ); |
| 29 |
define( 'RECRAWLER_FILE', __FILE__ ); |
| 30 |
define( 'RECRAWLER_DIR', __DIR__ ); |
| 31 |
define( 'RECRAWLER_BASENAME', plugin_basename( __FILE__ ) ); |
| 32 |
define( 'RECRAWLER_URL', plugin_dir_url( __FILE__ ) ); |
| 33 |
|
| 34 |
if ( file_exists( __DIR__ . '/vendor-prefixed/autoload.php' ) && file_exists( __DIR__ . '/vendor-prefixed/woocommerce/action-scheduler/action-scheduler.php' ) ) { |
| 35 |
require_once __DIR__ . '/vendor-prefixed/autoload.php'; |
| 36 |
require_once __DIR__ . '/vendor-prefixed/woocommerce/action-scheduler/action-scheduler.php'; |
| 37 |
|
| 38 |
( new Main( new Container() ) )->init(); |
| 39 |
} else { |
| 40 |
add_action( |
| 41 |
'admin_notices', |
| 42 |
static function () { |
| 43 |
if ( ! current_user_can( 'activate_plugins' ) ) { |
| 44 |
return; |
| 45 |
} |
| 46 |
|
| 47 |
wp_admin_notice( |
| 48 |
__( 'ReCrawler: dependencies are not built, the plugin is doing nothing. Run "composer prefix-dependencies" in the plugin directory.', 'recrawler' ), |
| 49 |
[ 'type' => 'error' ] |
| 50 |
); |
| 51 |
} |
| 52 |
); |
| 53 |
} |
| 54 |
|