PluginProbe ʕ •ᴥ•ʔ
پارسی دیت – Parsi Date / trunk
پارسی دیت – Parsi Date vtrunk
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 6 hours ago Cache.php 3 weeks ago Date.php 6 hours ago Debug.php 5 hours ago FeedReader.php 6 hours ago HTML.php 6 hours ago Helper.php 3 weeks ago JSON.php 3 weeks ago Nonce.php 3 weeks ago Notice.php 6 hours ago Number.php 3 weeks ago NumberConverter.php 6 hours ago Param.php 3 weeks ago Sanitizing.php 6 hours ago Strip.php 3 weeks ago Templates.php 3 weeks ago User.php 3 weeks ago Validating.php 3 weeks ago WooCommerce.php 3 weeks ago WordPress.php 6 hours 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