2003-11-07 16:16:12 -05:00
|
|
|
<?php
|
|
|
|
|
2003-11-10 18:47:28 -05:00
|
|
|
if( is_object( $wpsmarty ) == false )
|
2003-11-07 16:16:12 -05:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
function smarty_bloginfo( $params )
|
|
|
|
{
|
|
|
|
$show = '';
|
|
|
|
$display = true;
|
|
|
|
extract( $params );
|
|
|
|
return bloginfo($show, $display);
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'bloginfo', 'smarty_bloginfo' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_bloginfo_rss( $params )
|
|
|
|
{
|
|
|
|
$show = '';
|
|
|
|
extract( $params );
|
|
|
|
return bloginfo_rss($show);
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'bloginfo_rss', 'smarty_bloginfo_rss' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_bloginfo_unicode( $params )
|
|
|
|
{
|
|
|
|
$show = '';
|
|
|
|
extract( $params );
|
|
|
|
return bloginfo_unicode( $show );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'bloginfo_unicode', 'smarty_bloginfo_unicode' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_get_bloginfo( $params )
|
|
|
|
{
|
|
|
|
$show = '';
|
|
|
|
extract( $params );
|
|
|
|
return get_bloginfo( $show );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'get_bloginfo', 'smarty_get_bloginfo' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_single_post_title( $params )
|
|
|
|
{
|
|
|
|
$display = '';
|
|
|
|
$prefix = '';
|
|
|
|
extract( $params );
|
|
|
|
return single_post_title( $prefix, $display );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'single_post_title', 'smarty_single_post_title' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_single_cat_title( $params )
|
|
|
|
{
|
|
|
|
$display = '';
|
|
|
|
$prefix = '';
|
|
|
|
extract( $params );
|
|
|
|
return single_cat_title( $prefix, $display );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'single_cat_title', 'smarty_single_cat_title' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_single_month_title( $params )
|
|
|
|
{
|
|
|
|
$display = '';
|
|
|
|
$prefix = '';
|
|
|
|
extract( $params );
|
|
|
|
return single_month_title( $prefix, $display );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'single_month_title', 'smarty_single_month_title' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_get_archives_link( $params )
|
|
|
|
{
|
|
|
|
$format = 'html';
|
|
|
|
$before = '';
|
|
|
|
$after = '';
|
|
|
|
extract( $params );
|
|
|
|
return get_archives_link( $url, $text, $format, $before, $after );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'single_month_title', 'smarty_single_month_title' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_get_archives( $params )
|
|
|
|
{
|
|
|
|
$type = '';
|
|
|
|
$limit = '';
|
|
|
|
$format = 'html';
|
|
|
|
$before = '';
|
|
|
|
$after = '';
|
|
|
|
extract( $params );
|
|
|
|
return get_archives( $type, $limit, $format, $before, $after );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'get_archives', 'smarty_get_archives' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_the_date_xml()
|
|
|
|
{
|
|
|
|
return the_date_xml();
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'the_date_xml', 'smarty_the_date_xml' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_the_date( $params )
|
|
|
|
{
|
|
|
|
$d = '';
|
|
|
|
$before = '';
|
|
|
|
$after = '';
|
|
|
|
$echo = true;
|
|
|
|
extract( $params );
|
|
|
|
return the_date( $d, $before, $after, $echo );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'the_date', 'smarty_the_date' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_the_time( $params )
|
|
|
|
{
|
|
|
|
$d = '';
|
|
|
|
$echo = true;
|
|
|
|
extract( $params );
|
|
|
|
return the_time( $d, $echo );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'the_time', 'smarty_the_time' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_the_weekday()
|
|
|
|
{
|
|
|
|
return the_weekday();
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'the_weekday', 'smarty_the_weekday' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_the_weekday_date( $params )
|
|
|
|
{
|
|
|
|
$before='';
|
|
|
|
$after='';
|
|
|
|
extract( $params );
|
|
|
|
return the_weekday_date( $before, $after );
|
|
|
|
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'the_weekday_date', 'smarty_the_weekday_date' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_get_Lat() {
|
|
|
|
return get_Lat();
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'get_Lat', 'smarty_get_Lat' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_get_Lon() {
|
|
|
|
return get_Lon();
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'get_Lon', 'smarty_get_Lon' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_the_ID()
|
|
|
|
{
|
|
|
|
return the_ID();
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'the_ID', 'smarty_the_ID' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_permalink_link( $params )
|
|
|
|
{
|
|
|
|
$file='';
|
|
|
|
$mode = 'id';
|
|
|
|
extract( $params );
|
|
|
|
return permalink_link( $file, $mode );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'permalink_link', 'smarty_permalink_link' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_the_title( $params )
|
|
|
|
{
|
|
|
|
$before='';
|
|
|
|
$after='';
|
|
|
|
$echo=true;
|
|
|
|
extract( $params );
|
|
|
|
return the_title( $before, $after, $echo);
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'the_title', 'smarty_the_title' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_the_category_ID( $params )
|
|
|
|
{
|
|
|
|
$echo=true;
|
|
|
|
extract( $params );
|
|
|
|
return the_category_ID( $echo );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'the_category_ID', 'smarty_the_category_ID' );
|
|
|
|
$wpsmarty->register_function( 'the_category', 'the_category' );
|
|
|
|
$wpsmarty->register_function( 'the_author', 'the_author' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_the_content( $params )
|
|
|
|
{
|
|
|
|
$more_link_text='(more...)';
|
|
|
|
$stripteaser=0;
|
|
|
|
$more_file='';
|
|
|
|
extract( $params );
|
|
|
|
return the_content( $more_link_text, $stripteaser, $more_file );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'the_content', 'smarty_the_content' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_link_pages( $params )
|
|
|
|
{
|
|
|
|
$before='<br />';
|
|
|
|
$after='<br />';
|
|
|
|
$next_or_number='number';
|
|
|
|
$nextpagelink='next page';
|
|
|
|
$previouspagelink='previous page';
|
|
|
|
$pagelink='%';
|
|
|
|
$more_file='';
|
|
|
|
extract( $params );
|
|
|
|
return link_pages( $before, $after, $next_or_number, $nextpagelink, $previouspagelink, $pagelink, $more_file);
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'link_pages', 'smarty_link_pages' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_comments_popup_link( $params )
|
|
|
|
{
|
|
|
|
$zero='No Comments';
|
|
|
|
$one='1 Comment';
|
|
|
|
$more='% Comments';
|
|
|
|
$CSSclass='';
|
|
|
|
$none='Comments Off';
|
|
|
|
extract( $params );
|
|
|
|
return comments_popup_link( $zero, $one, $more, $CSSclass, $none );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'comments_popup_link', 'smarty_comments_popup_link' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_trackback_rdf( $params )
|
|
|
|
{
|
|
|
|
$timezone = 0;
|
|
|
|
extract( $params );
|
|
|
|
return trackback_rdf( $timezone );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'trackback_rdf', 'smarty_trackback_rdf' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_comments_popup_script( $params )
|
|
|
|
{
|
|
|
|
$width=400;
|
|
|
|
$height=400;
|
2003-12-10 19:22:36 -05:00
|
|
|
$file='wp-comments-popup.php';
|
2003-11-07 16:16:12 -05:00
|
|
|
extract( $params );
|
|
|
|
return comments_popup_script( $width, $height, $file );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'comments_popup_script', 'smarty_comments_popup_script' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_get_links( $params )
|
|
|
|
{
|
|
|
|
extract($params);
|
|
|
|
get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated, true );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'get_links', 'smarty_get_links' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_list_cats( $params )
|
|
|
|
{
|
|
|
|
extract($params);
|
|
|
|
list_cats($optionall, $all, $sort_column, $sort_order, $file, $list, $optiondates, $optioncount, $hide_empty);
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'list_cats', 'smarty_list_cats' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_timer_stop( $params )
|
|
|
|
{
|
|
|
|
$display = 0;
|
|
|
|
$precision = 3;
|
|
|
|
extract($params);
|
|
|
|
timer_stop( $display, $precision );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'timer_stop', 'smarty_timer_stop' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
function smarty_get_calendar( $params )
|
|
|
|
{
|
|
|
|
$daylength = 1;
|
|
|
|
extract($params);
|
|
|
|
get_calendar( $daylength );
|
|
|
|
}
|
2003-11-10 18:47:28 -05:00
|
|
|
$wpsmarty->register_function( 'get_calendar', 'smarty_get_calendar' );
|
2003-11-07 16:16:12 -05:00
|
|
|
|
|
|
|
?>
|