buddyverified_inner_meta_box

Buddyverified_inner_meta_box function.

Description

buddyverified_inner_meta_box(); 

Usage

  1. if ( !function_exists( 'buddyverified_inner_meta_box' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddyverified/includes/class-admin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = buddyverified_inner_meta_box(); 
  7.  

Defined (1)

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

/includes/class-admin.php  
  1. function buddyverified_inner_meta_box() { 
  2.  
  3. if ( ! empty( $_GET['user_id'] ) && is_numeric( $_GET['user_id'] ) ) { 
  4. $user_id = $_GET['user_id']; 
  5. } else { 
  6. $user_id = get_current_user_id(); 
  7.  
  8. $meta = get_user_meta( $user_id, 'bp-verified', true ) ? get_user_meta( $user_id, 'bp-verified', true ) : null; 
  9. $verified = get_user_meta( $user_id, 'bp-profile-verified', true ) ? get_user_meta( $user_id, 'bp-profile-verified', true ) : null; 
  10.  
  11. ?> 
  12. <table cellspacing="3px" style="border-collapse: collapse;"> 
  13. <thead> 
  14. <tr> 
  15. <th></th> 
  16. </tr> 
  17. </thead> 
  18.  
  19. <tbody> 
  20. <tr> 
  21. <td style="vertical-align:middle">Verify User:</td> 
  22. <td><input type="checkbox" name="verified" value="1" <?php if ( $verified ) { echo 'checked="checked"'; } ?> /></td> 
  23. </tr> 
  24. <tr class="alt"> 
  25. <td style="vertical-align:middle">Badge:</td> 
  26. <td style="vertical-align:middle">Choose image to display</td> 
  27. <td><img src="<?php echo esc_url( VERIFIED_URL ); ?>/images/1.png"></td> 
  28. <td><img src="<?php echo esc_url( VERIFIED_URL ); ?>/images/2.png"></td> 
  29. <td><img src="<?php echo esc_url( VERIFIED_URL ); ?>/images/3.png"></td> 
  30. <td><img src="<?php echo esc_url( VERIFIED_URL ); ?>/images/4.png"></td> 
  31. <td><img src="<?php echo esc_url( VERIFIED_URL ); ?>/images/5.png"></td> 
  32. <td><img src="<?php echo esc_url( VERIFIED_URL ); ?>/images/6.png"></td> 
  33. </tr> 
  34. <tr class="alt"> 
  35. <td></td> 
  36. <td></td> 
  37. <td><input type="radio" name="verified_image" value="1" <?php if ( '1' === $meta['image'] ) { echo 'checked="checked"'; } ?> /></td> 
  38. <td><input type="radio" name="verified_image" value="2" <?php if ( '2' === $meta['image'] ) { echo 'checked="checked"'; } ?>/></td> 
  39. <td><input type="radio" name="verified_image" value="3" <?php if ( '3' === $meta['image'] ) { echo 'checked="checked"'; } ?> /></td> 
  40. <td><input type="radio" name="verified_image" value="4" <?php if ( '4' === $meta['image'] ) { echo 'checked="checked"'; } ?> /></td> 
  41. <td><input type="radio" name="verified_image" value="5" <?php if ( '5' === $meta['image'] ) { echo 'checked="checked"'; } ?> /></td> 
  42. <td><input type="radio" name="verified_image" value="6" <?php if ( '6' === $meta['image'] ) { echo 'checked="checked"'; } ?> /></td> 
  43. </tr> 
  44. <tr class="alt"> 
  45. <td style="vertical-align:top">Activity Badge:</td> 
  46. <td> 
  47. <input type="radio" name="verified_activity" value="yes" <?php if ( 'yes' === $meta['activity'] ) { echo 'checked="checked"'; } ?> />Yes 
  48. <input type="radio" name="verified_activity" value="no" <?php if ( 'no' === $meta['activity'] ) { echo 'checked="checked"'; } ?>/>No 
  49. <p>Adds badge to activity stream avatar</p> 
  50. </td> 
  51. <td></td> 
  52. <td></td> 
  53. <td></td> 
  54. <td></td> 
  55. <td></td> 
  56. <td></td> 
  57. </tr> 
  58. <tr> 
  59. <td style="vertical-align:top">Profile Badge:</td> 
  60. <td> 
  61. <input type="radio" name="verified_profile" value="yes" <?php if ( 'yes' === $meta['profile'] ) { echo 'checked="checked"'; } ?> />Yes 
  62. <input type="radio" name="verified_profile" value="no" <?php if ( 'no' === $meta['profile'] ) { echo 'checked="checked"'; } ?>/>No 
  63. <p>Adds badge to profile</p> 
  64. </td> 
  65. </tr> 
  66. <tr> 
  67. <td style="vertical-align:top">Members List Badge:</td> 
  68. <td> 
  69. <input type="radio" name="verified_member" value="yes" <?php if ( 'yes' === $meta['member'] ) { echo 'checked="checked"'; } ?> />Yes 
  70. <input type="radio" name="verified_member" value="no" <?php if ( 'no' === $meta['member'] ) { echo 'checked="checked"'; } ?>/>No 
  71. <p>Adds badge to username in members lists</p> 
  72. </td> 
  73. </tr> 
  74. </tbody> 
  75. </table> 
  76.  
  77. <?php 
  78.