feat: live Runware model sync with 24h cache and Sync Now button (v0.15.0)

Replace hardcoded model registry with live-sync system.

New PRAutoBlogger_Runware_Model_Catalog class fetches the Runware model
catalog daily, caches in WP options (24h TTL), and falls back to the
hardcoded 15-model list if the API is unavailable. Sync Now button
in PRAdmin for on-demand refresh. Eliminates the drift that caused
silent model fallback bugs (v0.13.8, v0.14.0).
This commit is contained in:
peptiderepo
2026-04-26 11:38:59 +07:00
committed by GitHub
parent 61975d4551
commit 73ac6d12b4
12 changed files with 643 additions and 31 deletions

View File

@@ -259,5 +259,13 @@ class PRAutoBlogger_Settings_Fields_Extended {
'description' => __( 'When the provider rejects an image prompt as NSFW, retry once with a generic fallback scene built from the article title. Disable to fail fast if the filter gets trigger-happy.', 'prautoblogger' ),
),
);
array(
'id' => 'prautoblogger_runware_model_catalog',
'label' => __( 'Runware Model Catalog', 'prautoblogger' ),
'type' => 'runware_catalog_sync',
'section' => 'prautoblogger_images',
'description' => __( 'Live model catalog sync status and on-demand refresh.', 'prautoblogger' ),
),
);
}
}