json['default'] = $this->setting->default; if ( isset( $this->default ) ) { $this->json['default'] = $this->default; } // Value. $this->json['value'] = $this->value(); // Choices. $this->json['choices'] = $this->choices; // The link. $this->json['link'] = $this->get_link(); // The ID. $this->json['id'] = $this->id; // The ajaxurl in case we need it. $this->json['ajaxurl'] = admin_url( 'admin-ajax.php' ); // Input attributes. $this->json['inputAttrs'] = ''; if ( is_array( $this->input_attrs ) ) { foreach ( $this->input_attrs as $attr => $value ) { $this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" '; } } } protected function render_content() {} protected function content_template() { ?>