Files
medicalalert-web-reloaded/wp/wp-content/plugins/ip-geo-block/admin/includes/tab-attribution.php
Tony Volpe be83910651 Merged in feature/280-dev-dev01 (pull request #21)
auto-patch  280-dev-dev01-2024-01-19T16_41_58

* auto-patch  280-dev-dev01-2024-01-19T16_41_58
2024-01-19 16:44:43 +00:00

35 lines
745 B
PHP

<?php
class IP_Geo_Block_Admin_Tab {
public static function tab_setup( $context, $tab ) {
register_setting(
$option_slug = IP_Geo_Block::PLUGIN_NAME,
$option_name = IP_Geo_Block::OPTION_NAME
);
add_settings_section(
$section = IP_Geo_Block::PLUGIN_NAME . '-attribution',
__( 'Attribution links', 'ip-geo-block' ),
NULL,
$option_slug
);
foreach ( IP_Geo_Block_Provider::get_providers( 'link' ) as $provider => $key ) {
add_settings_field(
$option_name.'_attribution_'.$provider,
$provider,
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'html',
'option' => $option_name,
'field' => 'attribution',
'value' => $key,
)
);
}
}
}