谢谢你的帮助。如果其他人有类似的查询,设法找到临时解决方案。
临时编辑的媒体。php
$filename = basename( wp_get_attachment_url( $attachment_id ) );
    $default_types = wp_get_video_extensions();
    $defaults_atts = array(
        \'src\'      => \'\',
        \'poster\'   => "diary/wp-content/Pictures/posters/".$filename.".jpg\'",
        \'loop\'     => \'\',
        \'autoplay\' => \'\',
        \'preload\'  => \'none\',
        \'width\'    => 640,
        \'height\'   => 360,
        \'class\'    => \'wp-video-shortcode\',
    );
我已经从wp\\u get\\u attachment\\u url()附件中删除了url,并将其直接插入到“poster”属性中。
接下来,我必须找出一种将其作为函数编写的方法,而不是编辑媒体。php每次更新:)