-
Notifications
You must be signed in to change notification settings - Fork 0
/
ai-seo-tools.php
41 lines (34 loc) · 1.02 KB
/
ai-seo-tools.php
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
<?php
/**
* Plugin Name: AI SEO Tools
* Plugin URI: https://github.com/mslinnea/ai-seo-tools
* Description: A plugin to enhance SEO using AI.
* Version: 0.0.1
* Author: Linnea Huxford
* Author URI: https://linsoftware.com
* License: GPL-3.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: ai-seo-tools
* Requires Plugins: ai-services
*/
namespace LinSoftware\AISEOTools;
require_once __DIR__ . '/inc/post-meta.php';
require_once __DIR__ . '/inc/wp-head.php';
add_action(
'enqueue_block_editor_assets',
static function () {
// Bail if the AI Services plugin is not active.
if ( ! function_exists( 'ai_services' ) ) {
return;
}
$asset_metadata = require plugin_dir_path( __FILE__ ) . 'build/scripts.asset.php';
$asset_metadata['dependencies'][] = 'ais-ai-store';
wp_enqueue_script(
'ai-seo-tools',
plugin_dir_url( __FILE__ ) . 'build/scripts.js',
$asset_metadata['dependencies'],
$asset_metadata['version'],
['strategy' => 'defer' ]
);
}
);