Example #1
0
function foundation_twitter_settings($page_options)
{
    if (defined('WORDTWIT_WPTOUCH_PRO_EXT')) {
        $twitter_accounts = array('none' => __('Disabled', 'wptouch-pro'));
        $accounts = wordtwit_wptouch_get_accounts();
        foreach ($accounts as $name => $account) {
            $twitter_accounts[$name] = $name;
        }
        wptouch_add_page_section(FOUNDATION_PAGE_GENERAL, 'Twitter', 'foundation-web-mobile-twitter', array(wptouch_add_setting('list', 'twitter_account', __('Twitter account to use for Tweet display', 'wptouch-pro'), '', WPTOUCH_SETTING_BASIC, '1.0', $twitter_accounts)), $page_options, FOUNDATION_SETTING_DOMAIN);
    }
    return $page_options;
}
Example #2
0
 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 add_default_wordtwit_pro_settings($defaults)
 {
     if (function_exists('wordtwit_wptouch_has_accounts') && wordtwit_wptouch_has_accounts()) {
         $accounts = wordtwit_wptouch_get_accounts();
         foreach ($accounts as $name => $account) {
             $setting_name = 'wordtwit_account_' . $name;
             $defaults->{$setting_name} = true;
         }
     }
     return $defaults;
 }
Example #4
0
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));
}
        ?>
&hellip;" />
						<button name="submit" type="submit" id="search-submit" class="button-dark">
							<?php 
        _e('Search', 'wptouch-pro');
        ?>
						</button>
					</div>
				</form>
			</div>

			<?php 
        if ($foundation_settings->twitter_account != 'none' && defined('WORDTWIT_WPTOUCH_PRO_EXT')) {
            ?>
				<?php 
            $accounts = wordtwit_wptouch_get_accounts();
            ?>
				<?php 
            $twitter_account = $foundation_settings->twitter_account;
            ?>
				<div class="tab-section twitter wptouch-menu">
					<h4><?php 
            _e('Tweets', 'wptouch-pro');
            ?>
</h4>
					<p class="author-link">
						<img src="<?php 
            echo $accounts[$twitter_account]->profile_image_url;
            ?>
" alt="twitter avatar">
						<span>