Refactor(Admin): Implement Settings API & AJAX save for Settings Manager

- Refactored WPALLSTARS_Settings_Manager to use WordPress Settings API.
- Stores settings in single 'wpallstars_options' array.
- Implemented robust AJAX saving for specific settings (e.g., color scheme, auto-upload) via WPALLSTARS_Admin_Manager::update_option.
- Updated JS and setting render functions for AJAX.
- Corrected admin menu registration and script enqueue hooks.
- Includes file renames from wp-allstars to wpallstars.
This commit is contained in:
2025-04-19 13:12:37 +01:00
parent 2870a43ae5
commit f65d648a82
26 changed files with 2191 additions and 1591 deletions
+2 -2
View File
@@ -11,10 +11,10 @@ if (!defined('ABSPATH')) {
// Define readme content
function wp_allstars_get_readme_content() {
// Get README.md content
$readme_path = WP_PLUGIN_DIR . '/wpa-superstar-plugin/README.md';
$readme_path = WP_PLUGIN_DIR . '/wpallstars-superstar-plugin/README.md';
$readme_content = '';
if (file_exists($readme_path)) {
if (file_exists($readme_path) && is_readable($readme_path)) {
$readme_content = file_get_contents($readme_path);
} else {
// Fallback content if README.md is not found