jetpack_verification_options_form

The Jetpack by WordPress.com jetpack verification options form function.

Description

jetpack_verification_options_form(); 

Usage

  1. if ( !function_exists( 'jetpack_verification_options_form' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/verification-tools/blog-verification-tools.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = jetpack_verification_options_form(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/modules/verification-tools/blog-verification-tools.php  
  1. function jetpack_verification_options_form() { 
  2. $verification_services_codes = get_option( 'verification_services_codes' ); 
  3. ?> 
  4. <form method="post" action="options.php"> 
  5. <?php settings_fields( 'verification_services_codes_fields' ); ?> 
  6. <div class="tools-container"> 
  7. <?php 
  8. foreach ( jetpack_verification_services() as $key => $service ) { 
  9. echo "<div class='jp-verification-service'> 
  10. <h4>" . esc_html( $service['name'] ) . "</h4> 
  11. <input value='" . esc_attr( $verification_services_codes["$key"] ) . "' name='verification_services_codes[" . esc_attr( $key ) . "]' type='text' /> 
  12. <small> 
  13. <label for='verification_services_codes[" . esc_attr( $key ) . "]'>" . esc_html( __( 'Example:' , jetpack ) ) . " <span><meta name='" . esc_attr( $service['key'] ) . "' content='<strong>" . esc_attr( $service['format'] ) . "</strong>'></span></label> 
  14. </small> 
  15. </div>"; 
  16. ?> 
  17. </div> 
  18. <p class="submit"> 
  19. <input type="submit" class="button-primary" value="<?php _e( 'Save Changes' , jetpack ); ?>" /> 
  20. </p> 
  21. </form> 
  22.  
  23. <style> 
  24. /* Jetpack styles aren't loaded in the tools section of the admin, let's save on some httprequestsand just do an inline block */ 
  25.  
  26. .jp-verification-tools h3 a { 
  27. text-decoration: none; 
  28.  
  29. .jp-verification-service { 
  30. border-bottom: 1px #f1f1f1 solid; 
  31. padding-bottom: 20px; 
  32.  
  33. .jp-verification-service input[type="text"] { 
  34. width: 100%; 
  35. margin-bottom: 10px; 
  36.  
  37. .jp-verification-service label { 
  38. font-size: 13px; 
  39.  
  40. /* mimic 'code' tag style, but this allows for better visuals + line breaks on mobile devices */ 
  41. .jp-verification-service span { 
  42. display: block; 
  43. margin-top: 5px; 
  44. font-size: 14px; 
  45. padding: 10px; 
  46. background: #f1f1f1; 
  47. font-family: monospace; 
  48. word-wrap: break-word; 
  49.  
  50. .jp-verification-service strong { 
  51. font-weight: bold; 
  52. </style> 
  53.  
  54. <?php