1
안녕하세요 여러분, 누군가 나를 도울 수 있기를 바랍니다. 저는 WordPress Theme Development를 배우고 있습니다. 그리고 저는 커스 터 마이저에 옵션을 추가 할 시점에 있습니다. 텍스트 영역에서 html을 올바르게 처리하는 방법을 모르겠습니다. 텍스처가 깨끗하고 안전한지 확인하고 싶지만 HTML을 출력 할 수도 있습니다. 이것은 내가 사용하고있는 함수와 코드입니다. 내 테마에Wordpress Customiser & Sanitization
$wp_customize->add_setting('fs_theme_footer', array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
'transport' => '',
'sanitize_callback' => 'esc_textarea',
));
$wp_customize->add_control('fs_theme_footer', array(
'type' => 'textarea',
'section' => 'fs_theme_footer',
'label' => __('Textarea Field', 'fluidstudio'),
'description' => '',
));
는
<?php echo esc_url(get_theme_mod('fs_theme_footer', '')); ?>
나는 등 탈출의 다양한 변화를 시도했지만 난 출력이 제대로 대신 전체 HTML 코드가 전면에 보여주고, HTML로 표시 얻이 수없는 것 종료.
도움을 주시면 감사하겠습니다.
감사
안녕하십니까, 감사합니다. php echo wp_filter_nohtml_kses (get_theme_mod ('fs_theme_footer', ''))); ?>하지만 불행히도 아무런 차이가 없으며 여전히 프런트 엔드에 html을 넣습니다. 감사 – user42668