-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
121 changed files
with
87,203 additions
and
67,851 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const settingsGeneral = () => { | ||
const wplang = document.getElementById('WPLANG')?.parentElement?.parentElement; | ||
const language = document.getElementById('amnesty-language-name')?.parentElement?.parentElement; | ||
|
||
if (!wplang || !language) { | ||
return; | ||
} | ||
|
||
wplang.insertAdjacentElement('beforeBegin', language); | ||
}; | ||
|
||
document.addEventListener('DOMContentLoaded', settingsGeneral); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
wp-content/themes/humanity-theme/includes/admin/settings-general.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
declare( strict_types = 1 ); | ||
|
||
if ( ! function_exists( 'amnesty_register_general_settings' ) ) { | ||
/** | ||
* Register custom fields on general settings page | ||
* | ||
* @package Amnesty\Plugins\CMB2 | ||
* | ||
* @return void | ||
*/ | ||
function amnesty_register_general_settings() { | ||
add_settings_field( | ||
'amnesty_language_name', | ||
/* translators: [admin] */ | ||
__( 'Language Display Name', 'amnesty' ), | ||
'amnesty_render_setting_language_name', | ||
'general' | ||
); | ||
|
||
register_setting( 'general', 'amnesty_language_name', 'sanitize_text_field' ); | ||
} | ||
} | ||
|
||
if ( ! function_exists( 'amnesty_render_setting_language_name' ) ) { | ||
/** | ||
* Render the language name settings field | ||
* | ||
* @package Amnesty\Plugins\CMB2 | ||
* | ||
* @return void | ||
*/ | ||
function amnesty_render_setting_language_name() { | ||
$value = get_option( 'amnesty_language_name' ); | ||
printf( | ||
'<input id="amnesty-language-name" class="regular-text" name="amnesty_language_name" type="text" value="%1$s">', | ||
esc_attr( $value ) | ||
); | ||
|
||
printf( | ||
'<p class="description">%s</p>', | ||
/* translators: [admin] */ | ||
esc_html__( 'Override the site language display name on the site frontend', 'amnesty' ) | ||
); | ||
} | ||
} | ||
|
||
add_action( 'admin_init', 'amnesty_register_general_settings' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
wp-content/themes/humanity-theme/languages/amnesty-ar-6d8849fb3b93a7cc4385ed0fa31d2670.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"translation-revision-date":"2024-04-17 11:39+0100","generator":"WP-CLI\/2.8.1","source":"assets\/scripts\/bundle.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ar","plural-forms":"nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);"},"%d day":["\u202b%d \u064a\u0648\u0645"],"time format(prefix translated separately) i.e. \"x, H:i:s\"\u0004%1$s, %2$s:%3$s:%4$s":["%1$s, %2$s:%3$s:%4$s"],"time format, H:i:s\u0004%1$s:%2$s:%3$s":["%1$s:%2$s:%3$s"]}}} |
1 change: 1 addition & 0 deletions
1
wp-content/themes/humanity-theme/languages/amnesty-ar-aeef315b1554630b7115ed29567499af.json
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.