# give/2.3.0/includes/admin/shortcodes/shortcode-give-register.php

GiveWP – Donation Plugin and Fundraising Platform, version 2.3.0. 53 lines.

- Page: https://pluginprobe.com/plugins/give/2.3.0/code/includes/admin/shortcodes/shortcode-give-register.php
- Raw: https://pluginprobe.com/plugins/give/2.3.0/raw/includes/admin/shortcodes/shortcode-give-register.php
- Modified: 2018-05-03T03:28:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/2.3.0/code/includes/admin/shortcodes/shortcode-give-register.php#L10-L20`.

```php
<?php
/**
 * The [give_register] Shortcode Generator class
 *
 * @package     Give
 * @subpackage  Admin
 * @copyright   Copyright (c) 2016, WordImpress
 * @license     https://opensource.org/licenses/gpl-license GNU Public License
 * @since       1.3.0
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Give_Shortcode_Register extends Give_Shortcode_Generator {

	/**
	 * Class constructor
	 */
	public function __construct() {

		$this->shortcode['title'] = esc_html__( 'Register', 'give' );
		$this->shortcode['label'] = esc_html__( 'Register', 'give' );

		parent::__construct( 'give_register' );
	}

	/**
	 * Define the shortcode attribute fields
	 *
	 * @return array
	 */
	public function define_fields() {

		return array(
			array(
				'type' => 'container',
				'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Redirect URL (optional):', 'give' ) ),
			),
			array(
				'type'     => 'textbox',
				'name'     => 'redirect',
				'minWidth' => 320,
				'tooltip'  => esc_attr__( 'Enter an URL here to redirect to after registering.', 'give' ),
			),
		);
	}
}

new Give_Shortcode_Register;

```
