PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 3.4.5
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v3.4.5
3.4.5 3.4.4 3.4.3 3.4.2 3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 All 198 releases
← All changes | admin/section/class-convertkit-admin-section-base.php +56 -0 3.4.0 → 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 *
@@ -867,8 +900,31 @@
867 900 echo wp_kses(
868 901 $this->get_link_button( $url, $label, $css_classes ),
869 902 convertkit_kses_allowed_html()
870 903 );
904 +
905 + }
906 +
907 + /**
908 + * Outputs the given code in a code block, with a button to copy the code
909 + * to the clipboard.
910 + *
911 + * Requires the settings.css and ui.js resources to be enqueued on the screen
912 + * calling this method.
913 + *
914 + * @since 3.4.1
915 + *
916 + * @param string $code Code to display.
917 + * @param string $id Optional ID attribute to assign to the code element.
918 + */
919 + public function output_code_block( $code, $id = '' ) {
920 +
921 + ?>
922 + <div class="kit-code">
923 + <pre><code<?php echo ( ! empty( $id ) ? ' id="' . esc_attr( $id ) . '"' : '' ); ?>><?php echo esc_html( $code ); ?></code></pre>
924 + <button type="button" class="button button-secondary kit-code-copy"><?php esc_html_e( 'Copy', 'convertkit' ); ?></button>
925 + </div>
926 + <?php
871 927
872 928 }
873 929
874 930 /**