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