| 142 | | <label for="<?php echo $this->get_field_id('category'); ?>" class="screen-reader-text"><?php _e('Select Link Category'); ?></label> |
| 143 | | <select class="widefat" id="<?php echo $this->get_field_id('category'); ?>" name="<?php echo $this->get_field_name('category'); ?>"> |
| 144 | | <option value=""><?php _e('All Links'); ?></option> |
| 145 | | <?php |
| 146 | | foreach ( $link_cats as $link_cat ) { |
| 147 | | echo '<option value="' . intval($link_cat->term_id) . '"' |
| 148 | | . ( $link_cat->term_id == $instance['category'] ? ' selected="selected"' : '' ) |
| 149 | | . '>' . $link_cat->name . "</option>\n"; |
| 150 | | } |
| 151 | | ?> |
| 152 | | </select></p> |
| | 158 | <label for="<?php echo $this->get_field_id('category'); ?>" class="screen-reader-text"><?php _e('Select Link Category'); ?></label> |
| | 159 | <select class="widefat" id="<?php echo $this->get_field_id('category'); ?>" name="<?php echo $this->get_field_name('category'); ?>"> |
| | 160 | <option value=""><?php _e('All Links'); ?></option> |
| | 161 | <?php |
| | 162 | foreach ( $link_cats as $link_cat ) { |
| | 163 | echo '<option value="' . intval($link_cat->term_id) . '"' |
| | 164 | . ( $link_cat->term_id == $instance['category'] ? ' selected="selected"' : '' ) |
| | 165 | . '>' . $link_cat->name . "</option>\n"; |
| | 166 | } |
| | 167 | ?> |
| | 168 | </select> |
| | 169 | </p> |
| 154 | | <input class="checkbox" type="checkbox" <?php checked($instance['images'], true) ?> id="<?php echo $this->get_field_id('images'); ?>" name="<?php echo $this->get_field_name('images'); ?>" /> |
| 155 | | <label for="<?php echo $this->get_field_id('images'); ?>"><?php _e('Show Link Image'); ?></label><br /> |
| 156 | | <input class="checkbox" type="checkbox" <?php checked($instance['name'], true) ?> id="<?php echo $this->get_field_id('name'); ?>" name="<?php echo $this->get_field_name('name'); ?>" /> |
| 157 | | <label for="<?php echo $this->get_field_id('name'); ?>"><?php _e('Show Link Name'); ?></label><br /> |
| 158 | | <input class="checkbox" type="checkbox" <?php checked($instance['description'], true) ?> id="<?php echo $this->get_field_id('description'); ?>" name="<?php echo $this->get_field_name('description'); ?>" /> |
| 159 | | <label for="<?php echo $this->get_field_id('description'); ?>"><?php _e('Show Link Description'); ?></label><br /> |
| 160 | | <input class="checkbox" type="checkbox" <?php checked($instance['rating'], true) ?> id="<?php echo $this->get_field_id('rating'); ?>" name="<?php echo $this->get_field_name('rating'); ?>" /> |
| 161 | | <label for="<?php echo $this->get_field_id('rating'); ?>"><?php _e('Show Link Rating'); ?></label> |
| | 171 | <label for="<?php echo $this->get_field_id('orderby'); ?>"><?php _e( 'Sort by:' ); ?></label> |
| | 172 | <select name="<?php echo $this->get_field_name('orderby'); ?>" id="<?php echo $this->get_field_id('orderby'); ?>" class="widefat"> |
| | 173 | <option value="name"<?php selected( $instance['orderby'], 'name' ); ?>><?php _e('Link title'); ?></option> |
| | 174 | <option value="rating"<?php selected( $instance['orderby'], 'rating' ); ?>><?php _e('Link rating'); ?></option> |
| | 175 | <option value="id"<?php selected( $instance['orderby'], 'id' ); ?>><?php _e( 'Link ID' ); ?></option> |
| | 176 | <option value="rand"<?php selected( $instance['orderby'], 'rand' ); ?>><?php _e( 'Random' ); ?></option> |
| | 177 | </select> |
| | 179 | <p> |
| | 180 | <input class="checkbox" type="checkbox" <?php checked($instance['images'], true) ?> id="<?php echo $this->get_field_id('images'); ?>" name="<?php echo $this->get_field_name('images'); ?>" /> |
| | 181 | <label for="<?php echo $this->get_field_id('images'); ?>"><?php _e('Show Link Image'); ?></label><br /> |
| | 182 | <input class="checkbox" type="checkbox" <?php checked($instance['name'], true) ?> id="<?php echo $this->get_field_id('name'); ?>" name="<?php echo $this->get_field_name('name'); ?>" /> |
| | 183 | <label for="<?php echo $this->get_field_id('name'); ?>"><?php _e('Show Link Name'); ?></label><br /> |
| | 184 | <input class="checkbox" type="checkbox" <?php checked($instance['description'], true) ?> id="<?php echo $this->get_field_id('description'); ?>" name="<?php echo $this->get_field_name('description'); ?>" /> |
| | 185 | <label for="<?php echo $this->get_field_id('description'); ?>"><?php _e('Show Link Description'); ?></label><br /> |
| | 186 | <input class="checkbox" type="checkbox" <?php checked($instance['rating'], true) ?> id="<?php echo $this->get_field_id('rating'); ?>" name="<?php echo $this->get_field_name('rating'); ?>" /> |
| | 187 | <label for="<?php echo $this->get_field_id('rating'); ?>"><?php _e('Show Link Rating'); ?></label> |
| | 188 | </p> |
| | 189 | <p> |
| | 190 | <label for="<?php echo $this->get_field_id('limit'); ?>"><?php _e('Show how many (empty for all):'); ?></label> |
| | 191 | <input id="<?php echo $this->get_field_id('limit'); ?>" name="<?php echo $this->get_field_name('limit'); ?>" type="text" value="<?php if ( $limit == -1 ) echo ''; else echo $limit; ?>" size="3" /><br /> |
| | 192 | </p> |
| | 193 | |