Tag: send_to_editor
send_to_editor get audio address and id
这个方法会导致 WordPress 编辑器原本的插入媒体功能失效! /* * To change this template, choose Tools | Templates * and open the template in the editor. */ add_filter(‘media_send_to_editor’, ‘media_editor’, 1, 3); function media_editor($html, $send_id, $attachment ){ //get the media’s guid and append it to the html //$post = get_post($send_id); //$html .= ”.$send_id.'”‘; $html = str_replace(‘<a’, ‘<a=”” smid=”.$send_id, $html); return $html;…