-
Task
-
Resolution: Unresolved
-
Must have
-
None
-
Technical Debt
Summary
We are currently using the parent act_page value added through the plugin. The main problem we have is that in cases where the plugin is disabled, or even potentiall removed we will get a tons of unexpected issues throughout the code.
Proposed solution
Here is a PoC PR with the proposed improvement as a reference.
1) Remove all the appearences of p4ge_vars
2) Consolidate the value of the parent action page only in one place.
Defining the take_action_page for both cases even if the `new_ia` is enabled|disabled
Backend
$option_values['new_ia'] === 'on' ? $option_values['take_action_page'] : $option_values['act_page'];
Frontend
Then, only use the take_action_page.
window.p4_vars.options.take_action_page