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:
@@ -106,13 +106,8 @@ class Product {
|
||||
}
|
||||
|
||||
public function enqueue_admin() {
|
||||
global $current_screen;
|
||||
|
||||
// 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;
|
||||
|
||||
if($current_screen->id == 'formipay_page_formipay-products') {
|
||||
|
||||
@@ -233,16 +228,8 @@ class Product {
|
||||
}
|
||||
|
||||
public function formipay_products() {
|
||||
// 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('products');
|
||||
} else {
|
||||
// Classic Grid.js version
|
||||
include_once FORMIPAY_PATH . 'admin/page-products.php';
|
||||
}
|
||||
// React admin
|
||||
\Formipay\Admin\ReactAdmin::render_mount_point('products');
|
||||
}
|
||||
|
||||
public function cpt_post_fields_box($boxes) {
|
||||
|
||||
Reference in New Issue
Block a user