-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaggregate-it.php
More file actions
91 lines (84 loc) · 3.55 KB
/
Copy pathaggregate-it.php
File metadata and controls
91 lines (84 loc) · 3.55 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
/**
* Plugin Name: Aggregate It
* Plugin URI: https://github.com/nmbrthirteen/aggregate-it
* Description: An SEO content engine that uses RSS as raw material — it imports feeds, faithfully rewrites them with AI, deduplicates stories into living topic pages, and auto-builds entity hubs with an internal-link graph.
*
* Features:
* - Import RSS/Atom and JSON feeds on a per-feed schedule, with categories, tags, include/exclude keywords, and per-feed length and publish overrides.
* - Bulk-add feeds, OPML import (paste or upload), and a global keyword/domain blacklist.
* - Faithful AI rewrite that keeps the facts and strips promo — choose Google Gemini, OpenAI, or Claude with your own key.
* - Model, article-length, and writing-style controls, a daily spend cap, and a one-click connection test.
* - Semantic deduplication into one canonical post per story, a novelty gate, and dated "In the news" timelines.
* - Automatic entity hub pages with schema.org types, sameAs links, optional Wikipedia enrichment, an internal-link graph, and related articles.
* - SEO built in: Article/NewsArticle and entity schema, meta tags, clean slugs, and instant IndexNow submission.
* - Featured-image import, history retention, and hands-off background processing.
* - Dashboard with charts and an activity log, bulk article actions, and a Tools page for export/import, logs, system info, and reset.
* Version: 0.1.53
* Author: Nika Siradze
* Author URI: https://nikusha.com
* Text Domain: aggregate-it
* Requires PHP: 8.0
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
defined( 'ABSPATH' ) || exit;
define( 'AGGREGATE_IT_VERSION', '0.1.53' );
define( 'AGGREGATE_IT_FILE', __FILE__ );
define( 'AGGREGATE_IT_PATH', plugin_dir_path( __FILE__ ) );
define( 'AGGREGATE_IT_URL', plugin_dir_url( __FILE__ ) );
$aggregate_it_composer = AGGREGATE_IT_PATH . 'vendor/autoload.php';
if ( is_readable( $aggregate_it_composer ) ) {
require $aggregate_it_composer;
} else {
spl_autoload_register(
static function ( $class ) {
$prefix = 'AggregateIt\\';
$len = strlen( $prefix );
if ( strncmp( $class, $prefix, $len ) !== 0 ) {
return;
}
$relative = substr( $class, $len );
$file = AGGREGATE_IT_PATH . 'src/' . str_replace( '\\', '/', $relative ) . '.php';
if ( is_readable( $file ) ) {
require $file;
}
}
);
}
$aggregate_it_puc = AGGREGATE_IT_PATH . 'lib/plugin-update-checker/plugin-update-checker.php';
if ( is_readable( $aggregate_it_puc ) ) {
require $aggregate_it_puc;
$aggregate_it_updater = \YahnisElsts\PluginUpdateChecker\v5\PucFactory::buildUpdateChecker(
'https://github.com/nmbrthirteen/aggregate-it/',
AGGREGATE_IT_FILE,
'aggregate-it'
);
$aggregate_it_updater->setBranch( 'main' );
$aggregate_it_updater->getVcsApi()->enableReleaseAssets();
}
register_activation_hook( __FILE__, [ AggregateIt\Database\Schema::class, 'install' ] );
register_deactivation_hook( __FILE__, [ AggregateIt\Plugin::class, 'deactivate' ] );
add_action(
'init',
static function () {
if ( PHP_VERSION_ID < 80000 ) {
add_action(
'admin_notices',
static function () {
echo '<div class="notice notice-error"><p>' .
esc_html__( 'Aggregate It requires PHP 8.0 or newer.', 'aggregate-it' ) .
'</p></div>';
}
);
return;
}
try {
AggregateIt\Plugin::instance()->boot();
} catch ( \Throwable $e ) {
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
error_log( '[Aggregate It] boot failed: ' . $e->getMessage() ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions
}
}
}
);