← All changes
|
includes/admin/shortcodes/shortcode-give-profile-editor.php
+23
-2
2.3.0
→
4.17.0
View file →
| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | * The [give_profile_editor] Shortcode Generator class |
| 4 | 4 | * |
| 5 | 5 | * @package Give |
| 6 | 6 | * @subpackage Admin |
| 7 | - * @copyright Copyright (c) 2016, WordImpress | |
| 7 | + * @copyright Copyright (c) 2016, GiveWP | |
| 8 | 8 | * @license https://opensource.org/licenses/gpl-license GNU Public License |
| 9 | 9 | * @since 1.3.0 |
| 10 | 10 | */ |
| 11 | 11 | |
| @@ -24,7 +24,28 @@ | ||
| 24 | 24 | $this->shortcode['label'] = esc_html__( 'Profile Editor', 'give' ); |
| 25 | 25 | |
| 26 | 26 | parent::__construct( 'give_profile_editor' ); |
| 27 | 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 | + } | |
| 28 | 44 | } |
| 29 | 45 | |
| 30 | -new Give_Shortcode_Profile_Editor; | |
| 46 | +/** | |
| 47 | + * @since 4.3.0 use init action | |
| 48 | + */ | |
| 49 | +add_action( 'init', static function () { | |
| 50 | + new Give_Shortcode_Profile_Editor(); | |
| 51 | +}); | |