Неопределенная ошибка пользовательской таксономии Wordpress?

У меня странная ошибка, которая возникает каждый раз, когда я создаю новую категорию в пользовательском типе сообщений:

введите здесь описание изображения

Я также получаю сообщение об ошибке при попытке удалить категорию: Произошла неопределенная ошибка.

Я пробовал wp в режиме отладки, но ничего лишнего не добавляется.

Надеюсь, кто-то может помочь :)

Вот мой код таксономии:

function store_categories() {

$labels = array(
    'name'              => _x( 'Store Categories', 'taxonomy general name' ),
    'singular_name'     => _x( 'Store Category', 'taxonomy singular name' ),
    'search_items'      => __( 'Search Store Categories' ),
    'all_items'         => __( 'All Store Categories' ),
    'parent_item'       => __( 'Parent Store Category' ),
    'parent_item_colon' => __( 'Parent Store Category:' ),
    'edit_item'         => __( 'Edit Store Category' ),
    'update_item'       => __( 'Update Store Category' ),
    'add_new_item'      => __( 'Add New Store Category' ),
    'new_item_name'     => __( 'New Store Category' ),
    'menu_name'         => __( 'Store Categories' ),
);

$args = array(
    'labels'        => $labels,
    'hierarchical'  => true,
    'query_var'     => true,
    'rewrite'       => true,
    'public'        => true,
    'show_ui'       => true,
);

register_taxonomy( 'store-category', 'stores', $args );

}

add_action( 'init', 'store_categories', 0 );

И пользовательский код типа сообщения:

function custom_store_post_type() {

$labels = array(
    'name'               => _x( 'Custom Stores', 'post type general name' ),
    'singular_name'      => _x( 'Custom Store', 'post type singular name' ),
    'add_new'            => _x( 'Add New', 'Custom Store' ),
    'add_new_item'       => __( 'Add New Custom Store' ),
    'edit_item'          => __( 'Edit Custom Store' ),
    'new_item'           => __( 'New Custom Store' ),
    'all_items'          => __( 'All Custom Stores' ),
    'view_item'          => __( 'View Success Story' ),
    'search_items'       => __( 'Search Custom Stores' ),
    'not_found'          => __( 'No Custom Stores found' ),
    'not_found_in_trash' => __( 'No Custom Stores found in the Trash' ),
    'parent_item_colon'  => '',
    'menu_name'          => 'Custom Stores'
);

$args = array(
    'labels'        => $labels,
    'description'   => 'Holds our Custom Stores and Custom Store specific data',
    'public'        => true,
    'menu_position' => 20,
    'supports'      => array( 'title', 'editor', 'thumbnail', 'page-attributes', 'excerpt' ),
    'has_archive'   => true,

);

register_post_type( 'stores', $args );

}

add_action( 'init', 'custom_store_post_type' );

person jolen    schedule 06.12.2013    source источник


Ответы (1)


Проблема решена.

Был закрывающий тег php, который вызывал проблему в деталях плагина.

person jolen    schedule 06.12.2013