PluginProbe ʕ •ᴥ•ʔ
پارسی دیت – Parsi Date / 6.2.1
پارسی دیت – Parsi Date v6.2.1
6.2.1 6.2 6.1 5.1.6 5.1.7 5.1.8 5.1.8.2 6.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.0.0-alpha 2.1 2.1.1 2.1.2 2.1.3 2.1.5 2.1.6 2.1.7 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0.1 2.3.0.2 2.3.1 2.3.2 2.3.3 2.3.4 3.0.1 3.0.2 3.0.3 4.0.0 4.0.1 4.0.2 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5
wp-parsidate / inc / Helper / Strip.php
wp-parsidate / inc / Helper Last commit date
Assets.php 2 weeks ago Cache.php 2 weeks ago Date.php 2 weeks ago Debug.php 2 weeks ago FeedReader.php 2 weeks ago HTML.php 2 weeks ago Helper.php 2 weeks ago JSON.php 2 weeks ago Nonce.php 2 weeks ago Notice.php 2 weeks ago Number.php 2 weeks ago NumberConverter.php 2 weeks ago Param.php 2 weeks ago Sanitizing.php 2 weeks ago Strip.php 2 weeks ago Templates.php 2 weeks ago User.php 2 weeks ago Validating.php 2 weeks ago WooCommerce.php 2 weeks ago WordPress.php 2 weeks ago
Strip.php
39 lines
1 <?php
2
3 namespace WPParsidate\Helper;
4
5 class Strip {
6 /**
7 * Filters text content and strips out disallowed HTML.
8 *
9 * @param string $content Text content to filter.
10 *
11 * @return string Filtered content containing only the allowed HTML.
12 */
13 public static function kses( string $content ): string {
14 return wp_kses( stripslashes_deep( $content ), wp_kses_allowed_html( 'post' ) );
15 }
16
17 /**
18 * Remove HTML comments
19 *
20 * @param string $html
21 *
22 * @return string
23 */
24 public static function removeHtmlComments( string $html ): string {
25 return preg_replace( '~<!--(.*?)-->~s', '', $html );
26 }
27
28 /**
29 * Remove HTML Document type
30 *
31 * @param string $html
32 *
33 * @return string
34 */
35 public static function removeHtmlDoctype( string $html ): string {
36 return preg_replace( '/^<!DOCTYPE.+?>/', '', $html );
37 }
38 }
39