本文整理汇总了PHP中compat_get_plugin_dir函数的典型用法代码示例。如果您正苦于以下问题:PHP compat_get_plugin_dir函数的具体用法?PHP compat_get_plugin_dir怎么用?PHP compat_get_plugin_dir使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了compat_get_plugin_dir函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wptouch_core_header_pages
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>');
}
示例2: wptouch_core_header_pages
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>';
}
}
示例3: while
<?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
the_title();
?>
</h2>
示例4: compat_get_plugin_dir
<?php
require_once compat_get_plugin_dir('wptouch') . '/include/plugin.php';
global $wptouch_settings;
global $bnc_wptouch_version;
$version = bnc_get_wp_version();
?>
<div class="metabox-holder">
<div class="postbox">
<h3><span class="plugin-options"> </span><?php
_e("Plugin Support & Compatibility", "wptouch");
?>
</h3>
<div class="left-content">
<div class="wptouch-version-support">
<?php
echo '<p class="wpv">';
_e('WordPress version: ', 'wptouch');
echo '' . get_bloginfo('version') . '';
echo '</p><p class="wptv">';
echo sprintf(__('WPtouch %s support: ', 'wptouch'), $bnc_wptouch_version);
if ($version > 3.3) {
echo sprintf(__("%sUnverified%s", "wptouch"), '<span class="caution">', '</span>');
} else {
if ($version >= 2.9) {
echo sprintf(__("%sSupported.%s", "wptouch"), '<span class="go">', '</span>');
} else {
echo sprintf(__("%sUnsupported. Upgrade Required.%s", "wptouch"), '<span class="red">', '</span>');
}
示例5: theme_root
function theme_root($path)
{
$theme_root = compat_get_plugin_dir('wptouch');
if ($this->applemobile && $this->desired_view === 'mobile') {
return $theme_root . '/themes';
} else {
return $path;
}
}
示例6: theme_root
function theme_root($path)
{
$theme_root = compat_get_plugin_dir('buddypress-mobile');
if ($this->iphone || $this->ipad) {
return $theme_root . '/themes';
} else {
return $path;
}
}
示例7: bnc_get_icon_locations
function bnc_get_icon_locations()
{
$locations = array('default' => array(compat_get_plugin_dir('wptouch') . '/images/icon-pool', compat_get_plugin_url('wptouch') . '/images/icon-pool'), 'custom' => array(compat_get_upload_dir() . '/wptouch/custom-icons', compat_get_upload_url() . '/wptouch/custom-icons'));
return $locations;
}