Skip to content

Commit

Permalink
Fix - phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
salimshrestha98 committed Jul 11, 2023
1 parent 1d5a26f commit 421c544
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions includes/shortcodes/class-evf-shortcode-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -1195,19 +1195,22 @@ public static function add_custom_css_js( $form_id ) {
$custom_css = isset( $settings['evf-custom-css'] ) ? $settings['evf-custom-css'] : '';
if ( ! empty( $custom_css ) ) {
if ( $hook ) {
add_action( $hook, function() use ( $custom_css, $form_id ) {
?>
<style id="<?php echo esc_attr( 'evf-custom-css-' . $form_id ); ?>">
<?php echo esc_attr( $custom_css ); ?>
</style>
<?php
});
add_action(
$hook,
function () use ( $custom_css, $form_id ) {
?>
<style id="<?php echo esc_attr( 'evf-custom-css-' . $form_id ); ?>">
<?php echo esc_attr( $custom_css ); ?>
</style>
<?php
}
);
} else {
?>
<style id="<?php echo esc_attr( 'evf-custom-css-' . $form_id ); ?>">
<?php echo esc_attr( $custom_css ); ?>
</style>
<?php
?>
<style id="<?php echo esc_attr( 'evf-custom-css-' . $form_id ); ?>">
<?php echo esc_attr( $custom_css ); ?>
</style>
<?php
}
}
}
Expand Down

0 comments on commit 421c544

Please sign in to comment.