'Top Android Apps',
'show_description'=>'1',
'show_credit'=>'1',
'show_ratings'=>'1',
'show_noratings'=>'1',
'show_star'=>'1',
'show_downloads'=>'1'
);
}
echo $before_widget;
echo $before_title.$options['title'].$after_title;
monthly_rawapps_widget_template();
echo $after_widget;
}
// Widget template
function monthly_rawapps_widget_template() {include_once(WP_PLUGIN_DIR."/android-market-top-monthly-apps/rawapps_widget_template.php");}
// Widget Control Panel
function monthly_widget_options()
{
$options=get_option("monthly_rawapps_widget");
if (!is_array($options)) {
$options=array(
'title'=>'Top Android Apps',
'show_description'=>'1',
'show_credit'=>'1',
'show_ratings'=>'1',
'show_noratings'=>'1',
'show_star'=>'1',
'show_downloads'=>'1'
);
}
if ($_POST['monthly-rawapps-widget-submit']) {
$options['title']=$_POST['widget_title'];
if (isset($_POST['widget_show_description'])){
$options['show_description']=true;
}
else
{
$options['show_description']=false;
}
if (isset($_POST['widget_show_ratings'])){
$options['show_ratings']=true;
}
else
{
$options['show_ratings']=false;
}
if (isset($_POST['widget_show_noratings'])){
$options['show_noratings']=true;
}
else
{
$options['show_noratings']=false;
}
if (isset($_POST['widget_show_downloads'])){
$options['show_downloads']=true;
}
else
{
$options['show_downloads']=false;
}
if (isset($_POST['widget_show_credit'])){
$options['show_credit']=true;
}
else
{
$options['show_credit']=false;
}
if (isset($_POST['widget_show_star'])){
$options['show_star']=true;
}
else
{
$options['show_star']=false;
}
update_option("monthly_rawapps_widget",$options);
}
//Form
echo "";
echo "
";
$is_checked = "";
if ($options['show_description']){
$is_checked = "checked";
}
echo " Description ";
$showdownloads = "";
if ($options['show_downloads']){
$showdownloads = "checked";
}
echo " No. Downloads
";
$showratings = "";
if ($options['show_ratings']){
$showratings = "checked";
}
echo " ";
$shownoratings = "";
if ($options['show_noratings']){
$shownoratings = "checked";
}
echo " No. Ratings
";
$showstar = "";
if ($options['show_star']){
$showstar = "checked";
}
echo " ";
$showcredit = "";
if ($options['show_credit']){
$showcredit = "checked";
}
echo " ";
echo "";
}
?>