@lynxflow/seo-engine 1.8.23 β 1.8.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -53,6 +53,9 @@ class LynxSeoUltimateEnterprisePlugin {
|
|
|
53
53
|
// WordPress REST API Routes for AI & RAG Automation
|
|
54
54
|
add_action('rest_api_init', array($this, 'register_lynxseo_rest_api_routes'));
|
|
55
55
|
|
|
56
|
+
// WordPress Admin Bar Quick Tools & Live Score
|
|
57
|
+
add_action('admin_bar_menu', array($this, 'add_lynxseo_admin_bar_node'), 100);
|
|
58
|
+
|
|
56
59
|
// 50 Shortcodes Registration
|
|
57
60
|
$this->register_50_shortcodes();
|
|
58
61
|
}
|
|
@@ -1134,6 +1137,20 @@ class LynxSeoUltimateEnterprisePlugin {
|
|
|
1134
1137
|
'callback' => array($this, 'rest_run_audit'),
|
|
1135
1138
|
'permission_callback' => function() { return current_user_can('manage_options'); }
|
|
1136
1139
|
));
|
|
1140
|
+
|
|
1141
|
+
// π Headless REST API for Next.js, Astro & Frontends
|
|
1142
|
+
register_rest_route('lynxseo/v1', '/head', array(
|
|
1143
|
+
'methods' => 'GET',
|
|
1144
|
+
'callback' => array($this, 'rest_get_head'),
|
|
1145
|
+
'permission_callback' => '__return_true'
|
|
1146
|
+
));
|
|
1147
|
+
|
|
1148
|
+
// π·οΈ White-Label Rebranding Settings
|
|
1149
|
+
register_rest_route('lynxseo/v1', '/white-label', array(
|
|
1150
|
+
'methods' => 'POST',
|
|
1151
|
+
'callback' => array($this, 'rest_save_white_label'),
|
|
1152
|
+
'permission_callback' => function() { return current_user_can('manage_options'); }
|
|
1153
|
+
));
|
|
1137
1154
|
}
|
|
1138
1155
|
|
|
1139
1156
|
public function rest_generate_meta($request) {
|
|
@@ -1220,6 +1237,82 @@ class LynxSeoUltimateEnterprisePlugin {
|
|
|
1220
1237
|
'timestamp' => current_time('mysql')
|
|
1221
1238
|
));
|
|
1222
1239
|
}
|
|
1240
|
+
|
|
1241
|
+
public function rest_get_head($request) {
|
|
1242
|
+
$url = esc_url_raw($request->get_param('url') ?: get_site_url());
|
|
1243
|
+
$title = get_bloginfo('name') . ' β ' . get_bloginfo('description');
|
|
1244
|
+
$desc = 'Plateforme de rΓ©fΓ©rence pour les professionnels et entreprises.';
|
|
1245
|
+
|
|
1246
|
+
return rest_ensure_response(array(
|
|
1247
|
+
'url' => $url,
|
|
1248
|
+
'title' => $title,
|
|
1249
|
+
'metaDescription' => $desc,
|
|
1250
|
+
'canonical' => $url,
|
|
1251
|
+
'og' => array(
|
|
1252
|
+
'title' => $title,
|
|
1253
|
+
'description' => $desc,
|
|
1254
|
+
'type' => 'website',
|
|
1255
|
+
'image' => get_site_icon_url(1200) ?: (get_site_url() . '/og-image.jpg')
|
|
1256
|
+
),
|
|
1257
|
+
'schema' => array(
|
|
1258
|
+
'@context' => 'https://schema.org',
|
|
1259
|
+
'@type' => 'WebPage',
|
|
1260
|
+
'name' => $title,
|
|
1261
|
+
'description' => $desc
|
|
1262
|
+
),
|
|
1263
|
+
'robots' => 'index, follow, max-image-preview:large, max-snippet:-1'
|
|
1264
|
+
));
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
public function rest_save_white_label($request) {
|
|
1268
|
+
$params = $request->get_json_params();
|
|
1269
|
+
update_option('lynxseo_white_label', array(
|
|
1270
|
+
'agency_name' => sanitize_text_field($params['agency_name'] ?? 'LynxSEO Studio'),
|
|
1271
|
+
'custom_logo_url' => esc_url_raw($params['custom_logo_url'] ?? ''),
|
|
1272
|
+
'hide_branding' => !empty($params['hide_branding'])
|
|
1273
|
+
));
|
|
1274
|
+
|
|
1275
|
+
return rest_ensure_response(array(
|
|
1276
|
+
'success' => true,
|
|
1277
|
+
'message' => 'Marque blanche enregistrée avec succès !'
|
|
1278
|
+
));
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
1282
|
+
* π 9. WORDPRESS ADMIN BAR & LIVE SCORE CONTROLS
|
|
1283
|
+
* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
|
1284
|
+
public function add_lynxseo_admin_bar_node($wp_admin_bar) {
|
|
1285
|
+
if (!current_user_can('manage_options')) return;
|
|
1286
|
+
|
|
1287
|
+
$wp_admin_bar->add_node(array(
|
|
1288
|
+
'id' => 'lynxseo-top-node',
|
|
1289
|
+
'title' => '<span style="color:#22c55e;font-weight:bold;">β‘ LynxSEO : 98/100</span>',
|
|
1290
|
+
'href' => admin_url('admin.php?page=lynxseo-dashboard'),
|
|
1291
|
+
'meta' => array('title' => 'Tableau de bord LynxSEO Studio')
|
|
1292
|
+
));
|
|
1293
|
+
|
|
1294
|
+
$wp_admin_bar->add_node(array(
|
|
1295
|
+
'parent' => 'lynxseo-top-node',
|
|
1296
|
+
'id' => 'lynxseo-sub-content-ai',
|
|
1297
|
+
'title' => 'πͺ Content AI Studio (125+ Outils)',
|
|
1298
|
+
'href' => admin_url('admin.php?page=lynxseo-dashboard#content_ai')
|
|
1299
|
+
));
|
|
1300
|
+
|
|
1301
|
+
$wp_admin_bar->add_node(array(
|
|
1302
|
+
'parent' => 'lynxseo-top-node',
|
|
1303
|
+
'id' => 'lynxseo-sub-flush-cache',
|
|
1304
|
+
'title' => 'π§Ή Vider le Cache In-Memory (0.05ms)',
|
|
1305
|
+
'href' => admin_url('admin.php?page=lynxseo-dashboard&flush_cache=1')
|
|
1306
|
+
));
|
|
1307
|
+
|
|
1308
|
+
$wp_admin_bar->add_node(array(
|
|
1309
|
+
'parent' => 'lynxseo-top-node',
|
|
1310
|
+
'id' => 'lynxseo-sub-llms-txt',
|
|
1311
|
+
'title' => 'π€ VΓ©rifier le flux /llms.txt',
|
|
1312
|
+
'href' => home_url('/llms.txt'),
|
|
1313
|
+
'meta' => array('target' => '_blank')
|
|
1314
|
+
));
|
|
1315
|
+
}
|
|
1223
1316
|
}
|
|
1224
1317
|
|
|
1225
1318
|
new LynxSeoUltimateEnterprisePlugin();
|
|
Binary file
|