View difference between Paste ID: LB0E98hB and tyb2FJqW
SHOW: | | - or go back to the newest paste.
1
<?php
2
/**
3
 * RKtoken Type
4
 */
5
if (!class_exists('Bxcft_Field_Type_RKToken')) 
6
{
7
    class Bxcft_Field_Type_RKToken extends BP_XProfile_Field_Type
8
    {
9
        public function __construct() {
10
            parent::__construct();
11
12
            $this->name             = _x( 'RKToken', 'xprofile field type', 'bxcft' );
13
14
            $this->set_format( '/[-0-9a-zA-Z.+_]$/', 'replace' );  
15
            do_action( 'bp_xprofile_field_type_text', $this );
16
        }
17
18
        public function admin_field_html (array $raw_properties = array ())
19
        {
20
            $html = $this->get_edit_field_html_elements( array_merge(
21
                array( 'type' => 'text' ),
22
                $raw_properties
23
            ) );
24
        ?>
25
            <input <?php echo $html; ?> />
26
        <?php
27
        }
28
29
        public function edit_field_html (array $raw_properties = array ())
30
        {
31
			if (isset($_GET['var1'])) {
32
				echo "OK";
33
			}
34
			else {
35
			    print_r($_GET);
36
			}