PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
← All changes | src/Helpers/Frontend/Shortcode.php +24 -0 2.30.04.16.9 View file →
@@ -24,5 +24,29 @@
24 24 }
25 25
26 26 return '';
27 27 }
28 +
29 + /**
30 + * @since 3.4.0
31 + */
32 + public static function isValidDonation(int $donationId): bool
33 + {
34 + return ! empty($donationId) && 'give_payment' === get_post_type($donationId);
35 + }
36 +
37 + /**
38 + * @since 3.4.0
39 + */
40 + public static function isValidForm(int $formId): bool
41 + {
42 + return ! empty($formId) && 'give_forms' === get_post_type($formId);
43 + }
44 +
45 + /**
46 + * @since 3.4.0
47 + */
48 + public static function isPublishedForm(int $formId): bool
49 + {
50 + return self::isValidForm($formId) && 'publish' === get_post_status($formId);
51 + }
28 52 }