芝麻web文件管理V1.00
编辑当前文件:/home/dcqnetm/icbs-recup/wp-content/plugins/cookie-law-info/lite/includes/class-formatting.php
array( 'type' => 'true', 'style' => true, 'id' => true, 'class' => true, ), ), wp_kses_allowed_html( 'post' ) ); $html = array_map( '_cky_global_attributes', $html ); return apply_filters( 'cky_allowed_html', $html ); } /** * Global attributes for any html tags * * @param string $value Default attribute. * @return array */ function _cky_global_attributes( $value ) { $global_attributes = array( 'aria-describedby' => true, 'aria-details' => true, 'aria-label' => true, 'aria-labelledby' => true, 'aria-hidden' => true, 'class' => true, 'id' => true, 'style' => true, 'title' => true, 'role' => true, 'data-*' => true, 'data-cky-tag' => true, 'tabindex' => true, 'aria-level' => true, ); if ( true === $value ) { $value = array(); } if ( is_array( $value ) ) { return array_merge( $value, $global_attributes ); } return $value; } } if ( ! function_exists( 'cky_sanitize_content' ) ) { /** * Sanitizes content for allowed HTML tags for post content. * * Post content refers to the page contents of the 'post' type and not `$_POST` * data from forms. * * This function expects unslashed data. * * @since 3.0.0 * * @param string $string Post content to filter. * @return string Filtered post content with allowed HTML tags and attributes intact. */ function cky_sanitize_content( $string ) { if ( is_array( $string ) ) { return array_map( 'cky_sanitize_content', $string ); } else { return is_scalar( $string ) ? wp_kses( $string, cky_allowed_html() ) : $string; } } } if ( ! function_exists( 'cky_sanitize_color' ) ) { /** * Sanitize color value. * * @param string $value The color value. * @return string */ function cky_sanitize_color( $value ) { if ( 'transparent' === strtolower( $value ) ) { return sanitize_text_field( $value ); } if ( false === strpos( $value, 'rgba' ) ) { return sanitize_hex_color( $value ); } // rgba value. $red = ''; $green = ''; $blue = ''; $alpha = ''; sscanf( $value, 'rgba(%d,%d,%d,%f)', $red, $green, $blue, $alpha ); return 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $alpha . ')'; } }