對不起,如果標題沒有任何意義,我嘗試了我最好的措辭。正如標題所示,我正在嘗試向我的4個社交媒體圖標的php文件添加其他變量,但我不知道要使用哪些命令或如何對其進行編碼。我試圖在谷歌和在這裏查找它,但我甚至不知道要查找什麼詞,我相對新的CSS,HTML,PHP /任何人都可以幫助,如果你想看到圖標,你可以去到我的網站http://boasish.com。
以下是當前在我的php文件中控制4個社交媒體圖標的$ network命令。
foreach ($this->buttons as $network => $options) {
if ($this->options['show'][$network]) {
/*** Apply Shortcodes */
$shortcodes = array(
'[site_name]',
'[permalink]',
'[post_title]',
'[post_image_url]',
'[title_encode]'
);
$shortcode_values = array(
$site_name,
$permalink,
$post_title,
$post_image_url,
$title_encode
);
$widget = str_replace($shortcodes,$shortcode_values,$options['widget']);
$to_return .= '
<div class="spyr_sliding_share_button spyr_sb_' . $network . '">
<a href="#" class="icon icon-' . $network . '"><span>' . $options['name'] . '</span></a>
<div class="spyr_sb_inner">' . $widget . '</div>
</div>';
}
}
你的意思是你想要四個變量,每個變量都包含特定媒體按鈕的「HTML」? – Bono 2014-09-26 22:21:31
@Bono是的,確切地說。 – k5432 2014-09-26 22:23:36