| @@ -43,9 +43,8 @@ | ||
| 43 | 43 | // TODO: Those keys should be at `$experiments_manager`. |
| 44 | 44 | $tracking_keys = [ |
| 45 | 45 | 'default', |
| 46 | 46 | 'state', |
| 47 | - 'tags', | |
| 48 | 47 | ]; |
| 49 | 48 | |
| 50 | 49 | foreach ( $experiments_manager->get_features() as $feature_name => $feature_data ) { |
| 51 | 50 | $data_to_collect = []; |
| @@ -51,12 +50,8 @@ | ||
| 51 | 50 | $data_to_collect = []; |
| 52 | 51 | |
| 53 | 52 | // Extract only tracking keys. |
| 54 | 53 | foreach ( $tracking_keys as $tracking_key ) { |
| 55 | - if ( empty( $feature_data[ $tracking_key ] ) ) { | |
| 56 | - continue; | |
| 57 | - } | |
| 58 | - | |
| 59 | 54 | $data_to_collect[ $tracking_key ] = $feature_data[ $tracking_key ]; |
| 60 | 55 | } |
| 61 | 56 | |
| 62 | 57 | $result[ $feature_name ] = $data_to_collect; |
| @@ -90,12 +85,10 @@ | ||
| 90 | 85 | if ( ! $is_first_item ) { |
| 91 | 86 | $output .= "\t"; |
| 92 | 87 | } |
| 93 | 88 | |
| 94 | - $title = isset( $experiment['title'] ) ? $experiment['title'] : $experiment['name']; | |
| 89 | + $output .= $experiment['title'] . ': ' . $state . PHP_EOL; | |
| 95 | 90 | |
| 96 | - $output .= $title . ': ' . $state . PHP_EOL; | |
| 97 | - | |
| 98 | 91 | $is_first_item = false; |
| 99 | 92 | } |
| 100 | 93 | |
| 101 | 94 | return [ |
| @@ -118,11 +111,9 @@ | ||
| 118 | 111 | foreach ( $experiments as $experiment ) { |
| 119 | 112 | // If the state is default, add the default state to the string. |
| 120 | 113 | $state = Plugin::$instance->experiments->get_feature_state_label( $experiment ); |
| 121 | 114 | |
| 122 | - $title = isset( $experiment['title'] ) ? $experiment['title'] : $experiment['name']; | |
| 123 | - | |
| 124 | - $output .= '<tr><td>' . esc_html( $title ) . ': </td>'; | |
| 115 | + $output .= '<tr><td>' . esc_html( $experiment['title'] ) . ': </td>'; | |
| 125 | 116 | $output .= '<td>' . esc_html( $state ) . '</td>'; |
| 126 | 117 | $output .= '</tr>'; |
| 127 | 118 | } |
| 128 | 119 | |