Skip to content
Merged
2 changes: 2 additions & 0 deletions classes/controllers/FrmAddonsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1493,11 +1493,13 @@ public static function addon_upgrade_link( $addon, $upgrade_link ) {
if ( ! str_contains( $class, 'frm-button' ) ) {
$class .= ' frm-button-secondary frm-button-sm';
}
// phpcs:disable Generic.WhiteSpace.ScopeIndent
?>
<a class="install-now button <?php echo esc_attr( $class ); ?>" href="<?php echo esc_url( $upgrade_link ); ?>" target="_blank" rel="noopener" aria-label="<?php esc_attr_e( 'Upgrade Now', 'formidable' ); ?>"><?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?>
<?php echo esc_html( $text ); ?>
</a>
<?php
// phpcs:enable Generic.WhiteSpace.ScopeIndent
}

/**
Expand Down
12 changes: 4 additions & 8 deletions classes/controllers/FrmAppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,12 @@ public static function remove_upsells() {
*/
public static function install_js_fallback() {
FrmAppHelper::load_admin_wide_js();
// phpcs:disable Generic.WhiteSpace.ScopeIndent
?>
<div id="frm_install_message"></div>
<script>jQuery(document).ready( frm_install_now );</script>
<?php
// phpcs:enable Generic.WhiteSpace.ScopeIndent
}

/**
Expand Down Expand Up @@ -910,10 +912,7 @@ private static function should_show_floating_links() {
return false;
}

$should_show = FrmAppHelper::is_formidable_admin() &&
! FrmAppHelper::is_style_editor_page() &&
! FrmAppHelper::is_admin_page( 'formidable-views-editor' ) &&
! FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' );
$should_show = FrmAppHelper::is_formidable_admin() && ! FrmAppHelper::is_style_editor_page() && ! FrmAppHelper::is_admin_page( 'formidable-views-editor' ) && ! FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong

/**
* Filters whether the floating links should be displayed.
Expand Down Expand Up @@ -1637,10 +1636,7 @@ private static function is_our_callback_string( $callback_name ) {
* @return bool
*/
private static function is_our_callback_array( $callback ) {
return ! empty( $callback['function'] ) &&
is_array( $callback['function'] ) &&
! empty( $callback['function'][0] ) &&
self::is_our_callback_string( is_object( $callback['function'][0] ) ? get_class( $callback['function'][0] ) : $callback['function'][0] );
return ! empty( $callback['function'] ) && is_array( $callback['function'] ) && ! empty( $callback['function'][0] ) && self::is_our_callback_string( is_object( $callback['function'][0] ) ? get_class( $callback['function'][0] ) : $callback['function'][0] ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
}

/**
Expand Down
2 changes: 2 additions & 0 deletions classes/controllers/FrmFieldsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -951,12 +951,14 @@ public static function pull_custom_error_body_from_custom_html( $form, $field, $
* @return void
*/
private static function maybe_add_html_required( $field, array &$add_html ) {
// phpcs:disable Generic.WhiteSpace.ScopeIndent
$excluded_field_types =
FrmField::is_radio( $field ) ||
FrmField::is_checkbox( $field ) ||
FrmField::is_field_type( $field, 'file' ) ||
FrmField::is_field_type( $field, 'nps' ) ||
FrmField::is_field_type( $field, 'scale' );
// phpcs:enable Generic.WhiteSpace.ScopeIndent

if ( $excluded_field_types ) {
return;
Expand Down
9 changes: 7 additions & 2 deletions classes/controllers/FrmFormsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1102,11 +1102,13 @@ public static function insert_form_popup() {
if ( FrmAppHelper::is_form_builder_page() && ! class_exists( '_WP_Editors', false ) ) {
// Initialize a wysiwyg so we have usable settings defined in tinyMCEPreInit.mceInit
require ABSPATH . WPINC . '/class-wp-editor.php';
// phpcs:disable Generic.WhiteSpace.ScopeIndent
?>
<div class="frm_hidden">
<?php wp_editor( '', 'frm_description_placeholder', array() ); ?>
</div>
<?php
// phpcs:enable Generic.WhiteSpace.ScopeIndent
}
}

Expand Down Expand Up @@ -3194,11 +3196,14 @@ private static function redirect_after_submit_using_js( $args ) {
* @param array $args
*/
private static function get_redirect_message( $success_url, $success_msg, $args ) {
$success_msg = apply_filters( 'frm_content', $success_msg, $args['form'], $args['entry_id'] );
$success_msg = do_shortcode( FrmAppHelper::use_wpautop( $success_msg ) );
$success_msg = apply_filters( 'frm_content', $success_msg, $args['form'], $args['entry_id'] );
$success_msg = do_shortcode( FrmAppHelper::use_wpautop( $success_msg ) );

// phpcs:disable Generic.WhiteSpace.ScopeIndent
$redirect_msg = '<div class="' . esc_attr( FrmFormsHelper::get_form_style_class( $args['form'] ) ) . '"><div class="frm-redirect-msg" role="status">' . $success_msg . '<br/>' . // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
self::get_redirect_fallback_message( $success_url, $args ) .
'</div></div>';
// phpcs:enable Generic.WhiteSpace.ScopeIndent

$redirect_args = array(
'entry_id' => $args['entry_id'],
Expand Down
6 changes: 6 additions & 0 deletions classes/controllers/FrmSMTPController.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ protected function output_section_heading() {
);

// Heading section.
// phpcs:disable Generic.WhiteSpace.ScopeIndent
?>
<section class="top">
<div class="frm-smtp-logos">
Expand All @@ -168,6 +169,7 @@ protected function output_section_heading() {
<p><?php esc_html_e( 'WP Mail SMTP allows you to easily set up WordPress to use a trusted provider to reliably send emails, including form notifications.', 'formidable' ); ?></p><?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?>
</section>
<?php
// phpcs:enable Generic.WhiteSpace.ScopeIndent
}

/**
Expand Down Expand Up @@ -441,15 +443,18 @@ public function redirect_to_smtp_settings() {
* @return void
*/
private function stmp_logo() {
// phpcs:disable Generic.WhiteSpace.ScopeIndent
?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" height="90" width="90"><defs><style>.cls-11,.cls-12{fill-rule:evenodd}.cls-4{fill:none}.cls-11{fill:#86a196}.cls-12{fill:#fff}</style></defs><path class="cls-4" d="M-6.3 0h60v60h-60z"/><path d="M16.7 8.1a15.4 15.4 0 00-8 10.2 23.5 23.5 0 1030 0 15.4 15.4 0 00-9.3-10.8 3.4 3.4 0 00-2.1-2.7A4.6 4.6 0 0018.4 3a24.4 24.4 0 00-1.7 5z" fill="#395360" fill-rule="evenodd"/><path fill="#fbaa6f" d="M18 26h12v14H18z"/><path d="M25.9 33.2l-.1-.1a1.4 1.4 0 111.6-2.3 1.9 1.9 0 00-1.2.8 1.9 1.9 0 00-.3 1.6zm-4.5 0a1.8 1.8 0 00-.4-1.6 2 2 0 00-1.2-.8 1.4 1.4 0 011.6 2.3zm7.2-3.2h.5l-1 4.8-2.2 6.5h-4.3l-3.2-5.4 1.1-3.2 2.1 2.7c.6.5 2.7.5 3.8-.6a26.2 26.2 0 003.2-4.8z" fill="#dc7f3c" fill-rule="evenodd"/><path d="M9.7 29H15v-9h-4a13 13 0 017.4-10q1.2-5 2.8-6.8l.1-.1.1-.1a2.3 2.3 0 011.1-.5 2.3 2.3 0 012.2 3.8 1.6 1.6 0 01-.4.3A15 15 0 0023 8a5 5 0 013-1.5 1.4 1.4 0 01.7.2 1.3 1.3 0 01.5 1.8 1.3 1.3 0 01-.6.6 13 13 0 0110.1 11l.1.8H33v8h4.8l1.8 13.4q-6.3 4-15.8 4T8 42.4zM25 38.4q3.8-6.4 3.8-7.6c0-2.2-3.2-4-4.8-4s-4.9 1.7-4.9 4q0 1.2 3.8 7.6a1.2 1.2 0 001 .6 1 1 0 001-.6z" fill="#bdcfc8" fill-rule="evenodd"/><path class="cls-4" d="M19 31h9.6L27 47.2h-6.4l-1.6-16z"/><path d="M39.8 48.8a20 20 0 01-32 0l.8-6a2.7 2.7 0 001 .1 2.8 2.8 0 002.8-2.4v1.2a2.8 2.8 0 005.6 0v1.6a2.9 2.9 0 005.7 0 2.8 2.8 0 005.7 0v-1.6a2.8 2.8 0 105.7 0v-1.2A2.8 2.8 0 0038 43a2.9 2.9 0 001-.2l.8 6z" fill="#809eb0" fill-rule="evenodd"/><path d="M8.3 44.6l.3-1.8a2.7 2.7 0 001 .2 2.8 2.8 0 002.8-2.5v1.2a2.8 2.8 0 005.7 0v1.7a2.9 2.9 0 005.6 0 2.8 2.8 0 005.7 0v-1.7a2.8 2.8 0 105.7 0v-1.2A2.8 2.8 0 0038 43a2.9 2.9 0 001-.2l.3 2a2.9 2.9 0 01-4.1-2.2v1.2a2.8 2.8 0 11-5.7 0v1.6a2.8 2.8 0 01-5.7 0 2.9 2.9 0 01-5.7 0v-1.7a2.8 2.8 0 01-5.7 0v-1.2A2.8 2.8 0 019.6 45a2.9 2.9 0 01-1.3-.3z" fill="#738e9e" fill-rule="evenodd"/><path class="cls-11" d="M37.8 22.4c-1-2.9-3-4.7-4.7-4.5-2.2.2-2.8 3.7-2.3 8s1.7 7.5 3.9 7.3 4-3.9 3.6-8c0 1.2-.5 2.3-1.3 2.4-1.2 0-1.5-1.2-1.6-2.9s-.2-3 1-3a1.5 1.5 0 011.4.7z"/><path class="cls-12" d="M37 21.8c-.6-1.3-1.5-2-2.4-1.9-1.5.1-1.9 2.6-1.6 5.5s1.2 5.1 2.7 5c1.1-.2 2-1.5 2.2-3.4a1.2 1.2 0 01-1 .6c-1 0-1.4-1.2-1.5-2.9s-.1-3 1-3a1.6 1.6 0 01.6 0z"/><path class="cls-11" d="M9.6 22.4c1-2.9 3-4.7 4.7-4.5 2.2.2 2.8 3.7 2.3 8s-1.7 7.5-3.9 7.3-4-3.9-3.7-8c.1 1.2.5 2.3 1.4 2.4 1.1 0 1.5-1.2 1.6-2.9s.1-3-1-3a1.5 1.5 0 00-1.4.7z"/><path class="cls-12" d="M10.4 21.8c.6-1.3 1.5-2 2.4-1.9 1.5.1 1.8 2.6 1.5 5.5s-1.1 5.1-2.6 5c-1.1-.2-2-1.5-2.2-3.4a1.2 1.2 0 00.9.6c1.1 0 1.4-1.2 1.6-2.9s.1-3-1-3a1.7 1.7 0 00-.7 0z"/><path d="M19 28.6a5.3 5.3 0 010-.7c0-2.4 1.2-5.2 4.9-5.2s4.8 2.8 4.8 5.2a4.4 4.4 0 010 1c-.9-1.3-2.4-2.1-4.9-2.1-2.4 0-3.9.7-4.8 1.8z" fill="#f4f8ff" fill-rule="evenodd"/><path class="cls-11" d="M26.5 9.2L23.3 9l4-1.2a1.4 1.4 0 01-.8 1.4zm-3.5-1l-1.3 1a16.8 16.8 0 002-3.8 6.6 6.6 0 00.3-2.7A2.4 2.4 0 0125.2 5a2.4 2.4 0 01-.7 1.5A15 15 0 0023 8.1z"/></svg><?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?>
<?php
// phpcs:enable Generic.WhiteSpace.ScopeIndent
}

/**
* @return void
*/
private function css() {
// phpcs:disable Generic.WhiteSpace.ScopeIndent
?>
<style>
#frm-admin-smtp *, #frm-admin-smtp *::before, #frm-admin-smtpp *::after {
Expand Down Expand Up @@ -559,5 +564,6 @@ private function css() {
}
</style>
<?php
// phpcs:enable Generic.WhiteSpace.ScopeIndent
}
}
2 changes: 2 additions & 0 deletions classes/controllers/FrmStylesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,7 @@ public static function do_accordion_sections( $screen, $context, $data_object )

$page = $screen->id;

// phpcs:disable Generic.WhiteSpace.ScopeIndent
?>
<div id="side-sortables" class="accordion-container">
<ul class="outer-border">
Expand Down Expand Up @@ -1410,6 +1411,7 @@ public static function do_accordion_sections( $screen, $context, $data_object )
</ul><!-- .outer-border -->
</div><!-- .accordion-container -->
<?php
// phpcs:enable Generic.WhiteSpace.ScopeIndent
return $i;
}

Expand Down
2 changes: 2 additions & 0 deletions classes/controllers/FrmWelcomeTourController.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,13 @@ public static function show_completed_links( $current_form_id ) {

foreach ( $links as $key => $link ) {
$attrs = $button_attrs + array( 'data-tracking-value' => $key );
// phpcs:disable Generic.WhiteSpace.ScopeIndent
?>
<a href="<?php echo esc_url( $link['url'] ); ?>" <?php FrmAppHelper::array_to_html_params( $attrs, true ); ?>>
<?php echo esc_html( $link['text'] ); ?>
</a>
<?php
// phpcs:enable Generic.WhiteSpace.ScopeIndent
}
}

Expand Down
6 changes: 6 additions & 0 deletions classes/helpers/FrmAddonsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public static function get_reconnect_link() {
if ( ! FrmAppHelper::pro_is_connected() ) {
return;
}
// phpcs:disable Generic.WhiteSpace.ScopeIndent
?>
<p class="frm-py-2xs">
<span class="frm-font-medium frm-text-grey-700"><?php esc_html_e( 'Missing add-ons?', 'formidable' ); ?></span>
Expand All @@ -140,6 +141,7 @@ public static function get_reconnect_link() {
</a>
</p>
<?php
// phpcs:enable Generic.WhiteSpace.ScopeIndent
}

/**
Expand Down Expand Up @@ -289,6 +291,7 @@ public static function get_plan() {
*/
public static function show_five_star_rating( $color = 'black' ) {
$icon = file_get_contents( FrmAppHelper::plugin_path() . '/images/star.svg' );
// phpcs:disable Generic.WhiteSpace.ScopeIndent
?>
<span style="color: <?php echo esc_attr( $color ); ?>;">
<?php
Expand All @@ -298,6 +301,7 @@ public static function show_five_star_rating( $color = 'black' ) {
?>
</span>
<?php
// phpcs:enable Generic.WhiteSpace.ScopeIndent
}

/**
Expand All @@ -308,9 +312,11 @@ public static function show_five_star_rating( $color = 'black' ) {
* @return void
*/
public static function guarantee_icon() {
// phpcs:disable Generic.WhiteSpace.ScopeIndent
?>
<img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/guarantee.svg' ); ?>" alt="" />
<?php
// phpcs:enable Generic.WhiteSpace.ScopeIndent
}

/**
Expand Down
Loading