Kenya konopo ea tsela e khutšoanyane e ikhethileng ho mohlophisi oa mongolo oa WordPress
Kenya khoutu e latelang ho file ea mesebetsi ea sehlooho sa hau sa WordPress:
//添加HTML编辑器自定义快捷标签按钮
add_action('after_wp_tiny_mce', 'add_button_mce');
function add_button_mce($mce_settings) {
?>
<script type="text/javascript">
QTags.addButton( 'hr', 'hr', "\n<hr />\n", "" );
QTags.addButton( 'h1', 'h1', "\n<h1>", "</h1>\n" );
QTags.addButton( 'h2', 'h2', "\n<h2>", "</h2>\n" );
QTags.addButton( 'h3', 'h3', "\n<h3>", "</h3>\n" );
QTags.addButton( 'pre', 'pre', "\n<pre>\n", "\n</pre>\n" );
</script>
<?php
}?
Re tšepa hore sengoloa se reng "Ho eketsa Likonopo tsa Tab tsa Shortcut tse Ikhethileng ho WordPress Text Editor" se arolelanoeng ho blog ea Chen Weiliang ( https://www.chenweiliang.com/ ) se tla u thusa.
Ikutloe u lokolohile ho arolelana sehokelo sa sengoloa sena: https://www.chenweiliang.com/cwl-469.html
