我有一个短代码,我想用一种更好、更干净的方式来写:
function webhosting_products_shortcode( $atts, $content = null) {
$content=\'<h2 class="heading_blue">Eburnie Hosting vous offre:</h2>\'
. \'<div class="hostingbox"><dl>\'
. \'<dt><a href="http://hosting.eburnienetwork.com/web-hosting/index.php">Hébergement Web</a></dt>\'
. \'<dd class="img"><img src="img/gamlastan.jpg" width="80" height="80" alt="Gamla Stan" /></dd>\'
. \'<dd>Hébergement Web</dd></dl>\'
. \'<dl class="alt"><dt><a href="http://hosting.eburnienetwork.com/web-hosting/email-hosting.php">Hébergement Email</a></dt>\'
. \'<dd class="img"><img src="img/gamlastan.jpg" width="80" height="80" alt="Gamla Stan" /></dd>\'
. \'<dd>Hébergement Email</dd></dl>\'
. \'<dl><dt><a href="http://hosting.eburnienetwork.com/website-design/index.php">Conception de Sites</a></dt>\'
. \'<dd class="img"><img src="img/gamlastan.jpg" width="80" height="80" alt="Gamla Stan" /></dd>\'
. \'<dd>Conception de Sites</dd></dl>\'
. \'<dl><dt><a href="http://hosting.eburnienetwork.com/digital-ssl-certificate/index.php">Certificat SSL</a></dt>\'
. \'<dd class="img"><img src="img/gamlastan.jpg" width="80" height="80" alt="Gamla Stan" /></dd>\'
. \'<dd>Certificat SSL</dd></dl>\'
. \'<dl><dt><a href="http://hosting.eburnienetwork.com/reseller-hosting.php">Programme Revendeur</a></dt>\'
. \'<dd class="img"><img src="img/gamlastan.jpg" width="80" height="80" alt="Gamla Stan" /></dd>\'
. \'<dd>Programme Revendeur</dd>\'
. \'</dl></div>\';
return $content;
}
add_shortcode(\'webhosting\', \'webhosting_products_shortcode\');
shortcode[网络托管]正在发挥作用,但我认为这不是实现它的正确方式。谢谢