Php WordPress文本编辑器按钮不显示
所以,我在WordPress中有一个自定义的post类型,除了我尝试添加一个新项目并从可视化编辑器切换到文本编辑器时,其他一切都正常工作,但我发现没有可用的按钮。通常在文本编辑器中有这些按钮“B”、“i”、“link”、“ins”、“img”、“ul”等 这有点奇怪,因为页面和帖子都有这些按钮。下面是我试图添加自定义post类型函数的代码Php WordPress文本编辑器按钮不显示,php,wordpress,function,editor,Php,Wordpress,Function,Editor,所以,我在WordPress中有一个自定义的post类型,除了我尝试添加一个新项目并从可视化编辑器切换到文本编辑器时,其他一切都正常工作,但我发现没有可用的按钮。通常在文本编辑器中有这些按钮“B”、“i”、“link”、“ins”、“img”、“ul”等 这有点奇怪,因为页面和帖子都有这些按钮。下面是我试图添加自定义post类型函数的代码 add_action( 'init', '___regPostType' ) ; function ___regPostType() { $labels
add_action( 'init', '___regPostType' ) ;
function ___regPostType() {
$labels = array(
'name' => _x('Custom Post Type', 'post type general name'),
'singular_name' => _x('Test Post', 'post type singular name'),
'add_new' => _x('Add New Item', 'test item'),
'add_new_item' => __('Add New Item'),
'edit_item' => __('Edit Item'),
'new_item' => __('New Item'),
'view_item' => __('View Item Page'),
'search_items' => __('Search Item'),
'not_found' => __('Nothing found'),
'not_found_in_trash' => __('Nothing found in Trash'),
'parent_item_colon' => ''
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'menu_icon' => 'dashicons-welcome-learn-more',
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => null,
'supports' => array('title','editor','thumbnail')
);
register_post_type( 'test' , $args );
}
我不确定这里是否缺少参数或函数,但我希望有人能找到答案