本文整理汇总了PHP中Shopp::template_url方法的典型用法代码示例。如果您正苦于以下问题:PHP Shopp::template_url方法的具体用法?PHP Shopp::template_url怎么用?PHP Shopp::template_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shopp
的用法示例。
在下文中一共展示了Shopp::template_url方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: behaviors
/**
* Queues Shopp storefront javascript and styles as needed
*
* @author Jonathan Davis
* @since 1.1
*
* @return void
**/
public function behaviors()
{
$Shopp = Shopp::object();
if (is_ssl()) {
$urls = array('option_siteurl', 'option_home', 'option_url', 'option_wpurl', 'option_stylesheet_url', 'option_template_url', 'script_loader_src');
foreach ($urls as $filter) {
add_filter($filter, 'force_ssl');
}
}
// Replace the WordPress canonical link
remove_action('wp_head', 'rel_canonical');
add_action('wp_head', array($this, 'header'));
add_action('wp_footer', array($this, 'footer'));
wp_enqueue_style('shopp.catalog', SHOPP_ADMIN_URI . '/styles/catalog.css', array(), 20110511, 'screen');
wp_enqueue_style('shopp.icons', SHOPP_ADMIN_URI . '/styles/icons.css', array(), 20110511, 'screen');
wp_enqueue_style('shopp', Shopp::template_url('shopp.css'), array(), 20110511, 'screen');
wp_enqueue_style('shopp.colorbox', SHOPP_ADMIN_URI . '/styles/colorbox.css', array(), 20110511, 'screen');
$orderhistory = is_account_page() && isset($_GET['id']) && !empty($_GET['id']);
if (is_thanks_page() || $orderhistory) {
wp_enqueue_style('shopp.printable', SHOPP_ADMIN_URI . '/styles/printable.css', array(), 20110511, 'print');
}
$loading = shopp_setting('script_loading');
if (!$loading || 'global' == $loading || !empty($page)) {
shopp_enqueue_script('colorbox');
shopp_enqueue_script('shopp');
shopp_enqueue_script('catalog');
shopp_enqueue_script('cart');
if (is_catalog_page()) {
shopp_custom_script('catalog', "var pricetags = {};\n");
}
}
if (is_checkout_page()) {
shopp_enqueue_script('address');
shopp_enqueue_script('checkout');
}
if (is_confirm_page()) {
shopp_enqueue_script('checkout');
}
if (is_account_page()) {
shopp_enqueue_script('address');
$regions = Lookup::country_zones();
$js = 'var regions=' . json_encode($regions);
add_storefrontjs($js, true);
}
}
示例2: shopp_template_url
/**
* @deprecated Use Shopp::template_url()
**/
function shopp_template_url($name)
{
return Shopp::template_url($name);
}