| 1 |
<?php |
| 2 |
add_filter( 'wpas_plugin_settings', 'wpas_core_settings_language', 95, 1 ); |
| 3 |
/** |
| 4 |
* Add plugin language settings and notices |
| 5 |
* |
| 6 |
* @param (array) $def Array of existing settings |
| 7 |
* @return (array) Updated settings |
| 8 |
*/ |
| 9 |
function wpas_core_settings_language( $def ) { |
| 10 |
|
| 11 |
// translators: %s is the link to the documentation. |
| 12 |
$desc = __( 'Awesome Support includes full and partial translations for many languages. These are automatically applied when you change the WordPress language settings.<br /><br /> Learn how you can add, change and update translation terms in this document: %s', 'awesome-support' ); |
| 13 |
$settings = array( |
| 14 |
'Language' => array( |
| 15 |
'name' => __( 'Language Options', 'awesome-support' ), |
| 16 |
'options' => array( |
| 17 |
|
| 18 |
array( |
| 19 |
'name' => __( 'Language Notices', 'awesome-support' ), |
| 20 |
'id' => 'language_notices', |
| 21 |
'type' => 'note', |
| 22 |
'desc' => sprintf( $desc, '<a href="https://getawesomesupport.com/documentation/awesome-support/translations/" target="_blank">' . 'Translations in Awesome Support' . '</a>' ), |
| 23 |
), |
| 24 |
|
| 25 |
) |
| 26 |
), |
| 27 |
); |
| 28 |
|
| 29 |
return array_merge( $def, apply_filters('wpas_settings_language', $settings ) ); |
| 30 |
|
| 31 |
} |