php - 如何在 WordPress 定制器中使用 HTML 代码
问题描述
我想在定制器 API 中使用 html 代码。但是当我使用它时,WordPress 会删除 html 标签。
在默认区域中,我使用了一些 html 标签,但它确实适用于我的实际页面。请问有什么办法吗?
$wp_customize->add_setting('banner_title_display',array(
'default' => 'Largest <span> GiveAway</span> collections <small>Online</small>',
'sanitize_callback' => array($this, 'sanitize_custom_options')
));
$wp_customize->add_control(new WP_Customize_Control($wp_customize,'banner_title_display_control',array(
'label' => 'Main header text',
'section' => 'baner_header_section',
'settings' => 'banner_title_display',
'type' => 'textarea'
)));
解决方案
推荐阅读
- lua - LUA:如何在多重赋值中省略一个多值的值
- azure - 使用 Airflow 进行 Azure AD 身份验证
- reactjs - 重用 React 组件来处理不同的数据库集合
- javascript - 在 null 上调用成员函数 get_price_html() - Wordpress/WooCommerce/PHP
- javascript - 访问这个。JS中函数内的父函数
- java - 如何更改soap故障的状态码
- github - CODEOWNERS:从目录中排除组(git)
- c# - 子类抱怨父类构造函数
- django - 使用 django-reverse-admin 时如何禁用删除内联对象?
- sql - 跨多个表的列的 SQL 唯一约束