把这个放进你的functions.php
:
add_shortcode(\'my_blockquote\', \'my_blockquote\');
function my_blockquote($atts, $content) {
return \'<div class="span3 quote well">\'.PHP_EOL
.\'<i class="icon-quote-left icon-2x pull-left icon-muted"></i>\'.PHP_EOL
.\'<blockquote class="lead">\'.$content.\'</blockquote>\'.PHP_EOL
.\'</div>\';
}
然后,在页面/帖子上写下:
[my\\u blockquote]此处显示内容。。。[/my\\u blockquote]
就这样。
<小时>// EDIT: 要添加快速标记按钮,请将其也放入functions.php
:
function add_blockquote_quicktag() {
?>
<script type="text/javascript">
QTags.addButton( \'my_blockquote\', \'B\', \'[my_blockquote]\', \'[/my_blockquote]\', \'B\', \'My blockquote\', 1 );
</script>
<?php
}
add_action( \'admin_print_footer_scripts\', \'add_blockquote_quicktag\' );