WordPress.org

Make WordPress Core

Ticket #10122: test-hierarchical-taxonomy.2.php

File test-hierarchical-taxonomy.2.php, 527 bytes (added by prettyboymp, 4 years ago)

changed taxonomy registration to fire on init instead of plugins_loaded after some users had issues with rewrite.php not being loaded yet

Line 
1<?php
2/*
3Plugin Name: Test Hierarchical Taxonomy
4Plugin URI: http://voceconnect.com/
5Description: A simple plugin to test the hierarchical taxonomy handling within the edit post page
6Author: Michael Pretty
7Version: 1.0
8Author URI: http://voceconnect.com/
9*/
10
11
12define('SCRIPT_DEBUG', true);
13define('STYLE_DEBUG', true);
14
15function register_test_taxonomy()
16{
17        register_taxonomy('test-taxonomy', array('post'), array('hierarchical' => true, 'label' => 'Test Hierarchical Taxonomy'));
18}
19add_action('init', 'register_test_taxonomy');