| 1 |
<?php |
| 2 |
/** |
| 3 |
* The [give_profile_editor] Shortcode Generator class |
| 4 |
* |
| 5 |
* @package Give |
| 6 |
* @subpackage Admin |
| 7 |
* @copyright Copyright (c) 2016, GiveWP |
| 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_Profile_Editor extends Give_Shortcode_Generator { |
| 18 |
|
| 19 |
/** |
| 20 |
* Class constructor |
| 21 |
*/ |
| 22 |
public function __construct() { |
| 23 |
|
| 24 |
$this->shortcode['label'] = esc_html__( 'Profile Editor', 'give' ); |
| 25 |
|
| 26 |
parent::__construct( 'give_profile_editor' ); |
| 27 |
} |
| 28 |
|
| 29 |
/** |
| 30 |
* Define the shortcode attribute fields |
| 31 |
* |
| 32 |
* @since 2.5.0 |
| 33 |
* @return array |
| 34 |
*/ |
| 35 |
public function define_fields() { |
| 36 |
return array( |
| 37 |
array( |
| 38 |
'type' => 'docs_link', |
| 39 |
'text' => esc_html__( 'Learn more about the Donation Profile Editor Shortcode', 'give' ), |
| 40 |
'link' => 'http://docs.givewp.com/shortcode-profile-editor', |
| 41 |
), |
| 42 |
); |
| 43 |
} |
| 44 |
} |
| 45 |
|
| 46 |
/** |
| 47 |
* @since 4.3.0 use init action |
| 48 |
*/ |
| 49 |
add_action( 'init', static function () { |
| 50 |
new Give_Shortcode_Profile_Editor(); |
| 51 |
}); |
| 52 |
|