| @@ 271-279 (lines=9) @@ | ||
| 268 | : __( 'Your contribution', 'jetpack' ); |
|
| 269 | ||
| 270 | $button_styles = array(); |
|
| 271 | if ( ! empty( $attrs['customBackgroundButtonColor'] ) ) { |
|
| 272 | array_push( |
|
| 273 | $button_styles, |
|
| 274 | sprintf( |
|
| 275 | 'background-color: %s', |
|
| 276 | sanitize_hex_color( $attrs['customBackgroundButtonColor'] ) |
|
| 277 | ) |
|
| 278 | ); |
|
| 279 | } |
|
| 280 | if ( ! empty( $attrs['customTextButtonColor'] ) ) { |
|
| 281 | array_push( |
|
| 282 | $button_styles, |
|
| @@ 280-288 (lines=9) @@ | ||
| 277 | ) |
|
| 278 | ); |
|
| 279 | } |
|
| 280 | if ( ! empty( $attrs['customTextButtonColor'] ) ) { |
|
| 281 | array_push( |
|
| 282 | $button_styles, |
|
| 283 | sprintf( |
|
| 284 | 'color: %s', |
|
| 285 | sanitize_hex_color( $attrs['customTextButtonColor'] ) |
|
| 286 | ) |
|
| 287 | ); |
|
| 288 | } |
|
| 289 | $button_styles = implode( ';', $button_styles ); |
|
| 290 | ||
| 291 | return sprintf( |
|
| @@ 247-255 (lines=9) @@ | ||
| 244 | ); |
|
| 245 | } |
|
| 246 | ||
| 247 | if ( ! empty( $attr['customTextButtonColor'] ) ) { |
|
| 248 | array_push( |
|
| 249 | $button_styles, |
|
| 250 | sprintf( |
|
| 251 | 'color: %s', |
|
| 252 | sanitize_hex_color( $attr['customTextButtonColor'] ) |
|
| 253 | ) |
|
| 254 | ); |
|
| 255 | } |
|
| 256 | ||
| 257 | $button_styles = implode( ';', $button_styles ); |
|
| 258 | $button_classes = 'components-button is-button is-primary '; |
|