Skip to content

Commit

Permalink
#2711 code improved
Browse files Browse the repository at this point in the history
  • Loading branch information
pegazee committed Apr 2, 2019
1 parent 100a42d commit 743c5d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pagebuilder/inc/viewShowFrontData.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,13 @@ function amp_pagebuilder_content_styles(){
echo amppb_validateCss($completeCssOfPB);
}
function amppb_validateCss($css){
$css = str_replace('"', '"', $css);
$css = str_replace(array('.amppb-fluid','.amppb-fixed'), array('.ap-fl','.ap-fi'), $css);
$css = preg_replace('/(([a-z -]*:(\s)*;))/', "", $css);
$css = preg_replace('/((;[\s\n;]*;))/', ";", $css);
$css = preg_replace('/(?:[^\r\n,{}]+)(?:,(?=[^}]*{,)|\s*{[\s]*})/', "", $css);

$css = preg_replace('/\s\n+/', "", $css);

return ampforwp_pb_autoCompileLess($css);
}

Expand Down
2 changes: 1 addition & 1 deletion templates/design-manager/swift/style.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
<?php if($redux_builder_amp['single-design-type'] == '1' || $redux_builder_amp['single-design-type'] == '4'){?>
<?php // Single

if(is_single() ) { ?>
if(is_single() && !checkAMPforPageBuilderStatus(get_the_ID())) { ?>

This comment has been minimized.

Copy link
@MohammedKaludi

MohammedKaludi Apr 10, 2019

Collaborator

Use amp for wp get the id function

This comment has been minimized.

Copy link
@pegazee

pegazee Apr 10, 2019

Author Contributor
.cntn-wrp{
<?php
$fontFamily = "font-family: 'Arial, Helvetica, sans-serif'";
Expand Down

0 comments on commit 743c5d8

Please sign in to comment.