diff --git a/classes/controllers/FrmHooksController.php b/classes/controllers/FrmHooksController.php index 3441a1c095..5d9ddd4ba1 100644 --- a/classes/controllers/FrmHooksController.php +++ b/classes/controllers/FrmHooksController.php @@ -18,7 +18,7 @@ public static function trigger_load_hook( $hooks = 'load_hooks' ) { $trigger_hooks = $hooks; $hooks = (array) $hooks; - if ( 'load_hooks' == $trigger_hooks ) { + if ( 'load_hooks' === $trigger_hooks ) { if ( is_admin() ) { $hooks[] = 'load_admin_hooks'; diff --git a/classes/controllers/FrmSettingsController.php b/classes/controllers/FrmSettingsController.php index bac066f8ef..c2a8249fa5 100644 --- a/classes/controllers/FrmSettingsController.php +++ b/classes/controllers/FrmSettingsController.php @@ -145,7 +145,7 @@ private static function get_settings_tabs() { $installed_addons = apply_filters( 'frm_installed_addons', array() ); foreach ( $installed_addons as $installed_addon ) { - if ( ! $installed_addon->is_parent_licence && $installed_addon->plugin_name != 'Formidable Pro' && $installed_addon->needs_license ) { + if ( ! $installed_addon->is_parent_licence && $installed_addon->plugin_name !== 'Formidable Pro' && $installed_addon->needs_license ) { $show_licenses = true; break; } @@ -447,7 +447,7 @@ public static function route( $stop_load = false ) { if ( $action === 'process-form' ) { self::process_form( $stop_load ); - } elseif ( $stop_load != 'stop_load' ) { + } elseif ( $stop_load !== 'stop_load' ) { self::display_form(); } } diff --git a/classes/controllers/FrmStylesController.php b/classes/controllers/FrmStylesController.php index 58026ef26e..87aced6cf5 100644 --- a/classes/controllers/FrmStylesController.php +++ b/classes/controllers/FrmStylesController.php @@ -1304,9 +1304,9 @@ public static function show_entry_styles( $default_styles ) { foreach ( $default_styles as $name => $val ) { $setting = $name; - if ( 'border_width' == $name ) { + if ( 'border_width' === $name ) { $setting = 'field_border_width'; - } elseif ( 'alt_bg_color' == $name ) { + } elseif ( 'alt_bg_color' === $name ) { $setting = 'bg_color_active'; } $default_styles[ $name ] = $style->post_content[ $setting ]; diff --git a/classes/helpers/FrmAppHelper.php b/classes/helpers/FrmAppHelper.php index d116e1746a..39c9726b50 100644 --- a/classes/helpers/FrmAppHelper.php +++ b/classes/helpers/FrmAppHelper.php @@ -2382,7 +2382,7 @@ public static function permission_check( $permission, $show_message = 'show' ) { $permission_error = self::permission_nonce_error( $permission ); if ( $permission_error !== false ) { - if ( 'hide' == $show_message ) { + if ( 'hide' === $show_message ) { $permission_error = ''; } wp_die( esc_html( $permission_error ) ); @@ -3532,7 +3532,7 @@ public static function maybe_add_tooltip( $name, $class = 'closed', $form_name = return; } - if ( 'open' == $class ) { + if ( 'open' === $class ) { echo ' frm_help"'; } else { echo ' class="frm_help"'; @@ -3540,7 +3540,7 @@ public static function maybe_add_tooltip( $name, $class = 'closed', $form_name = echo ' title="' . esc_attr( $tooltips[ $name ] ); - if ( 'open' != $class ) { + if ( 'open' !== $class ) { echo '"'; } } diff --git a/classes/helpers/FrmFormsHelper.php b/classes/helpers/FrmFormsHelper.php index abdd553f80..0b7c759b0d 100644 --- a/classes/helpers/FrmFormsHelper.php +++ b/classes/helpers/FrmFormsHelper.php @@ -1236,7 +1236,7 @@ public static function get_action_links( $form_id, $form ) { $actions = array(); $trash_links = self::delete_trash_links( $form_id ); - if ( 'trash' == $form->status ) { + if ( 'trash' === $form->status ) { $actions['restore'] = $trash_links['restore']; if ( current_user_can( 'frm_delete_forms' ) ) { diff --git a/classes/helpers/FrmFormsListHelper.php b/classes/helpers/FrmFormsListHelper.php index 0760f4cc8a..18ef146a80 100644 --- a/classes/helpers/FrmFormsListHelper.php +++ b/classes/helpers/FrmFormsListHelper.php @@ -448,7 +448,7 @@ private function get_form_name( $item, $actions, $edit_link, $mode = 'list' ) { $form_name = FrmAppHelper::kses( $form_name ); - if ( 'excerpt' != $mode ) { + if ( 'excerpt' !== $mode ) { $form_name = FrmAppHelper::truncate( $form_name, 50 ); } @@ -475,7 +475,7 @@ private function get_form_name( $item, $actions, $edit_link, $mode = 'list' ) { * @return void */ private function add_draft_label( $item, &$val ) { - if ( 'draft' === $item->status && 'draft' != $this->status ) { + if ( 'draft' === $item->status && 'draft' !== $this->status ) { $val .= ' - ' . esc_html__( 'Draft', 'formidable' ) . ''; } } diff --git a/classes/helpers/FrmListHelper.php b/classes/helpers/FrmListHelper.php index 7d044fe5ef..56d4695929 100644 --- a/classes/helpers/FrmListHelper.php +++ b/classes/helpers/FrmListHelper.php @@ -242,7 +242,7 @@ protected function set_pagination_args( $args ) { * @return int Number of items that correspond to the given pagination argument. */ public function get_pagination_arg( $key ) { - if ( 'page' == $key ) { + if ( 'page' === $key ) { return $this->get_pagenum(); } @@ -650,7 +650,7 @@ protected function pagination( $which ) { ) ); - if ( 'bottom' == $which ) { + if ( 'bottom' === $which ) { $html_current_page = $current; $total_pages_before = '' . __( 'Current Page', 'formidable' ) . ''; } else { diff --git a/classes/helpers/FrmXMLHelper.php b/classes/helpers/FrmXMLHelper.php index 9e0b66b927..14ddd49c1a 100644 --- a/classes/helpers/FrmXMLHelper.php +++ b/classes/helpers/FrmXMLHelper.php @@ -1259,13 +1259,13 @@ private static function populate_post( &$post, $item, $imported ) { $post['attachment_url'] = (string) $item->attachment_url; } - if ( $post['post_type'] == FrmFormActionsController::$action_post_type && isset( $imported['forms'][ (int) $post['menu_order'] ] ) ) { + if ( $post['post_type'] === FrmFormActionsController::$action_post_type && isset( $imported['forms'][ (int) $post['menu_order'] ] ) ) { // update to new form id $post['menu_order'] = $imported['forms'][ (int) $post['menu_order'] ]; } // Don't allow default styles to take over a site's default style - if ( 'frm_styles' == $post['post_type'] ) { + if ( 'frm_styles' === $post['post_type'] ) { $post['menu_order'] = 0; } @@ -2223,7 +2223,7 @@ private static function format_email_data( &$atts, $notification ) { if ( isset( $notification[ $f ] ) ) { $atts[ $f ] = $notification[ $f ]; - if ( 'custom' == $notification[ $f ] ) { + if ( 'custom' === $notification[ $f ] ) { $atts[ $f ] = $notification[ 'cust_' . $f ]; } elseif ( is_numeric( $atts[ $f ] ) && ! empty( $atts[ $f ] ) ) { $atts[ $f ] = '[' . $atts[ $f ] . ']'; diff --git a/classes/models/FrmAddon.php b/classes/models/FrmAddon.php index db49d22810..3931c93371 100644 --- a/classes/models/FrmAddon.php +++ b/classes/models/FrmAddon.php @@ -188,14 +188,14 @@ public function edd_plugin_updater() { */ public function plugins_api_filter( $_data, $_action = '', $_args = null ) { - if ( $_action != 'plugin_information' ) { + if ( $_action !== 'plugin_information' ) { return $_data; } $slug = basename( $this->plugin_file, '.php' ); $slug2 = str_replace( '/' . $slug . '.php', '', $this->plugin_folder ); - if ( empty( $_args->slug ) || ( $_args->slug != $slug && $_args->slug !== $slug2 ) ) { + if ( empty( $_args->slug ) || ( $_args->slug !== $slug && $_args->slug !== $slug2 ) ) { return $_data; } @@ -253,7 +253,7 @@ public function get_license() { */ protected function maybe_get_pro_license() { // prevent a loop if $this is the pro plugin - $get_license = FrmAppHelper::pro_is_installed() && is_callable( 'FrmProAppHelper::get_updater' ) && $this->plugin_name != 'Formidable Pro'; + $get_license = FrmAppHelper::pro_is_installed() && is_callable( 'FrmProAppHelper::get_updater' ) && $this->plugin_name !== 'Formidable Pro'; if ( ! $get_license ) { return false; diff --git a/classes/models/FrmCreateFile.php b/classes/models/FrmCreateFile.php index eeea06f2de..09305332fd 100644 --- a/classes/models/FrmCreateFile.php +++ b/classes/models/FrmCreateFile.php @@ -272,9 +272,9 @@ private function get_ftp_creds( $type ) { unset( $credentials['port'] ); } - if ( ( defined( 'FTP_SSH' ) && FTP_SSH ) || ( defined( 'FS_METHOD' ) && 'ssh2' == FS_METHOD ) ) { + if ( ( defined( 'FTP_SSH' ) && FTP_SSH ) || ( defined( 'FS_METHOD' ) && 'ssh2' === FS_METHOD ) ) { $credentials['connection_type'] = 'ssh'; - } elseif ( ( defined( 'FTP_SSL' ) && FTP_SSL ) && 'ftpext' == $type ) { + } elseif ( ( defined( 'FTP_SSL' ) && FTP_SSL ) && 'ftpext' === $type ) { // Only the FTP Extension understands SSL. $credentials['connection_type'] = 'ftps'; } elseif ( ! isset( $credentials['connection_type'] ) ) { diff --git a/classes/models/FrmDb.php b/classes/models/FrmDb.php index 84a4c14aed..be68a2668c 100644 --- a/classes/models/FrmDb.php +++ b/classes/models/FrmDb.php @@ -747,7 +747,7 @@ public static function check_cache( $cache_key, $group = '', $query = '', $type return $results; } - if ( 'get_posts' == $type ) { + if ( 'get_posts' === $type ) { $results = get_posts( $query ); } elseif ( 'get_associative_results' === $type ) { global $wpdb; diff --git a/classes/models/FrmField.php b/classes/models/FrmField.php index ba2cecbaf0..eabb68ba66 100644 --- a/classes/models/FrmField.php +++ b/classes/models/FrmField.php @@ -1025,7 +1025,7 @@ private static function maybe_include_repeating_fields( $inc_repeat, &$where ) { public static function include_sub_fields( &$results, $inc_embed, $type = 'all', $form_id = '' ) { $no_sub_forms = empty( $results ) && $type === 'all'; - if ( 'include' != $inc_embed || $no_sub_forms ) { + if ( 'include' !== $inc_embed || $no_sub_forms ) { return; } @@ -1039,7 +1039,7 @@ public static function include_sub_fields( &$results, $inc_embed, $type = 'all', $index_offset = 1; foreach ( $form_fields as $k => $field ) { - if ( 'form' != $field->type || ! isset( $field->field_options['form_select'] ) ) { + if ( 'form' !== $field->type || ! isset( $field->field_options['form_select'] ) ) { continue; } @@ -1334,7 +1334,7 @@ public static function get_original_field_type( $field ) { $field_type = self::get_field_type( $field ); $original_type = self::get_option( $field, 'original_type' ); - if ( ! empty( $original_type ) && $original_type != $field_type ) { + if ( ! empty( $original_type ) && $original_type !== $field_type ) { // Check the original type for arrays. $field_type = $original_type; } diff --git a/classes/models/FrmFieldFormHtml.php b/classes/models/FrmFieldFormHtml.php index 6cd5912f8b..86c08b50eb 100644 --- a/classes/models/FrmFieldFormHtml.php +++ b/classes/models/FrmFieldFormHtml.php @@ -374,7 +374,7 @@ public function replace_shortcodes_after_input() { $this->html .= "\n"; // Stop html filtering on confirmation field to prevent loop - if ( $this->field_obj->get_field_column( 'conf_field' ) != 'stop' ) { + if ( $this->field_obj->get_field_column( 'conf_field' ) !== 'stop' ) { $this->filter_for_more_shortcodes(); } } diff --git a/classes/models/FrmForm.php b/classes/models/FrmForm.php index 7f229388f5..7a8bab47f5 100644 --- a/classes/models/FrmForm.php +++ b/classes/models/FrmForm.php @@ -610,7 +610,7 @@ public static function translatable_strings( $form ) { * @return bool|int */ public static function set_status( $id, $status ) { - if ( 'trash' == $status ) { + if ( 'trash' === $status ) { return self::trash( $id ); } @@ -996,7 +996,7 @@ public static function get_count() { $counts = array_fill_keys( $statuses, 0 ); foreach ( $results as $row ) { - if ( 'trash' != $row->status ) { + if ( 'trash' !== $row->status ) { if ( $row->is_template ) { ++$counts['template']; } else { @@ -1006,7 +1006,7 @@ public static function get_count() { ++$counts['trash']; } - if ( 'draft' == $row->status ) { + if ( 'draft' === $row->status ) { ++$counts['draft']; } diff --git a/classes/models/FrmFormAction.php b/classes/models/FrmFormAction.php index fb50969202..bdc5b4065c 100644 --- a/classes/models/FrmFormAction.php +++ b/classes/models/FrmFormAction.php @@ -789,7 +789,7 @@ public static function action_args( $form_id = 0, $limit = 99 ) { 'order' => 'ASC', ); - if ( $form_id && $form_id != 'all' ) { + if ( $form_id && $form_id !== 'all' ) { $args['menu_order'] = $form_id; } @@ -843,7 +843,7 @@ public function destroy( $form_id = false, $type = 'default' ) { $query['menu_order'] = $form_id; } - if ( 'all' != $type ) { + if ( 'all' !== $type ) { $query['post_excerpt'] = $this->id_base; } @@ -940,7 +940,7 @@ public function migrate_to_2( $form, $update = 'update' ) { $post_id = $this->save_settings( $action ); } - if ( $post_id && 'update' == $update ) { + if ( $post_id && 'update' === $update ) { global $wpdb; $form->options = maybe_serialize( $form->options ); diff --git a/classes/models/FrmTableHTMLGenerator.php b/classes/models/FrmTableHTMLGenerator.php index 7c127f4868..49f5d4d648 100644 --- a/classes/models/FrmTableHTMLGenerator.php +++ b/classes/models/FrmTableHTMLGenerator.php @@ -380,7 +380,7 @@ public function generate_two_cell_table_row( $label, $value, $args = array() ) { $label = 'td_style . '>' . wp_kses_post( $label ) . ''; $value = 'td_style . '>' . $this->filter_value_for_display( $value, $args ) . ''; - if ( 'rtl' == $this->direction ) { + if ( 'rtl' === $this->direction ) { $row .= $value; $row .= $label; } else { diff --git a/classes/views/frm-fields/back-end/ajax-field-placeholder.php b/classes/views/frm-fields/back-end/ajax-field-placeholder.php index a978d9fe3f..66e519d75c 100644 --- a/classes/views/frm-fields/back-end/ajax-field-placeholder.php +++ b/classes/views/frm-fields/back-end/ajax-field-placeholder.php @@ -3,7 +3,7 @@ die( 'You are not allowed to call this page directly.' ); } ?> -
  • +