kollapsminoriteten/wp-content/plugins/blocksy-companion/framework/helpers/exts.php

38 lines
681 B
PHP
Raw Permalink Normal View History

2025-08-27 08:44:30 +02:00
<?php
2026-03-31 11:30:59 +02:00
if (! defined('ABSPATH')) {
exit;
}
function blocksy_companion_exts_get_preliminary_config($ext = null, $args = []) {
2025-08-27 08:44:30 +02:00
$args = wp_parse_args($args, [
'only_billing_data' => false
]);
2026-03-31 11:30:59 +02:00
$data = blocksy_companion_get_variables_from_file(
2025-08-27 08:44:30 +02:00
dirname(__FILE__) . '/exts-configs.php',
[
'data' => []
],
[
'only_billing_data' => $args['only_billing_data']
]
);
$data = $data['data'];
if (! $ext || ! isset($data[$ext])) {
return $data;
}
return $data[$ext];
}
2026-03-31 11:30:59 +02:00
function blocksy_companion_get_ext($id, $args = []) {
2025-08-27 08:44:30 +02:00
if (! \Blocksy\Plugin::instance()->extensions) {
return null;
}
return \Blocksy\Plugin::instance()->extensions->get($id, $args);
}