stored_content_author : null; // The create route slashes its data (the way wp_insert_post() expects it). // kses must see unslashed HTML: on slashed content it drops the JSON of // every block comment, so embeds, image sizes and columns lose their // settings. The filtered content is stored unslashed, as kses always // returned it here. if ( is_string( $content ) && ( false !== strpos( $content, '\\"' ) || false !== strpos( $content, "\\'" ) ) ) { return apply_filters( 'academy/allowed_learnpage_content_tags', wp_unslash( $content ), $author_id ); } return apply_filters( 'academy/allowed_learnpage_content_tags', $content, $author_id ); } public function sanitize_post_content( $content ) { return $this->sanitize_lesson_content( $content ); } public function sanitize_lesson_author( $id ) { return absint( $id ); } public function sanitize_comment_count( $id ) { return absint( $id ); } public function sanitize_video_duration( $json ) { if ( is_string( $json ) ) { return json_decode( $json, true ); } return $json; } public function sanitize_video_source( $json ) { if ( is_string( $json ) ) { $json = json_decode( $json, true ); } return \Academy\Helper::sanitize_video_source_data( $json ); } public function sanitize_drip_content( $json ) { if ( is_string( $json ) ) { return json_decode( $json, true ); } return $json; } }