' . "\n";
echo '
' . "\n";
}
}
if (!function_exists('aspen2wx_tabs_tab')) {
function aspen2wx_tabs_tab($tab_id, $tab_name) {
// Define a tab. Each tab has a unique id + name for the tab
echo '- ' . $tab_name . '
' . "\n";
}
}
if (!function_exists('aspen2wx_tabs_content')) {
function aspen2wx_tabs_content($tab_id, $tab_function, $first = false) {
if ($first)
echo "
\n"; // end the
echo '
';
$tab_function();
echo "\n
\n";
}
}
/*
================= general helpers =====================
*/
function aspen2wx_help_link( $ref, $label) {
$t_dir = aspen2wx_plugins_url('/help/' . $ref, '');
$icon = aspen2wx_plugins_url('/help/help.png','');
$pp_help = '
'
. '
';
echo $pp_help ;
}
// ========= file
function aspen2wx_f_exists($fn) {
// this one must use native PHP version since it is used at theme runtime as well as admin
if ($fn == 'php://output' || $fn == 'echo')
return true;
if (function_exists('aspentw_f_exists'))
return aspentw_f_exists( $fn );
return @file_exists($fn);
}
function aspen2wx_f_get_contents($fn) {
if ($fn == 'php://output' || $fn == 'echo')
return '';
if (function_exists('aspentw_f_get_contents'))
return aspentw_f_get_contents( $fn );
return implode('',file($fn)); // works if no newlines in the file...
}
function aspen2wx_download_link($desc, $dname, $ext, $nonce, $time) {
$downloader = plugins_url() . '/aspen-to-weaver-xtreme/includes/downloader.php';
$download_img_path = plugins_url() . '/aspen-to-weaver-xtreme/includes/images/download.png';
if (!$dname)
$dname = 'weaverx-converted';
$filename = $dname . '-' . $time;
$href = $downloader . "?_wpnonce={$nonce}&_ext={$ext}&_file={$filename}";
?>
Download'; echo ' - ';
echo $desc; echo ' ';
_e('Save as:', 'weaver-xtreme' /*adm*/); echo ' ' . $filename . '.' . $ext . "
\n";
}
?>