Skip to content

Commit

Permalink
Improved code by replacing unnecessary double quotes with single quotes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThierryA committed Jul 31, 2016
1 parent 45f83e3 commit 96dc1d7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions lib/api/compiler/class-compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,25 +532,25 @@ public function css_path_to_url( $matches, $base_is_path = false ) {
public function strip_whitespace( $content ) {

$replace = array(
"#/\*.*?\*/#s" => '', // Strip comments.
"#\s\s+#" => ' ', // Strip excess whitespace.
'#/\*.*?\*/#s' => '', // Strip comments.
'#\s\s+#' => ' ', // Strip excess whitespace.
);

$search = array_keys( $replace );
$content = preg_replace( $search, $replace, $content );

$replace = array(
": " => ":",
"; " => ";",
" {" => "{",
" }" => "}",
", " => ",",
"{ " => "{",
";}" => "}", // Strip optional semicolons.
",\n" => ",", // Don't wrap multiple selectors.
"\n}" => "}", // Don't wrap closing braces.
"} " => "}\n", // Put each rule on it's own line.
"\n" => "", // Take out all line breaks
': ' => ':',
'; ' => ';',
' {' => '{',
' }' => '}',
', ' => ',',
'{ ' => '{',
';}' => '}', // Strip optional semicolons.
',\n' => ',', // Don't wrap multiple selectors.
'\n}' => '}', // Don't wrap closing braces.
'} ' => "}\n", // Put each rule on it's own line.
'\n' => '', // Take out all line breaks
);

$search = array_keys( $replace );
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/fragments/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function beans_footer_content() {

beans_output_e( 'beans_footer_credit_text', sprintf(
__( '© %1$s - %2$s. All rights reserved.', 'tm-beans' ),
date( "Y" ),
date( 'Y' ),
get_bloginfo( 'name' )
) );

Expand Down

0 comments on commit 96dc1d7

Please sign in to comment.