Example #1
0
function wptouch_core_header_pages()
{
    $pages = bnc_wp_touch_get_pages();
    global $blog_id;
    foreach ($pages as $p) {
        if (file_exists(compat_get_plugin_dir('wptouch') . '/images/icon-pool/' . $p['icon'])) {
            $image = compat_get_plugin_url('wptouch') . '/images/icon-pool/' . $p['icon'];
        } else {
            $image = compat_get_upload_url() . '/wptouch/custom-icons/' . $p['icon'];
        }
        echo '<li><a href="' . get_permalink($p['ID']) . '"><img src="' . $image . '" alt="icon" />' . __($p['post_title']) . '</a></li>';
    }
    echo sprintf(__("%sEchelon%s", "wptouch"), '<li><a target="_blank" href="http://echelon.e27.sg/"><img src="' . bnc_get_title_image() . '" alt=""/>', '</a></li>');
    echo sprintf(__("%sEchelon Ignite: Thailand%s", "wptouch"), '<li><a target="_blank" href="http://echelon.e27.sg/TH2012/"><img src="' . bnc_get_title_image() . '" alt=""/>', '</a></li>');
    echo sprintf(__("%sWant to help Entrepreneurs? %s", "wptouch"), '<li><a href="http://e27.sg/milaap-and-e27-entrepreneurship-development-fund/"><img src="' . bnc_get_title_image() . '" alt=""/>', '</a></li>');
    echo sprintf(__("%sAbout%s", "wptouch"), '<li><a href="http://e27.sg/about/"><img src="' . bnc_get_title_image() . '" alt=""/>', '</a></li>');
    echo sprintf(__("%sAsia%s", "wptouch"), '<li><a href="' . esc_url(home_url('/category/country/asia/')) . '"><img src="' . bnc_get_title_image() . '" alt=""/>', '</a></li>');
    echo sprintf(__("%sSoutheast Asia%s", "wptouch"), '<li><a href="' . esc_url(home_url('/category/country/southeast-asia-country/')) . '"><img src="' . bnc_get_title_image() . '" alt=""/>', '</a></li>');
    echo sprintf(__("%sEchelon 2013%s", "wptouch"), '<li><a target="_blank" href="' . esc_url(home_url('/echelon-2013-startups/')) . '"><img src="' . bnc_get_title_image() . '" alt=""/>', '</a></li>');
    echo sprintf(__("%sStartups%s", "wptouch"), '<li><a href="' . esc_url(home_url('/category/newsbites/startups/')) . '"><img src="' . bnc_get_title_image() . '" alt=""/>', '</a></li>');
    echo sprintf(__("%sProduct%s", "wptouch"), '<li><a href="' . esc_url(home_url('/category/newsbites/product/')) . '"><img src="' . bnc_get_title_image() . '" alt=""/>', '</a></li>');
    echo sprintf(__("%sPeople%s", "wptouch"), '<li><a href="' . esc_url(home_url('/category/newsbites/people/')) . '"><img src="' . bnc_get_title_image() . '" alt=""/>', '</a></li>');
    echo sprintf(__("%sInvestments and Acquisitions%s", "wptouch"), '<li><a href="' . esc_url(home_url('/category/newsbites/investments-and-acquisitions/')) . '"><img src="' . bnc_get_title_image() . '" alt=""/>', '</a></li>');
    echo sprintf(__("%sEvents%s", "wptouch"), '<li><a href="' . esc_url(home_url('/category/events/')) . '"><img src="' . bnc_get_title_image() . '" alt=""/>', '</a></li>');
}
function wptouch_core_header_pages()
{
    $pages = bnc_wp_touch_get_pages();
    global $blog_id;
    foreach ($pages as $p) {
        if (file_exists(compat_get_plugin_dir('wptouch') . '/images/icon-pool/' . $p['icon'])) {
            $image = compat_get_plugin_url('wptouch') . '/images/icon-pool/' . $p['icon'];
        } else {
            $image = compat_get_upload_url() . '/wptouch/custom-icons/' . $p['icon'];
        }
        echo '<li><a href="' . get_permalink($p['ID']) . '"><img src="' . $image . '" alt="icon" />' . __($p['post_title']) . '</a></li>';
    }
}
Example #3
0
}
$wptouch_settings = bnc_wptouch_get_settings();
?>
 <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
 	<div class="post content" id="post-<?php 
        the_ID();
        ?>
">
	 <div class="page">
		<div class="page-title-icon">		
			<?php 
        $mypages = bnc_wp_touch_get_pages();
        if (isset($mypages[get_the_ID()])) {
            $icon_name = $mypages[get_the_ID()]['icon'];
            if (file_exists(compat_get_plugin_dir('wptouch') . '/images/icon-pool/' . $icon_name)) {
                $image = compat_get_plugin_url('wptouch') . '/images/icon-pool/' . $icon_name;
            } else {
                $image = compat_get_upload_url() . '/wptouch/custom-icons/' . $icon_name;
            }
            echo '<img class="pageicon" src="' . $image . '" alt="icon" />';
        } else {
            echo '<img class="pageicon" src="' . compat_get_plugin_url('wptouch') . '/images/icon-pool/Default.png" alt="pageicon" />';
        }
        ?>
 
		</div>
			<h2><?php 
Example #4
0
function bnc_the_page_icon()
{
    $settings = bnc_wp_touch_get_menu_pages();
    $mypages = bnc_wp_touch_get_pages();
    $icon_name = false;
    if (isset($settings['sort-order']) && $settings['sort-order'] == 'page') {
        global $post;
        foreach ($mypages as $key => $page) {
            if ($page['ID'] == $post->ID) {
                $icon_name = $page['icon'];
                break;
            }
        }
    } else {
        if (isset($mypages[get_the_ID()])) {
            $icon_name = $mypages[get_the_ID()]['icon'];
        }
    }
    if ($icon_name) {
        if (file_exists(compat_get_plugin_dir('wptouch') . '/images/icon-pool/' . $icon_name)) {
            $image = compat_get_plugin_url('wptouch') . '/images/icon-pool/' . $icon_name;
        } else {
            $image = compat_get_upload_url() . '/wptouch/custom-icons/' . $icon_name;
        }
        echo '<img class="pageicon" src="' . $image . '" alt="icon" />';
    } else {
        echo '<img class="pageicon" src="' . compat_get_plugin_url('wptouch') . '/images/icon-pool/Default.png" alt="pageicon" />';
    }
}