そのため、ワードプレスで wysiwyg(TinyMCE) にボタンを追加しています。ボタン配列にボタンを追加するために呼び出される関数があります。追加するボタンがかなりあるため、その関数内に新しいループを作成しました。コードを手動で挿入するだけでエラーが発生するため、ループに何か問題があるに違いありません。
//Add button to the button array.
function register_button($buttons) {
//Use PHP 'array_push' function to add the columns button to the $buttons array
$columnNum = array('one','two','three','four','five','six','seven','eight','nine','ten','eleven');
for($i=0;$i<11;$i++){
array_push($buttons, '"'.$columnNum[$i].'_col"');
array_push($buttons, '"'.$columnNum[$i].'_col_first"');
array_push($buttons, '"'.$columnNum[$i].'_col_last"');
}
//Return buttons array to TinyMCE
return $buttons;
}
ご協力いただきありがとうございます!