From 019250eff879d86577157ad6136a3613b61cacb8 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Fri, 20 May 2016 22:13:20 -0700 Subject: consolidate include/*_selectors.php (not touching acl_selectors for the moment, as it will likely end up with a different disposition) --- include/network.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'include/network.php') diff --git a/include/network.php b/include/network.php index 25307f857..f38f8d548 100644 --- a/include/network.php +++ b/include/network.php @@ -2150,3 +2150,29 @@ function get_repository_version($branch = 'master') { return '?.?'; } + +function network_to_name($s) { + + $nets = array( + NETWORK_DFRN => t('Friendica'), + NETWORK_FRND => t('Friendica'), + NETWORK_OSTATUS => t('OStatus'), + NETWORK_GNUSOCIAL => t('GNU-Social'), + NETWORK_FEED => t('RSS/Atom'), + NETWORK_MAIL => t('Email'), + NETWORK_DIASPORA => t('Diaspora'), + NETWORK_FACEBOOK => t('Facebook'), + NETWORK_ZOT => t('Zot'), + NETWORK_LINKEDIN => t('LinkedIn'), + NETWORK_XMPP => t('XMPP/IM'), + NETWORK_MYSPACE => t('MySpace'), + ); + + call_hooks('network_to_name', $nets); + + $search = array_keys($nets); + $replace = array_values($nets); + + return str_replace($search,$replace,$s); + +} -- cgit v1.2.3