Guest User

Untitled

a guest
May 29th, 2015
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.94 KB | None | 0 0
  1. if (!class_exists('Bxcft_Field_Type_RKToken'))
  2. {
  3.     class Bxcft_Field_Type_RKToken extends BP_XProfile_Field_Type
  4.     {
  5.         public function __construct() {
  6.             parent::__construct();
  7.  
  8.             $this->name             = _x( 'RKToken', 'xprofile field type', 'bxcft' );
  9.  
  10.             $this->set_format( '/[-0-9a-zA-Z.+_]$/', 'replace' );  
  11.             do_action( 'bp_xprofile_field_type_text', $this );
  12.         }
  13.  
  14.         public function admin_field_html (array $raw_properties = array ())
  15.         {
  16.             $html = $this->get_edit_field_html_elements( array_merge(
  17.                 array( 'type' => 'text' ),
  18.                 $raw_properties
  19.             ) );
  20.         ?>
  21.             <input <?php echo $html; ?> />
  22.         <?php
  23.         }
  24.  
  25.         public function edit_field_html (array $raw_properties = array ())
  26.         {
  27.             if (isset($_GET['var1'])) {
  28.                 echo "OK";
  29.             }
  30.             else {
  31.                 print_r($_GET);
  32.             }
Advertisement
Add Comment
Please, Sign In to add comment