__( 'Display the related posts from current post\'s categories. Will appear on single posts only.','arbitragex' ) ) ); } public function form( $instance ) { $defaults = array( 'title_lenght' => 7, 'comment_num' => 1, 'date' => 1, 'show_thumb6' => 1, 'box_layout' => 'horizontal-small', 'show_excerpt' => 0, 'excerpt_length' => 10 ); $instance = wp_parse_args((array) $instance, $defaults); $title = isset( $instance[ 'title' ] ) ? $instance[ 'title' ] : __( 'Related Posts','arbitragex' ); $title_length = isset( $instance[ 'title_length' ] ) ? intval( $instance[ 'title_length' ] ) : 7; $qty = isset( $instance[ 'qty' ] ) ? esc_attr( $instance[ 'qty' ] ) : 5; $comment_num = isset( $instance[ 'comment_num' ] ) ? esc_attr( $instance[ 'comment_num' ] ) : 1; $date = isset( $instance[ 'date' ] ) ? esc_attr( $instance[ 'date' ] ) : 1; $show_thumb6 = isset( $instance[ 'show_thumb6' ] ) ? esc_attr( $instance[ 'show_thumb6' ] ) : 1; $box_layout = $instance['box_layout']; $show_excerpt = isset( $instance[ 'show_excerpt' ] ) ? esc_attr( $instance[ 'show_excerpt' ] ) : 1; $excerpt_length = isset( $instance[ 'excerpt_length' ] ) ? intval( $instance[ 'excerpt_length' ] ) : 10; ?>