Code Duplication    Length = 34-34 lines in 2 locations

modules/custom-css/custom-css-4.7.php 1 location

@@ 553-586 (lines=34) @@
550
			}
551
552
			// if we're not using a preprocessor.
553
			if ( ! $args['preprocessor'] ) {
554
555
				/** This action is documented in modules/custom-css/custom-css.php */
556
				do_action( 'safecss_parse_pre', $csstidy, $css, $args );
557
558
				$csstidy->parse( $css );
559
560
				/** This action is documented in modules/custom-css/custom-css.php */
561
				do_action( 'safecss_parse_post', $csstidy, $warnings, $args );
562
563
				$css = $csstidy->print->plain();
564
			}
565
		}
566
		return $css;
567
	}
568
569
	/**
570
	 * Override $content_width in customizer previews.
571
	 */
572
	public static function preview_content_width() {
573
		global $wp_customize;
574
		if ( ! is_customize_preview() ) {
575
			return;
576
		}
577
578
		$setting = $wp_customize->get_setting( 'jetpack_custom_css[content_width]' );
579
		if ( ! $setting ) {
580
			return;
581
		}
582
583
		$customized_content_width = (int) $setting->post_value();
584
		if ( ! empty( $customized_content_width ) ) {
585
			$GLOBALS['content_width'] = $customized_content_width;
586
		}
587
	}
588
589
	/**

modules/custom-css/custom-css.php 1 location

@@ 238-271 (lines=34) @@
235
			$warnings[] = 'kses found stuff';
236
237
		// if we're not using a preprocessor
238
		if ( ! $args['preprocessor'] ) {
239
240
			/**
241
			 * Fires before parsing the css with CSSTidy, but only if
242
			 * the preprocessor is not configured for use.
243
			 *
244
			 * @module custom-css
245
			 *
246
			 * @since 1.7.0
247
			 *
248
			 * @param obj $csstidy The csstidy object.
249
			 * @param string $css Custom CSS.
250
			 * @param array $args Array of custom CSS arguments.
251
			 */
252
			do_action( 'safecss_parse_pre', $csstidy, $css, $args );
253
254
			$csstidy->parse( $css );
255
256
			/**
257
			 * Fires after parsing the css with CSSTidy, but only if
258
			 * the preprocessor is not cinfigured for use.
259
			 *
260
			 * @module custom-css
261
			 *
262
			 * @since 1.7.0
263
			 *
264
			 * @param obj $csstidy The csstidy object.
265
			 * @param array $warnings Array of warnings.
266
			 * @param array $args Array of custom CSS arguments.
267
			 */
268
			do_action( 'safecss_parse_post', $csstidy, $warnings, $args );
269
270
			$css = $csstidy->print->plain();
271
		}
272
273
		if ( $args['add_to_existing'] )
274
			$add_to_existing = 'yes';