| @@ -74,9 +74,10 @@ | ||
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | $inject = (array) $this->get_plugin_data(); |
| 77 | 77 | $overrides = array( |
| 78 | - 'plugin-search' => true, // Helps to determine if that an injected card. | |
| 78 | + // Helps to determine if that an injected card. | |
| 79 | + 'plugin-search' => true, | |
| 79 | 80 | 'name' => sprintf( |
| 80 | 81 | /* translators: Formidable addon name */ |
| 81 | 82 | esc_html_x( 'Formidable %s', 'Formidable Addon Name', 'formidable' ), |
| 82 | 83 | $addon_list[ $matching_addon ]['name'] |
| @@ -124,11 +125,11 @@ | ||
| 124 | 125 | } |
| 125 | 126 | |
| 126 | 127 | $addon_terms = $this->search_to_array( $addon_opts['search_terms'] . ' ' . $addon_opts['name'] ); |
| 127 | 128 | |
| 128 | - $matches = ! empty( array_intersect( $addon_terms, $normalized_term ) ); | |
| 129 | + $matched_terms = array_intersect( $addon_terms, $normalized_term ); | |
| 129 | 130 | |
| 130 | - if ( $matches ) { | |
| 131 | + if ( count( $matched_terms ) === count( $normalized_term ) ) { | |
| 131 | 132 | $matching_addon = $addon_id; |
| 132 | 133 | break; |
| 133 | 134 | } |
| 134 | 135 | } |
| @@ -331,9 +332,9 @@ | ||
| 331 | 332 | href="' . esc_url( FrmAppHelper::admin_upgrade_link( 'plugin-learn-more', $plugin['link'] ) ) . '" |
| 332 | 333 | target="_blank" |
| 333 | 334 | data-addon="' . esc_attr( $plugin['addon'] ) . '" |
| 334 | 335 | >' . esc_html__( 'Learn more', 'formidable' ) . '</a>'; |
| 335 | - } | |
| 336 | + }//end if | |
| 336 | 337 | |
| 337 | 338 | // Dismiss link. |
| 338 | 339 | $dismiss = add_query_arg( array( 'frm-dismiss' => $plugin['id'] ) ); |
| 339 | 340 | $links[] = '<a |