← All changes
|
includes/admin/shortcodes/shortcode-give-donation-history.php
+23
-1
2.3.2
→
4.17.0
View file →
| @@ -24,7 +24,29 @@ | ||
| 24 | 24 | $this->shortcode['label'] = esc_html__( 'Donation History', 'give' ); |
| 25 | 25 | |
| 26 | 26 | parent::__construct( 'donation_history' ); |
| 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 History Shortcode', 'give' ), | |
| 40 | + 'link' => 'http://docs.givewp.com/shortcode-donation-history', | |
| 41 | + ), | |
| 42 | + ); | |
| 43 | + } | |
| 28 | 44 | } |
| 29 | 45 | |
| 30 | -new Give_Shortcode_Donation_History; | |
| 46 | +/** | |
| 47 | + * @since 4.3.0 use init action | |
| 48 | + */ | |
| 49 | +add_action( 'init', static function () { | |
| 50 | + new Give_Shortcode_Donation_History(); | |
| 51 | +}); | |
| 52 | + | |