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 | includes/formatting.php +26 -0 4.15.44.16.9 View file →
@@ -768,8 +768,34 @@
768 768 return is_scalar($var) ? sanitize_text_field(wp_unslash($var)) : $var;
769 769 }
770 770
771 771 /**
772 + * Strips shortcodes from a string repeatedly until the output stops changing, so nested
773 + * shortcode syntax is fully removed rather than only partially reduced by a single pass.
774 + *
775 + * @since 4.16.9
776 + *
777 + * @param string $content Content that may contain shortcode syntax.
778 + *
779 + * @return string Content with registered shortcodes removed.
780 + */
781 +function give_strip_shortcodes_deep($content): string
782 +{
783 + $content = (string) $content;
784 +
785 + if ('' === $content || false === strpos($content, '[')) {
786 + return $content;
787 + }
788 +
789 + do {
790 + $previous = $content;
791 + $content = strip_shortcodes($content);
792 + } while ($content !== $previous);
793 +
794 + return $content;
795 +}
796 +
797 +/**
772 798 * Transforms php.ini notation for numbers (like '2M') to an integer.
773 799 *
774 800 * @since 1.8
775 801 *