refactor: remove coexistence mode, use React only
Remove all dual-mode rendering logic since React is now the single admin interface. Focus on implementing full table features in React. Changes: - Remove ?react= query param checks from all page methods - Remove admin notice and footer toggle from ReactAdmin - Simplify asset loading - ReactAdmin handles all assets - Clean up Init.php enqueue method Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -93,16 +93,8 @@ class Form {
|
||||
}
|
||||
|
||||
public function formipay_form() {
|
||||
// Coexistence mode: check query param or setting for React version
|
||||
$use_react = isset($_GET['react']) || get_option('formipay_use_react_admin', false);
|
||||
|
||||
if ($use_react) {
|
||||
// New React version
|
||||
\Formipay\Admin\ReactAdmin::render_mount_point('forms');
|
||||
} else {
|
||||
// Classic Grid.js version
|
||||
include_once FORMIPAY_PATH . 'admin/page-forms.php';
|
||||
}
|
||||
// React admin
|
||||
\Formipay\Admin\ReactAdmin::render_mount_point('forms');
|
||||
}
|
||||
|
||||
public function metaboxes($post) {
|
||||
@@ -1257,13 +1249,8 @@ class Form {
|
||||
}
|
||||
|
||||
public function enqueue_admin() {
|
||||
global $current_screen, $post;
|
||||
|
||||
// Check coexistence mode - if React is active, don't load classic assets
|
||||
$use_react = isset($_GET['react']) || get_option('formipay_use_react_admin', false);
|
||||
if ($use_react) {
|
||||
return;
|
||||
}
|
||||
// Assets now handled by ReactAdmin class
|
||||
return;
|
||||
|
||||
// Check that we are on the 'Checker' post editor screen
|
||||
if ( $current_screen->post_type === 'formipay-form' && $current_screen->base === 'post' ) {
|
||||
|
||||
Reference in New Issue
Block a user