コード例 #1
0
    /**
     * Displays the widget settings controls on the widget panel.
     * Make use of the get_field_id() and get_field_name() function
     * when creating your form elements. This handles the confusing stuff.
     */
    function form($instance)
    {
        /* Set up some default widget settings. */
        $defaults = array('title' => '', 'title_author' => '', 'title_users' => '', 'number' => '4', 'show_date' => '1', 'show_image' => '1', 'show_author' => '1', 'show_counters' => '1', 'category' => '0', 'description' => __('Top 10 posts from selected category', 'themerex'));
        $instance = wp_parse_args((array) $instance, $defaults);
        $title = isset($instance['title']) ? $instance['title'] : '';
        $title_author = isset($instance['title_author']) ? $instance['title_author'] : '';
        $title_users = isset($instance['title_users']) ? $instance['title_users'] : '';
        $number = isset($instance['number']) ? $instance['number'] : '';
        $show_date = isset($instance['show_date']) ? $instance['show_date'] : '1';
        $show_image = isset($instance['show_image']) ? $instance['show_image'] : '1';
        $show_author = isset($instance['show_author']) ? $instance['show_author'] : '1';
        $show_counters = isset($instance['show_counters']) ? $instance['show_counters'] : '1';
        $category = isset($instance['category']) ? $instance['category'] : '0';
        $categories = getCategoriesList(false);
        ?>

		<p>
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        _e('Widget title:', 'themerex');
        ?>
</label>
			<input id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" value="<?php 
        echo $title;
        ?>
" style="width:100%;" />
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('title_author');
        ?>
"><?php 
        _e('Author rating tab title:', 'themerex');
        ?>
</label>
			<input id="<?php 
        echo $this->get_field_id('title_author');
        ?>
" name="<?php 
        echo $this->get_field_name('title_author');
        ?>
" value="<?php 
        echo $title_author;
        ?>
" style="width:100%;" />
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('title_users');
        ?>
"><?php 
        _e('Users rating tab title:', 'themerex');
        ?>
</label>
			<input id="<?php 
        echo $this->get_field_id('title_users');
        ?>
" name="<?php 
        echo $this->get_field_name('title_users');
        ?>
" value="<?php 
        echo $title_users;
        ?>
" style="width:100%;" />
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('category');
        ?>
"><?php 
        _e('Category:', 'themerex');
        ?>
</label>
			<select id="<?php 
        echo $this->get_field_id('category');
        ?>
" name="<?php 
        echo $this->get_field_name('category');
        ?>
" style="width:100%;">
				<option value="0"><?php 
        _e('-- Any category --', 'themerex');
        ?>
</option> 
			<?php 
        foreach ($categories as $cat_id => $cat_name) {
            echo '<option value="' . $cat_id . '"' . ($category == $cat_id ? ' selected="selected"' : '') . '>' . $cat_name . '</option>';
        }
        ?>
			</select>
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('number');
        ?>
"><?php 
        _e('Number posts to show:', 'themerex');
        ?>
</label>
			<input type="text" id="<?php 
        echo $this->get_field_id('number');
        ?>
" name="<?php 
        echo $this->get_field_name('number');
        ?>
" value="<?php 
        echo $number;
        ?>
" style="width:100%;" />
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('show_image');
        ?>
_1"><?php 
        _e('Show post image:', 'themerex');
        ?>
</label><br />
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_image');
        ?>
_1" name="<?php 
        echo $this->get_field_name('show_image');
        ?>
" value="1" <?php 
        echo $show_image == 1 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_image');
        ?>
_1"><?php 
        _e('Show', 'themerex');
        ?>
</label>
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_image');
        ?>
_0" name="<?php 
        echo $this->get_field_name('show_image');
        ?>
" value="0" <?php 
        echo $show_image == 0 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_image');
        ?>
_0"><?php 
        _e('Hide', 'themerex');
        ?>
</label>
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('show_author');
        ?>
_1"><?php 
        _e('Show post author:', 'themerex');
        ?>
</label><br />
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_author');
        ?>
_1" name="<?php 
        echo $this->get_field_name('show_author');
        ?>
" value="1" <?php 
        echo $show_author == 1 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_author');
        ?>
_1"><?php 
        _e('Show', 'themerex');
        ?>
</label>
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_author');
        ?>
_0" name="<?php 
        echo $this->get_field_name('show_author');
        ?>
" value="0" <?php 
        echo $show_author == 0 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_author');
        ?>
_0"><?php 
        _e('Hide', 'themerex');
        ?>
</label>
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('show_date');
        ?>
_1"><?php 
        _e('Show post date:', 'themerex');
        ?>
</label><br />
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_date');
        ?>
_1" name="<?php 
        echo $this->get_field_name('show_date');
        ?>
" value="1" <?php 
        echo $show_date == 1 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_date');
        ?>
_1"><?php 
        _e('Show', 'themerex');
        ?>
</label>
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_date');
        ?>
_0" name="<?php 
        echo $this->get_field_name('show_date');
        ?>
" value="0" <?php 
        echo $show_date == 0 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_date');
        ?>
_0"><?php 
        _e('Hide', 'themerex');
        ?>
</label>
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('show_counters');
        ?>
_1"><?php 
        _e('Show post counters:', 'themerex');
        ?>
</label><br />
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_counters');
        ?>
_2" name="<?php 
        echo $this->get_field_name('show_counters');
        ?>
" value="2" <?php 
        echo $show_counters == 2 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_counters');
        ?>
_2"><?php 
        _e('As stars', 'themerex');
        ?>
</label>
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_counters');
        ?>
_1" name="<?php 
        echo $this->get_field_name('show_counters');
        ?>
" value="1" <?php 
        echo $show_counters == 1 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_counters');
        ?>
_1"><?php 
        _e('As icon', 'themerex');
        ?>
</label>
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_counters');
        ?>
_0" name="<?php 
        echo $this->get_field_name('show_counters');
        ?>
" value="0" <?php 
        echo $show_counters == 0 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_counters');
        ?>
_0"><?php 
        _e('Hide', 'themerex');
        ?>
</label>
		</p>

	<?php 
    }
コード例 #2
0
    /**
     * Displays the widget settings controls on the widget panel.
     * Make use of the get_field_id() and get_field_name() function
     * when creating your form elements. This handles the confusing stuff.
     */
    function form($instance)
    {
        /* Set up some default widget settings. */
        $instance = wp_parse_args((array) $instance, array('title' => '', 'root' => 0));
        $title = esc_attr($instance['title']);
        $root = (int) $instance['root'];
        $categories = getCategoriesList(false);
        $count = isset($instance['count']) ? (bool) $instance['count'] : false;
        $hierarchical = isset($instance['hierarchical']) ? (bool) $instance['hierarchical'] : false;
        $dropdown = isset($instance['dropdown']) ? (bool) $instance['dropdown'] : false;
        ?>
		<p>
		<label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        _e('Title:', 'themerex');
        ?>
</label>
		<input class="widefat" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" type="text" value="<?php 
        echo $title;
        ?>
" />
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('root');
        ?>
"><?php 
        _e('Root category:', 'themerex');
        ?>
</label>
			<select id="<?php 
        echo $this->get_field_id('root');
        ?>
" name="<?php 
        echo $this->get_field_name('root');
        ?>
" style="width:100%;">
				<option value="0"><?php 
        _e('-- Any category --', 'themerex');
        ?>
</option> 
			<?php 
        foreach ($categories as $cat_id => $cat_name) {
            echo '<option value="' . $cat_id . '"' . ($root == $cat_id ? ' selected="selected"' : '') . '>' . $cat_name . '</option>';
        }
        ?>
			</select>
		</p>

		<p>
		<input type="checkbox" class="checkbox" id="<?php 
        echo $this->get_field_id('dropdown');
        ?>
" name="<?php 
        echo $this->get_field_name('dropdown');
        ?>
"<?php 
        checked($dropdown);
        ?>
 />
		<label for="<?php 
        echo $this->get_field_id('dropdown');
        ?>
"><?php 
        _e('Display as dropdown', 'themerex');
        ?>
</label><br />

		<input type="checkbox" class="checkbox" id="<?php 
        echo $this->get_field_id('count');
        ?>
" name="<?php 
        echo $this->get_field_name('count');
        ?>
"<?php 
        checked($count);
        ?>
 />
		<label for="<?php 
        echo $this->get_field_id('count');
        ?>
"><?php 
        _e('Show post counts', 'themerex');
        ?>
</label><br />

		<input type="checkbox" class="checkbox" id="<?php 
        echo $this->get_field_id('hierarchical');
        ?>
" name="<?php 
        echo $this->get_field_name('hierarchical');
        ?>
"<?php 
        checked($hierarchical);
        ?>
 />
		<label for="<?php 
        echo $this->get_field_id('hierarchical');
        ?>
"><?php 
        _e('Show hierarchy', 'themerex');
        ?>
</label>
		</p>
<?php 
    }
コード例 #3
0
$gmap_styles = getGooglemapStyles();
// Switcher choises
$THEMEREX_shortcodes_yes_no = getYesNoList();
$THEMEREX_shortcodes_on_off = getOnOffList();
$THEMEREX_shortcodes_dir = getDirectionList();
$THEMEREX_shortcodes_align = getAlignmentList();
$THEMEREX_shortcodes_text_align = getAlignList();
$THEMEREX_shortcodes_float = getFloatList();
$THEMEREX_shortcodes_show_hide = getShowHideList();
$THEMEREX_shortcodes_box_style = getBoxStyles();
$THEMEREX_shortcodes_sorting = getSortingList();
$THEMEREX_shortcodes_ordering = getOrderingList();
$THEMEREX_shortcodes_sliders = getSlidersList();
$THEMEREX_shortcodes_users = getUsersList();
$THEMEREX_shortcodes_categories = getCategoriesList();
$THEMEREX_shortcodes_columns = getColumnsList();
$THEMEREX_shortcodes_images = themerex_array_merge(array('none' => "none"), getListFiles("/images/icons", "png"));
$THEMEREX_shortcodes_icons = array_merge(array("none"), getIconsList());
$THEMEREX_shortcodes_locations = getDedicatedLocationsList();
global $THEMEREX_shortcodes_yes_no;
// Current elemnt id
$THEMEREX_shortcodes_id = array("id" => "id", "title" => __("Element ID", "themerex"), "desc" => __("ID for current element", "themerex"), "divider" => false, "value" => "", "type" => "text");
// Width and height params
function THEMEREX_shortcodes_width($w = '')
{
    return array("id" => "width", "title" => __("Width", "themerex"), "divider" => false, "value" => $w, "type" => "text");
}
function THEMEREX_shortcodes_height($h = '', $des = 'Width (in pixels or percent) and height (only in pixels) of element')
{
    return array("id" => "height", "title" => __("Height", "themerex"), "desc" => __($des, "themerex"), "value" => $h, "type" => "text");
コード例 #4
0
<?php

global $THEMEREX_shortname;
$THEMEREX_shortname = 'wps';
// Prepare arrays
$fonts = getThemeFontsList(false);
$themes = getThemesList(false);
$socials = getSocialsList(false);
$puzzles = getPuzzlesList(false);
$categories = getCategoriesList(false);
$sidebars = getSidebarsList(false);
$positions = getSidebarsPositions(false);
$blog_styles = getBlogStylesList(false);
$body_styles = getBodyStylesList(false);
$sliders = getSlidersList(false);
$yes_no = getYesNoList(false);
$dir = getDirectionList(false);
$show_hide = getShowHideList(false);
$sorting = getSortingList(false);
$ordering = getOrderingList(false);
// Theme options arrays
$THEMEREX_theme_options = array();
/*
###############################
#### General               #### 
###############################
*/
$THEMEREX_theme_options[] = array("name" => __('General', 'themerex'), "override" => "category,post,page", "type" => "heading");
$THEMEREX_theme_options[] = array("name" => __('Contact form email', 'themerex'), "desc" => __('E-mail for send contact form and user registration data', 'themerex'), "id" => $THEMEREX_shortname . "_" . "contact_email", "std" => "", "type" => "text");
$THEMEREX_theme_options[] = array("name" => __('Favicon', 'themerex'), "desc" => __('Upload a 16px x 16px image that will represent your website\'s favicon.<br /><br /><em>To ensure cross-browser compatibility, we recommend converting the favicon into .ico format before uploading. (<a href="http://www.favicon.cc/">www.favicon.cc</a>)</em>', 'themerex'), "id" => $THEMEREX_shortname . "_" . "favicon", "std" => "", "type" => "upload");
$THEMEREX_theme_options[] = array("name" => __('Logo image', 'themerex'), "desc" => __('Upload logo image', 'themerex'), "id" => $THEMEREX_shortname . "_" . "logo_image", "std" => "", "type" => "mediamanager");
コード例 #5
0
ファイル: DT_ViewXML.php プロジェクト: seedbank/old-repo
function doSpecialViewXML()
{
    global $wgOut, $wgRequest, $wgUser, $wgContLang;
    $skin = $wgUser->getSkin();
    $namespace_labels = $wgContLang->getNamespaces();
    $category_label = $namespace_labels[NS_CATEGORY];
    $template_label = $namespace_labels[NS_TEMPLATE];
    $name_str = str_replace(' ', '_', wfMsgForContent('dt_xml_name'));
    $namespace_str = str_replace(' ', '_', wfMsg('dt_xml_namespace'));
    $pages_str = str_replace(' ', '_', wfMsgForContent('dt_xml_pages'));
    $form_submitted = false;
    $page_titles = array();
    $cats = $wgRequest->getArray('categories');
    $nses = $wgRequest->getArray('namespaces');
    if (count($cats) > 0 || count($nses) > 0) {
        $form_submitted = true;
    }
    if ($form_submitted) {
        $wgOut->disable();
        // Cancel output buffering and gzipping if set
        // This should provide safer streaming for pages with history
        wfResetOutputBuffers();
        header("Content-type: application/xml; charset=utf-8");
        $groupings = getGroupings();
        $simplified_format = $wgRequest->getVal('simplified_format');
        $text = "<{$pages_str}>";
        if ($cats) {
            foreach ($cats as $cat => $val) {
                if ($simplified_format) {
                    $text .= '<' . str_replace(' ', '_', $cat) . ">\n";
                } else {
                    $text .= "<{$category_label} {$name_str}=\"{$cat}\">\n";
                }
                $titles = getPagesForCategory($cat, 10);
                foreach ($titles as $title) {
                    $text .= getXMLForPage($title, $simplified_format, $groupings);
                }
                if ($simplified_format) {
                    $text .= '</' . str_replace(' ', '_', $cat) . ">\n";
                } else {
                    $text .= "</{$category_label}>\n";
                }
            }
        }
        if ($nses) {
            foreach ($nses as $ns => $val) {
                if ($ns == 0) {
                    $ns_name = "Main";
                } else {
                    $ns_name = MWNamespace::getCanonicalName($ns);
                }
                if ($simplified_format) {
                    $text .= '<' . str_replace(' ', '_', $ns_name) . ">\n";
                } else {
                    $text .= "<{$namespace_str} {$name_str}=\"{$ns_name}\">\n";
                }
                $titles = getPagesForNamespace($ns);
                foreach ($titles as $title) {
                    $text .= getXMLForPage($title, $simplified_format, $groupings);
                }
                if ($simplified_format) {
                    $text .= '</' . str_replace(' ', '_', $ns_name) . ">\n";
                } else {
                    $text .= "</{$namespace_str}>\n";
                }
            }
        }
        $text .= "</{$pages_str}>";
        print $text;
    } else {
        // set 'title' as hidden field, in case there's no URL niceness
        global $wgContLang;
        $mw_namespace_labels = $wgContLang->getNamespaces();
        $special_namespace = $mw_namespace_labels[NS_SPECIAL];
        $text = <<<END
\t<form action="" method="get">
\t<input type="hidden" name="title" value="{$special_namespace}:ViewXML">

END;
        $text .= "<p>" . wfMsg('dt_viewxml_docu') . "</p>\n";
        $text .= "<h2>" . wfMsg('dt_viewxml_categories') . "</h2>\n";
        $categories = getCategoriesList();
        foreach ($categories as $category) {
            $title = Title::makeTitle(NS_CATEGORY, $category);
            $link = $skin->makeLinkObj($title, htmlspecialchars($title->getText()));
            $text .= "<input type=\"checkbox\" name=\"categories[{$category}]\" /> {$link} <br />\n";
        }
        $text .= "<h2>" . wfMsg('dt_viewxml_namespaces') . "</h2>\n";
        $namespaces = getNamespacesList();
        foreach ($namespaces as $namespace) {
            if ($namespace == 0) {
                $ns_name = wfMsgHtml('blanknamespace');
            } else {
                $ns_name = htmlspecialchars($wgContLang->getFormattedNsText($namespace));
            }
            $ns_name = str_replace('_', ' ', $ns_name);
            $text .= "<input type=\"checkbox\" name=\"namespaces[{$namespace}]\" /> {$ns_name} <br />\n";
        }
        $text .= "<br /><p><input type=\"checkbox\" name=\"simplified_format\" /> " . wfMsg('dt_viewxml_simplifiedformat') . "</p>\n";
        $text .= "<input type=\"submit\" value=\"" . wfMsg('viewxml') . "\">\n";
        $text .= "</form>\n";
        $wgOut->addHTML($text);
    }
}
コード例 #6
0
<?php

// Prepare arrays
if (is_themerex_options_used()) {
    $fonts = getThemeFontsList();
    $themes = getThemesList();
    $socials = getSocialsList();
    $icons = getIconsList();
    $categories = getCategoriesList();
    $sidebars = getSidebarsList();
    $positions = getSidebarsPositions();
    $body_styles = getBodyStylesList();
    $blog_styles = getBlogStylesList();
    $hovers = getHoversList();
    $sliders = getSlidersList();
    $popups = getPopupEngines();
    $gmap_styles = getGooglemapStyles();
    $dir = getDirectionList();
    $yes_no = getYesNoList();
    $on_off = getOnOffList();
    $show_hide = getShowHideList();
    $sorting = getSortingList();
    $ordering = getOrderingList();
} else {
    $hovers = $fonts = $themes = $socials = $icons = $categories = $sidebars = $positions = $body_styles = $blog_styles = $sliders = $popups = $gmap_styles = $dir = $yes_no = $on_off = $show_hide = $sorting = $ordering = array();
}
// Theme options arrays
$THEMEREX_options = array();
//###############################
//#### General               ####
//###############################
コード例 #7
0
    /**
     * Displays the widget settings controls on the widget panel.
     * Make use of the get_field_id() and get_field_name() function
     * when creating your form elements. This handles the confusing stuff.
     */
    function form($instance)
    {
        /* Set up some default widget settings. */
        $defaults = array('title' => '', 'title_popular' => '', 'title_commented' => '', 'title_latest' => '', 'number' => '4', 'show_info' => '1', 'show_image' => '1', 'show_rating' => '1', 'category' => '0', 'description' => __('The most popular & commented posts', 'themerex'));
        $instance = wp_parse_args((array) $instance, $defaults);
        $title = isset($instance['title']) ? $instance['title'] : '';
        $title_length = isset($instance['title_length']) ? $instance['title_length'] : '';
        $title_popular = isset($instance['title_popular']) ? $instance['title_popular'] : '';
        $title_commented = isset($instance['title_commented']) ? $instance['title_commented'] : '';
        $title_latest = isset($instance['title_latest']) ? $instance['title_latest'] : '';
        $number = isset($instance['number']) ? $instance['number'] : '';
        $post_thumb = isset($instance['post_thumb']) ? $instance['post_thumb'] : 'hide';
        $show_info = isset($instance['show_info']) ? $instance['show_info'] : '1';
        $show_image = isset($instance['show_image']) ? $instance['show_image'] : '1';
        $show_rating = isset($instance['show_rating']) ? $instance['show_rating'] : '1';
        $show_cats = isset($instance['show_cats']) ? $instance['show_cats'] : '0';
        $category = isset($instance['category']) ? $instance['category'] : '0';
        $categories = getCategoriesList(false);
        ?>

		<p>
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        _e('Widget title:', 'themerex');
        ?>
</label>
			<input id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" value="<?php 
        echo $title;
        ?>
" style="width:100%;" />
		</p>		
		
		<p>
			<label for="<?php 
        echo $this->get_field_id('title_length');
        ?>
"><?php 
        _e('Title Maximum Length:', 'themerex');
        ?>
</label>
			<input id="<?php 
        echo $this->get_field_id('title_length');
        ?>
" name="<?php 
        echo $this->get_field_name('title_length');
        ?>
" value="<?php 
        echo $title_length;
        ?>
" style="width:100%;" />
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('title_popular');
        ?>
"><?php 
        _e('Most popular tab title:', 'themerex');
        ?>
</label>
			<input id="<?php 
        echo $this->get_field_id('title_popular');
        ?>
" name="<?php 
        echo $this->get_field_name('title_popular');
        ?>
" value="<?php 
        echo $title_popular;
        ?>
" style="width:100%;" />
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('title_commented');
        ?>
"><?php 
        _e('Most commented tab title:', 'themerex');
        ?>
</label>
			<input id="<?php 
        echo $this->get_field_id('title_commented');
        ?>
" name="<?php 
        echo $this->get_field_name('title_commented');
        ?>
" value="<?php 
        echo $title_commented;
        ?>
" style="width:100%;" />
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('title_latest');
        ?>
"><?php 
        _e('Latest tab title:', 'themerex');
        ?>
</label>
			<input id="<?php 
        echo $this->get_field_id('title_latest');
        ?>
" name="<?php 
        echo $this->get_field_name('title_latest');
        ?>
" value="<?php 
        echo $title_latest;
        ?>
" style="width:100%;" />
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('category');
        ?>
"><?php 
        _e('Category:', 'themerex');
        ?>
</label>
			<select id="<?php 
        echo $this->get_field_id('category');
        ?>
" name="<?php 
        echo $this->get_field_name('category');
        ?>
" style="width:100%;">
				<option value="0"><?php 
        _e('-- Any category --', 'themerex');
        ?>
</option> 
			<?php 
        foreach ($categories as $cat_id => $cat_name) {
            echo '<option value="' . $cat_id . '"' . ($category == $cat_id ? ' selected="selected"' : '') . '>' . $cat_name . '</option>';
        }
        ?>
			</select>
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('post_thumb');
        ?>
"><?php 
        _e('Show Post Thumbnail:', 'themerex');
        ?>
</label>
			<select id="<?php 
        echo $this->get_field_id('post_thumb');
        ?>
" name="<?php 
        echo $this->get_field_name('post_thumb');
        ?>
" style="width:100%;">
				<option <?php 
        echo $post_thumb == 'default_thumb' ? ' selected="selected"' : '';
        ?>
 value="default_thumb"><?php 
        echo __('Show Default Thumbnail (32x32px)', 'themerex');
        ?>
</option>
				<option <?php 
        echo $post_thumb == 'large_thumb' ? ' selected="selected"' : '';
        ?>
 value="large_thumb"><?php 
        echo __('Show Large Thumbnail (50x50px)', 'themerex');
        ?>
</option>
				<option <?php 
        echo $post_thumb == 'post_format' ? ' selected="selected"' : '';
        ?>
 value="post_format"><?php 
        echo __('Show post-format icon instead thumbnail', 'themerex');
        ?>
</option>
				<option <?php 
        echo $post_thumb == 'hide' ? ' selected="selected"' : '';
        ?>
 value="hide"><?php 
        echo __('Hide thumbnail', 'themerex');
        ?>
</option>
			</select>
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('number');
        ?>
"><?php 
        _e('Number posts to show:', 'themerex');
        ?>
</label>
			<input type="text" id="<?php 
        echo $this->get_field_id('number');
        ?>
" name="<?php 
        echo $this->get_field_name('number');
        ?>
" value="<?php 
        echo $number;
        ?>
" style="width:100%;" />
		</p>
		
		<p>
			<label for="<?php 
        echo $this->get_field_id('show_info');
        ?>
_1"><?php 
        _e('Show post info:', 'themerex');
        ?>
</label><br />
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_info');
        ?>
_1" name="<?php 
        echo $this->get_field_name('show_info');
        ?>
" value="1" <?php 
        echo $show_info == 1 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_info');
        ?>
_1"><?php 
        _e('Show', 'themerex');
        ?>
</label>
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_info');
        ?>
_0" name="<?php 
        echo $this->get_field_name('show_info');
        ?>
" value="0" <?php 
        echo $show_info == 0 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_info');
        ?>
_0"><?php 
        _e('Hide', 'themerex');
        ?>
</label>
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('show_rating');
        ?>
_1"><?php 
        _e('Show post review rating:', 'themerex');
        ?>
</label><br />
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_rating');
        ?>
_1" name="<?php 
        echo $this->get_field_name('show_rating');
        ?>
" value="1" <?php 
        echo $show_rating == 1 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_rating');
        ?>
_1"><?php 
        _e('Show', 'themerex');
        ?>
</label>
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_rating');
        ?>
_0" name="<?php 
        echo $this->get_field_name('show_rating');
        ?>
" value="0" <?php 
        echo $show_rating == 0 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_rating');
        ?>
_0"><?php 
        _e('Hide', 'themerex');
        ?>
</label>
		</p>

		<p>
			<label for="<?php 
        echo $this->get_field_id('show_cats');
        ?>
_1"><?php 
        _e('Show post categories:', 'themerex');
        ?>
</label><br />
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_cats');
        ?>
_1" name="<?php 
        echo $this->get_field_name('show_cats');
        ?>
" value="1" <?php 
        echo $show_cats == 1 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_cats');
        ?>
_1"><?php 
        _e('Show', 'themerex');
        ?>
</label>
			<input type="radio" id="<?php 
        echo $this->get_field_id('show_cats');
        ?>
_0" name="<?php 
        echo $this->get_field_name('show_cats');
        ?>
" value="0" <?php 
        echo $show_cats == 0 ? ' checked="checked"' : '';
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('show_cats');
        ?>
_0"><?php 
        _e('Hide', 'themerex');
        ?>
</label>
		</p>

	<?php 
    }