Last active
November 6, 2019 17:43
-
-
Save deckerweb/7dcfa4568d9f77ccbdae5f317c849e09 to your computer and use it in GitHub Desktop.
Plugin - Sermon Manager for WordPress: Adds German Bible translations from biblia.com to the Bible select field in the plugin settings - that way you can offer also verse links in German language ;-)
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
<?php | |
/** Do NOT include the opening php tag */ | |
if ( ! function_exists( 'ddw_sm_bible_selection' ) ) : | |
add_filter( 'sm_verse_settings', 'ddw_sm_bible_selection' ); | |
/** | |
* Plugin: Sermon Manager for WordPress | |
* For "Verse" settings add German bible versions from biblia.com | |
* | |
* @link https://github.com/WP-for-Church/Sermon-Manager/blob/dev/includes/admin/settings/class-sm-settings-verse.php | |
* @link https://biblia.com/library | |
* | |
* @author David Decker - DECKERWEB | |
* @link https://gist.github.com/deckerweb | |
* @link https://toolbarextras.com | |
* | |
* @param array $settings Array of Verse settings. | |
* @return array $settings Modified settings array. | |
*/ | |
function ddw_sm_bible_selection( $settings ) { | |
if ( strpos( get_locale(), 'de_' ) !== false ) { | |
foreach ( $settings as &$setting ) { | |
if ( 'verse_bible_version' === $setting[ 'id' ] ) { | |
$setting[ 'options' ] = array_merge( | |
array( | |
'grmnbblschl2000' => 'Schlachter 2000', | |
'lu1912' => 'Lutherbibel 1912', | |
'grmnbblgbrstzng' => 'Neue Genfer Uebersetzung (NGUe)', | |
), | |
$setting[ 'options' ] | |
); | |
$setting[ 'default' ] = 'grmnbblschl2000'; | |
break; | |
} // end if | |
} // end foreach | |
return $settings; | |
} // end if | |
return $settings; | |
} // end function | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment