namespace MO_CAW\Common\Functionality;
use MO_CAW\Common\Constants;
use MO_CAW\Common\Utils;
add_action(Constants::ADMIN_INIT_HOOK, __NAMESPACE__ . "\admin_init_functionalities");
add_action(Constants::INIT_HOOK, __NAMESPACE__ . "\init_functionalities");
add_action(Constants::REST_API_INIT_HOOK, __NAMESPACE__ . "\rest_init_functionalities", 10);
function admin_init_functionalities()
{
$dS = array("Update_Framework");
instance_creator($dS);
}
function init_functionalities()
{
$dS = array("Display_Shortcode", "External_API_Connection");
instance_creator($dS);
register_actions();
}
function rest_init_functionalities()
{
$dS = array("API_Creation", "SQL_API_Creation");
instance_creator($dS);
}
function instance_creator($zK)
{
$mM = Constants::PLAN_NAMESPACE . "\Functionality\";
foreach ($zK as $lr) {
$z8 = $mM . $lr;
$z8 = Utils::validate_class_name($mM, $lr);
new $z8();
u7:
}
z8:
}
function register_actions()
{
$uK = Utils::validate_class_name(Constants::PLAN_NAMESPACE . "\Functionality\", "Display_Shortcode");
add_shortcode("mo_custom_api_shortcode", array($uK, "render_shortcode"));
}
© 2023 Quttera Ltd. All rights reserved.