| @@ -22,8 +22,9 @@ | ||
| 22 | 22 | * @since 6.9 |
| 23 | 23 | * |
| 24 | 24 | * @param string $addon_key The key of addon. |
| 25 | 25 | * @param array $addon The array of addon's information. |
| 26 | + * | |
| 26 | 27 | * @return void |
| 27 | 28 | */ |
| 28 | 29 | public static function add_addon_label_attributes( $addon_key, $addon ) { |
| 29 | 30 | $id = 'frm-onboarding-' . $addon_key . '-addon'; |
| @@ -35,17 +36,21 @@ | ||
| 35 | 36 | |
| 36 | 37 | if ( ! empty( $addon['is-checked'] ) ) { |
| 37 | 38 | $attributes['class'] .= ' frm-checked'; |
| 38 | 39 | } |
| 40 | + | |
| 39 | 41 | if ( ! empty( $addon['is-disabled'] ) ) { |
| 40 | 42 | $attributes['class'] .= ' frm-disabled'; |
| 41 | 43 | } |
| 44 | + | |
| 42 | 45 | if ( ! empty( $addon['rel'] ) ) { |
| 43 | 46 | $attributes['rel'] = $addon['rel']; |
| 44 | 47 | } |
| 48 | + | |
| 45 | 49 | if ( ! empty( $addon['is-vendor'] ) ) { |
| 46 | 50 | $attributes['data-is-vendor'] = 'true'; |
| 47 | 51 | } |
| 52 | + | |
| 48 | 53 | if ( ! empty( $addon['is-installed'] ) ) { |
| 49 | 54 | $attributes['data-is-installed'] = 'true'; |
| 50 | 55 | } |
| 51 | 56 | |
| @@ -58,8 +63,9 @@ | ||
| 58 | 63 | * @since 6.9 |
| 59 | 64 | * |
| 60 | 65 | * @param string $addon_key The key of addon. |
| 61 | 66 | * @param array $addon The array of addon's information. |
| 67 | + * | |
| 62 | 68 | * @return void |
| 63 | 69 | */ |
| 64 | 70 | public static function add_addon_input_attributes( $addon_key, $addon ) { |
| 65 | 71 | $id = 'frm-onboarding-' . $addon_key . '-addon'; |
| @@ -71,8 +77,9 @@ | ||
| 71 | 77 | |
| 72 | 78 | if ( ! empty( $addon['is-checked'] ) ) { |
| 73 | 79 | $attributes['checked'] = 'checked'; |
| 74 | 80 | } |
| 81 | + | |
| 75 | 82 | if ( ! empty( $addon['is-disabled'] ) ) { |
| 76 | 83 | $attributes['disabled'] = 'disabled'; |
| 77 | 84 | } |
| 78 | 85 | |
| @@ -84,8 +91,9 @@ | ||
| 84 | 91 | * |
| 85 | 92 | * @since 6.9 |
| 86 | 93 | * |
| 87 | 94 | * @param array $args |
| 95 | + * | |
| 88 | 96 | * @return void |
| 89 | 97 | */ |
| 90 | 98 | public static function print_footer( $args = array() ) { |
| 91 | 99 | $defaults = array( |
| @@ -110,14 +118,17 @@ | ||
| 110 | 118 | $primary_button_attributes = array( |
| 111 | 119 | 'href' => $args['primary-button-href'], |
| 112 | 120 | ); |
| 113 | 121 | $primary_button_attributes['class'] = trim( 'button button-primary frm-button-primary frm-sharp frm_large ' . $args['primary-button-class'] ); |
| 122 | + | |
| 114 | 123 | if ( ! empty( $args['primary-button-id'] ) ) { |
| 115 | 124 | $primary_button_attributes['id'] = $args['primary-button-id']; |
| 116 | 125 | } |
| 126 | + | |
| 117 | 127 | if ( ! empty( $args['primary-button-plugin'] ) ) { |
| 118 | 128 | $primary_button_attributes['data-plugin'] = $args['primary-button-plugin']; |
| 119 | 129 | } |
| 130 | + | |
| 120 | 131 | if ( ! empty( $args['primary-button-role'] ) ) { |
| 121 | 132 | $primary_button_attributes['role'] = $args['primary-button-role']; |
| 122 | 133 | } |
| 123 | 134 | |
| @@ -125,14 +136,17 @@ | ||
| 125 | 136 | $secondary_button_attributes = array( |
| 126 | 137 | 'href' => $args['secondary-button-href'], |
| 127 | 138 | ); |
| 128 | 139 | $secondary_button_attributes['class'] = trim( 'button button-secondary frm-button-secondary frm-sharp frm_large ' . $args['secondary-button-class'] ); |
| 140 | + | |
| 129 | 141 | if ( $args['secondary-button-skip-step'] ) { |
| 130 | 142 | $secondary_button_attributes['class'] .= ' frm-onboarding-skip-step'; |
| 131 | 143 | } |
| 144 | + | |
| 132 | 145 | if ( ! empty( $args['secondary-button-id'] ) ) { |
| 133 | 146 | $secondary_button_attributes['id'] = $args['secondary-button-id']; |
| 134 | 147 | } |
| 148 | + | |
| 135 | 149 | if ( ! empty( $args['secondary-button-role'] ) ) { |
| 136 | 150 | $secondary_button_attributes['role'] = $args['secondary-button-role']; |
| 137 | 151 | } |
| 138 | 152 | |