← All changes
|
admin/section/class-convertkit-admin-section-base.php
+33
-0
3.4.3
→
3.4.5
View file →
| @@ -433,8 +433,41 @@ | ||
| 433 | 433 | |
| 434 | 434 | } |
| 435 | 435 | |
| 436 | 436 | /** |
| 437 | + * Outputs the given warning message in an inline notice, permitting links | |
| 438 | + * so the message can tell the user where to go. | |
| 439 | + * | |
| 440 | + * @since 3.4.5 | |
| 441 | + * | |
| 442 | + * @param string $warning_message Warning Message. | |
| 443 | + * @param string $css_class Additional CSS class for the notice. | |
| 444 | + */ | |
| 445 | + public function output_warning( $warning_message, $css_class = '' ) { | |
| 446 | + | |
| 447 | + ?> | |
| 448 | + <div class="notice notice-warning <?php echo esc_attr( sanitize_html_class( $css_class ) ); ?>"> | |
| 449 | + <p> | |
| 450 | + <?php | |
| 451 | + echo wp_kses( | |
| 452 | + $warning_message, | |
| 453 | + array( | |
| 454 | + 'a' => array( | |
| 455 | + 'href' => array(), | |
| 456 | + 'target' => array(), | |
| 457 | + ), | |
| 458 | + 'code' => array(), | |
| 459 | + 'strong' => array(), | |
| 460 | + ) | |
| 461 | + ); | |
| 462 | + ?> | |
| 463 | + </p> | |
| 464 | + </div> | |
| 465 | + <?php | |
| 466 | + | |
| 467 | + } | |
| 468 | + | |
| 469 | + /** | |
| 437 | 470 | * Outputs the given error message in an inline notice. |
| 438 | 471 | * |
| 439 | 472 | * @since 1.9.6 |
| 440 | 473 | * |