abstract-shortcode-generator.php
8 years ago
admin-shortcodes.js
7 years ago
class-shortcode-button.php
7 years ago
mce-plugin.js
8 years ago
shortcode-give-donation-grid.php
7 years ago
shortcode-give-donation-history.php
8 years ago
shortcode-give-donor-wall.php
7 years ago
shortcode-give-form.php
8 years ago
shortcode-give-goal.php
8 years ago
shortcode-give-login.php
8 years ago
shortcode-give-profile-editor.php
8 years ago
shortcode-give-receipt.php
8 years ago
shortcode-give-register.php
8 years ago
shortcode-give-totals.php
8 years ago
shortcode-give-login.php
63 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The [give_login] Shortcode Generator class |
| 4 | * |
| 5 | * @package Give |
| 6 | * @subpackage Admin |
| 7 | * @copyright Copyright (c) 2016, WordImpress |
| 8 | * @license https://opensource.org/licenses/gpl-license GNU Public License |
| 9 | * @since 1.3.0 |
| 10 | */ |
| 11 | |
| 12 | // Exit if accessed directly. |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | exit; |
| 15 | } |
| 16 | |
| 17 | class Give_Shortcode_Login extends Give_Shortcode_Generator { |
| 18 | |
| 19 | /** |
| 20 | * Class constructor |
| 21 | */ |
| 22 | public function __construct() { |
| 23 | |
| 24 | $this->shortcode['title'] = esc_html__( 'Login', 'give' ); |
| 25 | $this->shortcode['label'] = esc_html__( 'Login', 'give' ); |
| 26 | |
| 27 | parent::__construct( 'give_login' ); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Define the shortcode attribute fields |
| 32 | * |
| 33 | * @return array |
| 34 | */ |
| 35 | public function define_fields() { |
| 36 | |
| 37 | return array( |
| 38 | array( |
| 39 | 'type' => 'container', |
| 40 | 'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Login Redirect URL (optional):', 'give' ) ), |
| 41 | ), |
| 42 | array( |
| 43 | 'type' => 'textbox', |
| 44 | 'name' => 'login-redirect', |
| 45 | 'minWidth' => 320, |
| 46 | 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after login.', 'give' ), |
| 47 | ), |
| 48 | array( |
| 49 | 'type' => 'container', |
| 50 | 'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Logout Redirect URL (optional):', 'give' ) ), |
| 51 | ), |
| 52 | array( |
| 53 | 'type' => 'textbox', |
| 54 | 'name' => 'logout-redirect', |
| 55 | 'minWidth' => 320, |
| 56 | 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after logout.', 'give' ), |
| 57 | ), |
| 58 | ); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | new Give_Shortcode_Login; |
| 63 |