diff --git a/class-full-screen-morphing-search.php b/class-full-screen-morphing-search.php index d1471d1..b4c1999 100644 --- a/class-full-screen-morphing-search.php +++ b/class-full-screen-morphing-search.php @@ -81,11 +81,12 @@ class Full_Screen_Morphing_Search { * @since 1.1 */ public function full_screen_morphing_search_output_morphing_search() { + + $fsmsp_options = get_option( 'fsmsp_options' ); // Associative Array 'fsmsp_options'. + // Setting the placeholder as a variable to output the option depending on the case. - $fsmsp_options = get_option( 'fsmsp_options' ); // Associative Array 'fsmsp_options'. $fsmsp_placeholder = $fsmsp_options['fsmsp_search_form_text']; // Selecting the key to get the value. - // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison -- strict comparison not working ! - if ( '' != $fsmsp_placeholder ) { + if ( ! empty( $fsmsp_placeholder ) ) { $fsmsp_placeholder = esc_attr( $fsmsp_placeholder ); } else { $fsmsp_placeholder = esc_attr_x( 'Search …', 'placeholder', 'full-screen-morphing-search' ); @@ -127,8 +128,7 @@ class Full_Screen_Morphing_Search { if ( has_post_thumbnail() ) { echo the_post_thumbnail( 'full-screen-morphing-search-plugin-thumb', array( 'class' => 'round' ) ); } else { - // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison -- strict comparison not working ! - if ( '' == $fsmsp_options['fsmsp_article_icon'] ) { + if ( empty( $fsmsp_options['fsmsp_article_icon'] ) ) { echo ''; } else { full_screen_morphing_search_article_icon(); @@ -168,8 +168,7 @@ class Full_Screen_Morphing_Search {
'; } else { full_screen_morphing_search_category_icon(); diff --git a/functions-full-screen-morphing-search.php b/functions-full-screen-morphing-search.php index 9bc419c..3ca2667 100644 --- a/functions-full-screen-morphing-search.php +++ b/functions-full-screen-morphing-search.php @@ -331,7 +331,7 @@ if ( class_exists( 'Kirki' ) ) { $attachment_id = attachment_url_to_postid( $image_url ); // Tries to convert an attachment URL into a post ID. $article_i_classes = get_option( 'fsmsp_options' )['fsmsp_article_i_classes']; $classes; - if ( true === $article_i_classes ) { + if ( ! empty( $article_i_classes ) ) { $classes = 'round fsmsp-article-icon'; } else { $classes = 'fsmsp-article-icon'; @@ -382,7 +382,7 @@ if ( class_exists( 'Kirki' ) ) { $attachmentcat_id = attachment_url_to_postid( $imagecat_url ); $category_i_classes = get_option( 'fsmsp_options' )['fsmsp_category_i_classes']; $classes; - if ( true === $category_i_classes ) { + if ( ! empty( $category_i_classes ) ) { $classes = 'round fsmsp-category-icon'; } else { $classes = 'fsmsp-category-icon'; @@ -433,7 +433,7 @@ if ( class_exists( 'Kirki' ) ) { $attachmenttag_id = attachment_url_to_postid( $imagetag_url ); $tag_i_classes = get_option( 'fsmsp_options' )['fsmsp_tag_i_classes']; $classes; - if ( true === $tag_i_classes ) { + if ( ! empty( $tag_i_classes ) ) { $classes = 'round fsmsp-tag-icon'; } else { $classes = 'fsmsp-tag-icon';