get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='post' and post_status = 'publish'");
else
$numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
if (0 < $numposts) $numposts = number_format($numposts);
$numcmnts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
if (0 < $numcmnts) $numcmnts = number_format($numcmnts);
// ----------------
if ( function_exists('register_sidebar') )
register_sidebar(array(
'before_widget' => '
',
'after_widget' => '',
'before_title' => '',
'after_title' => '
',
));
if ( function_exists('unregister_sidebar_widget') )
{
unregister_sidebar_widget( __('Links') );
}
if ( function_exists('register_sidebar_widget') )
{
register_sidebar_widget(__('Links'), 'mistylook_ShowLinks');
}
if ( function_exists('register_sidebar_widget') )
{
register_sidebar_widget(__('About'), 'mistylook_ShowAbout');
}
function mistylook_ShowAbout() {?>
About
;?>/img/profile.jpg)
There are Posts and Comments so far.
Recent Posts
MistyLook Theme: Settings saved.
';
if ( $_REQUEST['reset'] ) echo 'MistyLook Theme: Settings reset.
';
?>
";
break;
case "submit":
echo "";
break;
case "option":
if( $selected == $value ) { $extra = "selected=\"true\""; }
echo "";
break;
case "radio":
if( $selected == $value ) { $extra = "checked=\"true\""; }
echo "
";
break;
case "checkbox":
if( $selected == $value ) { $extra = "checked=\"true\""; }
echo "
";
break;
case "textarea":
echo "";
break;
}
}
function ml_heading( $title ) {
// ------------------
// add a table header
// ------------------
echo "" .$title . "
";
}
?>
') : $options['html_title_before'];
$a = empty($options['html_title_after']) ? __('') : $options['html_title_after'];
$title = empty($options['title']) ? __('Blogroll') : $options['title'];
if (is_home()) {
echo $before_widget;
echo $before_title . $title . $after_title;
echo '';
pt_list_bookmarks('title_before='.$b.'&title_after='.$a);
echo '
';
echo $after_widget;
echo '';
}
}
/*********************************************************************************/
/* pt-bookmarks widget control
/*********************************************************************************/
function web_bookmarks_control()
{
$options = $newoptions = get_option('web_bookmarks');
if ( $_POST['bookmarks-submit'] )
{
$newoptions['title'] = strip_tags(stripslashes($_POST['bookmarks-title']));
$newoptions['html_title_before'] = stripslashes($_POST['bookmarks-before']);
$newoptions['html_title_after'] = stripslashes($_POST['bookmarks-after']);
}
if ( $options != $newoptions )
{
$options = $newoptions;
update_option('web_bookmarks', $options);
}
$title = wp_specialchars($options['title']);
$html_title_before = wp_specialchars($options['html_title_before']);
$html_title_after = $options['html_title_after'];
?>
'.pt_replacevideo($mediaid, $content).'';
echo $after_widget;
}
/*********************************************************************************/
/* wordTube widget control
/*********************************************************************************/
// Admin section
function web_wordtube_control()
{
global $wpdb;
$options = get_option('web_wordtube');
if ( !is_array($options) )
$options = array('title'=>'', 'mediaid'=>'0');
if ( $_POST['wordtube-submit'] )
{
$options['title'] = strip_tags(stripslashes($_POST['wordtube-title']));
$options['mediaid'] = $_POST['wordtube-mediaid'];
update_option('web_wordtube', $options);
}
$title = htmlspecialchars($options['title'], ENT_QUOTES);
// The Box content
echo '';
echo '';
echo '
';
echo '';
}
?>