beginning of dns tool
link extensions for admin
This commit is contained in:
parent
c62015a5fa
commit
48b2d50861
@ -16,4 +16,6 @@ include( plugin_dir_path( __FILE__ ) . 'woocommerce/my_account_customizations.ph
|
|||||||
include( plugin_dir_path( __FILE__ ) . 'rest-api/provisioner_rest_api_extensions.php');
|
include( plugin_dir_path( __FILE__ ) . 'rest-api/provisioner_rest_api_extensions.php');
|
||||||
include( plugin_dir_path( __FILE__ ) . 'woocommerce/new_subscription_set_to_needs_provision.php');
|
include( plugin_dir_path( __FILE__ ) . 'woocommerce/new_subscription_set_to_needs_provision.php');
|
||||||
include( plugin_dir_path( __FILE__ ) . 'woocommerce/processing_to_complete_order.php');
|
include( plugin_dir_path( __FILE__ ) . 'woocommerce/processing_to_complete_order.php');
|
||||||
include( plugin_dir_path( __FILE__ ) . 'shared/federated_woocommerce_shared_functions.php');
|
include( plugin_dir_path( __FILE__ ) . 'shared/federated_woocommerce_shared_functions.php');
|
||||||
|
|
||||||
|
include( plugin_dir_path( __FILE__ ) . 'rest-api/get_dns_records_test.php');
|
24
rest-api/get_dns_records_test.php
Normal file
24
rest-api/get_dns_records_test.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
add_action('rest_api_init', 'federated_route_get_dns');
|
||||||
|
|
||||||
|
function federated_route_get_dns(){
|
||||||
|
//register routes here
|
||||||
|
register_rest_route(
|
||||||
|
'federated-rest/v1',
|
||||||
|
'get-dns',
|
||||||
|
array(
|
||||||
|
'methods' => 'GET',
|
||||||
|
'callback' => 'federated_get_dns',
|
||||||
|
'permissions_callback' => 'check_federated_permissions'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function federated_get_dns($request){
|
||||||
|
$hostname = $request['hostname'];
|
||||||
|
|
||||||
|
$dns = dns_get_record($hostname);
|
||||||
|
|
||||||
|
return $dns;
|
||||||
|
}
|
@ -135,10 +135,10 @@ function echo_enterprise_app_links($domain){
|
|||||||
echo_link_for_core_app($domain, 'baserow', 'Visual Databases', 'yellow', '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" /></svg>', 'Maintain your data, or build a back end for your next web app with Baserow.');
|
echo_link_for_core_app($domain, 'baserow', 'Visual Databases', 'yellow', '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" /></svg>', 'Maintain your data, or build a back end for your next web app with Baserow.');
|
||||||
echo_link_for_core_app($domain, 'bookstack', 'Wiki Documentation', 'amber', '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25" /></svg>', 'Create and maintain beautiful documentation for your personal knowledge, company processes, and more.');
|
echo_link_for_core_app($domain, 'bookstack', 'Wiki Documentation', 'amber', '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25" /></svg>', 'Create and maintain beautiful documentation for your personal knowledge, company processes, and more.');
|
||||||
echo_link_for_core_app($domain, 'gitea', 'GIT Source Control', 'emerald', '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5" /></svg>', 'Manage your repos and CI/CD with confidence using GiTea source control.');
|
echo_link_for_core_app($domain, 'gitea', 'GIT Source Control', 'emerald', '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5" /></svg>', 'Manage your repos and CI/CD with confidence using GiTea source control.');
|
||||||
echo_link_for_core_app($domain, 'castopod', 'Podcast Broadcasting', 'yellow', '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M12 18.75a6 6 0 0 0 6-6v-1.5m-6 7.5a6 6 0 0 1-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 0 1-3-3V4.5a3 3 0 1 1 6 0v8.25a3 3 0 0 1-3 3Z" /></svg>', 'Keep your audience engaged and aggregate your podcast easily with Castopod.');
|
echo_link_for_core_app($domain, 'castopod', 'Podcast Broadcasting', 'yellow', '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M12 18.75a6 6 0 0 0 6-6v-1.5m-6 7.5a6 6 0 0 1-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 0 1-3-3V4.5a3 3 0 1 1 6 0v8.25a3 3 0 0 1-3 3Z" /></svg>', 'Keep your audience engaged and aggregate your podcast easily with Castopod.', '/cp-auth/login');
|
||||||
}
|
}
|
||||||
|
|
||||||
function echo_link_for_core_app($domain, $subdomain = '', $app_title = '', $color = 'emerald', $svg = '', $app_description = ''){
|
function echo_link_for_core_app($domain, $subdomain = '', $app_title = '', $color = 'emerald', $svg = '', $app_description = '', $domain_extension = ''){
|
||||||
$url = '';
|
$url = '';
|
||||||
if (isset($subdomain) && $subdomain !== '') {
|
if (isset($subdomain) && $subdomain !== '') {
|
||||||
$url = $subdomain . '.' . $domain;
|
$url = $subdomain . '.' . $domain;
|
||||||
@ -154,7 +154,7 @@ function echo_link_for_core_app($domain, $subdomain = '', $app_title = '', $colo
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<div class="mt-8">';
|
echo '<div class="mt-8">';
|
||||||
echo '<h3 class="text-base font-semibold leading-6 text-gray-900">';
|
echo '<h3 class="text-base font-semibold leading-6 text-gray-900">';
|
||||||
echo '<a href="https://' . $url . '" class="focus:outline-none" target="_blank">';
|
echo '<a href="https://' . $url . $domain_extension . '" class="focus:outline-none" target="_blank">';
|
||||||
echo '<span class="absolute inset-0" aria-hidden="true"></span>';
|
echo '<span class="absolute inset-0" aria-hidden="true"></span>';
|
||||||
echo $app_title;
|
echo $app_title;
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
|
Loading…
Reference in New Issue
Block a user