Home Blog wp_Dev. function 비주얼 편집기 화면에 버튼 추가

비주얼 편집기 화면에 버튼 추가

원하는 버튼을 함수로 생성 후, 원하는 위치로 등록하기
예) functions.php 파일에 아래 코드 등록

function my_mce_buttons($buttons) {    
    $buttons[] = 'hr';   
    return $buttons;
}
add_filter('mce_buttons', 'my_mce_buttons');

function my_mce_buttons_2($buttons) {   
     $buttons[] = 'image';
     $buttons[] = 'fontsizeselect';
    return $buttons;
}
add_filter('mce_buttons_2', 'my_mce_buttons_2');
[ 참고 ] The primary toolbar 에 버튼 추가 : add_filter(‘mce_buttons’, …
The secondary toolbar 에 버튼 추가 : add_filter(‘mce_buttons_2’, …

다음
W3 Total Cache
이전
콘텐츠 작성 노하우