function wptouch_wordtwit_get_enabled_accounts() { $enabled_accounts = array(); if (wordtwit_wptouch_has_accounts()) { $accounts = wordtwit_wptouch_get_accounts(); $settings = wptouch_get_settings(); foreach ($accounts as $name => $account) { if (wptouch_wordtwit_current_user_can_use_account($account)) { $setting_name = 'wordtwit_account_' . $name; if (isset($settings->{$setting_name}) && $settings->{$setting_name}) { $enabled_accounts[$name] = $account; } } } } return $enabled_accounts; }
function classic_get_extensions_menu() { if (function_exists('get_flickrRSS')) { $flickr_mobile_rss_option = array('checkbox', 'classic_show_flickr_rss', __('Use mobile WPtouch FlickrRSS Photos template', "wptouch-pro"), __("Shows the latest 20 photos from your Flickr RSS feed on its own page, and adds a link to for it to your drop-down menu.", "wptouch-pro")); $flickr_ipad_rss_option = array('checkbox', 'classic_ipad_show_flickr_button', __('Enable iPad FlickrRSS popover', "wptouch-pro"), __("Shows the latest 20 photos from your Flickr RSS feed in its own popover, and adds a button to the menubar.", "wptouch-pro")); } else { $flickr_mobile_rss_option = array('checkbox-disabled', 'classic_show_flickr_rss', __('Use mobile WPtouch Photos template', "wptouch-pro"), __("Shows the latest 20 photos from your Flickr RSS feed on its own page, and adds a link to for it to your drop-down menu.", "wptouch-pro")); $flickr_ipad_rss_option = array('checkbox-disabled', 'classic_ipad_show_flickr_button', __('Enable iPad FlickrRSS popover', "wptouch-pro"), __("Shows the latest 20 photos from your Flickr RSS feed in its own popover, and adds a button to the menubar.", "wptouch-pro")); } if (defined('WORDTWIT_PRO_INSTALLED')) { $wordtwit_mobile_option = array('checkbox', 'classic_show_wordtwit', __('Show Twitter in mobile drop-down menu tab-bar', "wptouch-pro"), __("Shows the latest 10 tweets (excluding those tweeted from WordTwit) in your drop-down menu.", "wptouch-pro")); $wordtwit_ipad_option = array('checkbox', 'classic_ipad_show_wordtwit', __('Show Twitter popover on iPad', "wptouch-pro"), __("Shows the latest 10 tweets (excluding those tweeted from WordTwit) in its own popover, and adds a button to the menubar.", "wptouch-pro")); } else { $wordtwit_mobile_option = array('checkbox-disabled', 'classic_show_wordtwit', __('Show Twitter in mobile drop-down menu tab-bar', "wptouch-pro"), __("Shows the latest 10 tweets (excluding those tweeted from WordTwit) in your drop-down menu.", "wptouch-pro")); $wordtwit_ipad_option = array('checkbox-disabled', 'classic_ipad_show_wordtwit', __('Show Twitter popover on iPad', "wptouch-pro"), __("Shows the latest 10 tweets (excluding those tweeted from WordTwit) in its own popover, and adds a button to the menubar.", "wptouch-pro")); } $top_section = array(array('section-start', 'wordtwit-options', __('WordTwit Pro', "wptouch-pro")), array('copytext', 'copytext-wordtwit', sprintf(__('These settings require the %sWordTwit Pro%s plugin to be installed:', "wptouch-pro"), '<a href="http://www.bravenewcode.com/store/plugins/wordtwit-pro/?utm_source=wptouch_pro&utm_medium=web&utm_campaign=admin_panel" target="_blank">', '</a>')), $wordtwit_mobile_option, $wordtwit_ipad_option); if (defined('WORDTWIT_PRO_INSTALLED')) { if (wordtwit_wptouch_has_accounts()) { $middle_section = array(array('copytext', 'copytext-wordtwit-accounts', __('Shared accounts to include in tweet listings:', "wptouch-pro"))); $accounts = wordtwit_wptouch_get_accounts(); foreach ($accounts as $name => $value) { if (wptouch_wordtwit_current_user_can_use_account($value)) { $middle_section[] = array('checkbox', 'wordtwit_account_' . $name, '@' . $name); } } } else { $middle_section = array('copytext', 'copytext-wordtwit-add-accounts', __('You must add at least one account in WordTwit Pro.', 'wptouch-pro'), ''); } } else { $middle_section = array(); } $bottom_section = array(array('section-end'), array('spacer'), array('section-start', 'flickr-options', __('FlickrRSS', "wptouch-pro")), array('copytext', 'copytext-flickr', sprintf(__('These settings require the %sFlickrRSS%s plugin to be installed:', "wptouch-pro"), '<a href="http://eightface.com/wordpress/flickrrss/" target="_blank">', '</a>')), $flickr_mobile_rss_option, $flickr_ipad_rss_option, array('section-end')); return apply_filters('classic_extensions_admin', array_merge($top_section, $middle_section, $bottom_section)); }