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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user