Ejemplo n.º 1
0
/**
* Install custom taxonomy widget.
*
* @since 2015-10-15.
* @version 2015-10-15 Vikas Sharma - PMCVIP-242
*/
function custom_taxonomy_install()
{
    // Trigger our function that registers the taxonomy
    register_custom_taxonomy();
    // Clear the permalinks after the taxonomy has been registered
    flush_rewrite_rules();
}
Ejemplo n.º 2
0
/**
 * Creates the post type timeline
 * @since 0.1
 */
function post_type_timeline()
{
    $labels = array('name' => __('Timeline', 'redsuns-timeline'), 'singular_name' => __('Timeline', 'redsuns-timeline'), 'add_new' => __('Add new', 'redsuns-timeline'), 'add_new_item' => __('New Item', 'redsuns-timeline'), 'edit_item' => __('Edit Item', 'redsuns-timeline'), 'new_item' => __('New Item', 'redsuns-timeline'), 'view_item' => __('View Item', 'redsuns-timeline'), 'search_items' => __('Search Itens', 'redsuns-timeline'), 'not_found' => __('No registers found', 'redsuns-timeline'), 'not_found_in_trash' => __('No registers found in trash', 'redsuns-timeline'), 'parent_item_colon' => '', 'menu_name' => __('Timeline', 'redsuns-timeline'));
    $args = array('labels' => $labels, 'public' => true, 'public_queryable' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => 5, 'menu_icon' => 'dashicons-backup', 'supports' => array('title', 'editor'));
    register_post_type('timeline', $args);
    flush_rewrite_rules();
    register_custom_taxonomy();
}