Code Duplication    Length = 6-6 lines in 2 locations

modules/widgets/facebook-likebox.php 1 location

@@ 239-244 (lines=6) @@
236
		$args = wp_parse_args( (array) $args, $this->get_default_args() );
237
238
		// Validate the Facebook Page URL
239
		if ( $this->is_valid_facebook_url( $args['href'] ) ) {
240
			$temp         = explode( '?', $args['href'] );
241
			$args['href'] = str_replace( array( 'http://facebook.com', 'https://facebook.com' ), array( 'http://www.facebook.com', 'https://www.facebook.com' ), $temp[0] );
242
		} else {
243
			$args['href'] = '';
244
		}
245
246
		$args['width']      = $this->normalize_int_value( (int) $args['width'], $this->default_width, $this->max_width, $this->min_width );
247
		$args['height']     = $this->normalize_int_value( (int) $args['height'], $this->default_height, $this->max_height, $this->min_height );

modules/widgets/googleplus-badge.php 1 location

@@ 151-156 (lines=6) @@
148
		// Validate the Google+ URL
149
		$instance['href'] = trim( strip_tags( stripslashes( $new_instance['href'] ) ) );
150
151
		if ( $this->is_valid_googleplus_url( $instance['href'] ) ) {
152
			$temp             = explode( '?', $instance['href'] );
153
			$instance['href'] = str_replace( array( 'http://plus.google.com', 'https://plus.google.com' ), 'https://plus.google.com', $temp[0] );
154
		} else {
155
			$instance['href'] = '';
156
		}
157
158
		$instance['theme']  = $this->filter_text( $new_instance['theme'], $this->default_theme, $this->allowed_themes );
159
		$instance['layout'] = $this->filter_text( $new_instance['layout'], $this->default_layout, $this->allowed_layouts );