2012-08-02 65 views
0

有沒有一種方法來編碼我已經在我的WordPress網站attatched每個MP3文件? 這是當你去到源代碼的樣子:編碼上傳的MP3文件在WordPress

<ol class='songs'><li><a href='http://localhost/wordpress/wp-content/uploads/2011/10/f1678576.mp3' title='Song Title'>Artist - Song</a></li></ol> 

PHP代碼:

if ($attachments) { 
     echo "<ol class='songs'>"; 
     foreach ($attachments as $attachment) { 
     echo "<li>"; 
      echo wp_get_attachment_link($attachment->ID); 
      echo "</li>"; 
     } 
     echo "</ol>"; 
    } 

我看到WPaudio但不知道如何實現它。這是WPaudio代碼的外觀:

<pre><code><script type='text/javascript'>_wpaudio.enc['wpaudio-5019e1ff1c9da'] = '\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0075\u0072\u006c\u002e\u0074\u006f\u002f\u0079\u006f\u0075\u0072\u002e\u006d\u0070\u0033';</script><a id='wpaudio-5019e1ff1c9da' class='wpaudio wpaudio-enc' href='#'>Artist - Song</a></code></pre> 

如果您有任何建議,請隨時表達。謝謝。

+0

服務爲什麼需要編碼?你想編碼文件名? – 2012-08-02 02:42:13

+0

是的。因爲當你深入到源代碼。只需點擊一下,你就可以得到文件。 :) – user1441816 2012-08-02 02:57:58

+0

但即使你編碼他們仍然可以得到該文件,你看到的是你記得嗎? – 2012-08-02 03:04:43

回答

0

WPAudio看起來相當簡單易安裝,如果這是你想要去做的事情...... http://wpaudio.com/#install ......在一天結束時,你將花費大量精力通過編碼來隱藏文件名當你可以使用其他玩家。

如果你打算是偏執還不如用類似的SoundCloud http://soundcloud.com/