| @@ -18,9 +18,9 @@ | ||
| 18 | 18 | |
| 19 | 19 | $tips = self::$callback(); |
| 20 | 20 | $tip = self::get_random_tip( $tips ); |
| 21 | 21 | |
| 22 | - self::show_tip( $tip, $html ); | |
| 22 | + self::show_tip( $tip ); | |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Shows tip. |
| @@ -40,20 +40,17 @@ | ||
| 40 | 40 | * |
| 41 | 41 | * @return void |
| 42 | 42 | */ |
| 43 | 43 | public static function show_tip( $tip, $html = '' ) { |
| 44 | - $defaults = array( | |
| 45 | - 'page' => '', | |
| 46 | - 'class' => 'frm-mt-0', | |
| 47 | - ); | |
| 48 | - $tip = array_merge( $defaults, $tip ); | |
| 49 | - | |
| 44 | + if ( ! isset( $tip['page'] ) ) { | |
| 45 | + $tip['page'] = ''; | |
| 46 | + } | |
| 50 | 47 | if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) ) { |
| 51 | 48 | $tip['link']['medium'] = 'tip'; |
| 52 | 49 | } |
| 53 | 50 | |
| 54 | 51 | if ( 'p' === $html ) { |
| 55 | - echo '<p class="frmcenter ' . esc_attr( $tip['class'] ) . '">'; | |
| 52 | + echo '<p class="frmcenter frm-mt-0">'; | |
| 56 | 53 | } |
| 57 | 54 | |
| 58 | 55 | $link = empty( $tip['link'] ) ? $tip['page'] : FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] ); |
| 59 | 56 | ?> |