hamworks/wp-taxonomy

0.6.1 2023-11-15 08:39 UTC

This package is auto-updated.

Last update: 2024-11-15 10:50:04 UTC


README

$builder = new HAMWORKS\WP\Taxonomy\Builder( 'slug', 'name', [ 'post' ] );
$builder->set_options( 
    [
        'public'      => true,
        'description' => '',
        'has_archive' => true,
    ]
);
$builder->create();

Set initial term.

$builder = new HAMWORKS\WP\Taxonomy\Builder( 'slug', 'name', [ 'post' ] );
$builder->set_options( 
    [
        'public'      => true,
        'description' => '',
        'has_archive' => true,
    ]
);
$your_term = new \HAMWORKS\WP\Taxonomy\Term( 'name', 'slug' );
$builder->set_initial_term( $your_term );
$builder->create();