// Intagrate テンプレタグ(caption-no-tags-escaped)をタイトル用に短縮
add_filter('igp_template_caption_no_tags_escaped', function ($text) {
$max = 30; // ←お好みで
$plain = wp_strip_all_tags($text);
if (mb_strlen($plain, 'UTF-8') > $max) {
$plain = mb_substr($plain, 0, $max, 'UTF-8') . '…';
}
// タイトルで使えるように attribute 向けにエスケープして返す
return esc_attr($plain);
});
Warning: Cannot modify header information - headers already sent by (output started at /home/fec/www/wp/wp-content/themes/fukuiwa/functions.php:50) in /home/fec/www/wp/wp-includes/pluggable.php on line 1355
Warning: Cannot modify header information - headers already sent by (output started at /home/fec/www/wp/wp-content/themes/fukuiwa/functions.php:50) in /home/fec/www/wp/wp-includes/pluggable.php on line 1358