Deprecated
This function has been deprecated. This function was replaced by @see AnsPressFormValidate::sanitize_description() instead.
ap_sanitize_description_field( string $content )
Description #
Sanitize AnsPress question and answer description field for database.
Parameters #
- $contentstring (Required) Post content.
Changelog #
Source #
File: includes/deprecated.php
function ap_sanitize_description_field( $content ) { _deprecated_function( __FUNCTION__, '4.1.0', 'AnsPress\Form\Validate::sanitize_description()' ); $content = str_replace( '<!--more-->', '', $content ); $content = preg_replace_callback( '/<pre.*?>(.*?)<\/pre>/imsu', 'ap_sanitize_description_field_pre_content', $content ); $content = preg_replace_callback( '/<code.*?>(.*?)<\/code>/imsu', 'ap_sanitize_description_field_code_content', $content ); $content = wp_kses( $content, ap_form_allowed_tags() ); $content = sanitize_post_field( 'post_content', $content, 0, 'db' ); return $content; }
Expand full source code Collapse full source code View on GitHub: includes/deprecated.php:364
Add your comment