Written by Anonymous
add_filter( 'convert_content_for_amp', function( $the_content ) { // onmouseover属性を取り除く $the_content = preg_replace('/ +?onmouseover=["][^"]*?["]/i', '', $the_content); $the_content = preg_replace('/ +?onmouseover=[\'][^\']*?[\']/i', '', $the_content); // onmouseout 属性を取り除く $the_content = preg_replace('/ +?onmouseout=["][^"]*?["]/i', '', $the_content); $the_content = preg_replace('/ +?onmouseout=[\'][^\']*?[\']/i', '', $the_content); return $the_content; });