WordPressຕົວແກ້ໄຂຂໍ້ຄວາມເພີ່ມປຸ່ມປ້າຍທາງລັດແບບກຳນົດເອງ
ເພີ່ມລະຫັດຕໍ່ໄປນີ້ໃສ່ໄຟລ໌ຫນ້າທີ່ຂອງຫົວຂໍ້ 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
}?
ຫວັງ Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "WordPress Text Editor Add Custom Shortcut Tab Button" ເພື່ອຊ່ວຍທ່ານ.
ຍິນດີຕ້ອນຮັບແບ່ງປັນການເຊື່ອມຕໍ່ຂອງບົດຄວາມນີ້:https://www.chenweiliang.com/cwl-469.html
ເພື່ອປົດລັອກເຄັດລັບທີ່ເຊື່ອງໄວ້ເພີ່ມເຕີມ🔑, ຍິນດີຕ້ອນຮັບເຂົ້າສູ່ຊ່ອງ Telegram ຂອງພວກເຮົາ!
Share and like ຖ້າທ່ານມັກມັນ! ການແບ່ງປັນ ແລະຖືກໃຈຂອງເຈົ້າເປັນແຮງຈູງໃຈຢ່າງຕໍ່ເນື່ອງຂອງພວກເຮົາ!