Register Taxonomies to the PostType
@return void
176386
public function registerTaxonomies()
    {
        if (!empty($this->taxonomies)) {
            foreach ($this->taxonomies as $taxonomy) {
                register_taxonomy_for_object_type($taxonomy, $this->name);
            }
        }
    }
240026
final public function registerPostType(string $postType): void {
		
		// we make this a public method because we use it in our
		// initialization method below but frequently from the activation
		// action of the plugin itself so that we can flush permalinks
		// based on our new types.
		
		$args = $this->getPostTypeArgs($postType);
		$args["labels"] = $this->getPostTypeLabels($postType);
		$args["rewrite"] = $this->getPostTypeRewrite($postType);
		unset($args["label"], $args["register_meta_box_cb"]);
		
		register_post_type($postType, $args);
	}
818794
protected function loadPostTypes()
    {
        if ($config = $this->loadConfigFile('post_types.php')) {
            $callbacks = array();

            // Create one callback for each post type, and register in
            // init action

            foreach ($config as $postTypeName => $args) {
                $callbacks[] = $cb = function () use ($postTypeName, $args) {
                    register_post_type($postTypeName, $args);
                };

                add_action('init', $cb, 0);
            }

            // Flush URL caches for (you need to register custom post types
            // first)

            register_activation_hook($this->getPluginFile(), function () use ($callbacks) {
                foreach ($callbacks as $cb) {
                    $cb();
                }

                flush_rewrite_rules();
            });
        }

        return $this;
    }
672832
public function registerCustomPostTypes()
    {
        if (function_exists('get_field')) {
            $type_definitions = get_field('avabile_dynamic_post_types', 'option');

            if (is_array($type_definitions) && !empty($type_definitions)) {
                foreach ($type_definitions as $type_definition_key => $type_definition) {
                    $labels = array(
                        'name'               => $type_definition['post_type_name'],
                        'singular_name'      => $type_definition['post_type_name'],
                        'menu_name'          => $type_definition['post_type_name'],
                        'name_admin_bar'     => $type_definition['post_type_name'],
                        'add_new'            => __('Add new', 'municipio'),
                        'add_new_item'       => sprintf(__('Add new %s', 'municipio'), $type_definition['post_type_name']),
                        'new_item'           => sprintf(__('New %s', 'municipio'), $type_definition['post_type_name']),
                        'edit_item'          => sprintf(__('Edit %s', 'municipio'), $type_definition['post_type_name']),
                        'view_item'          => sprintf(__('View %s', 'municipio'), $type_definition['post_type_name']),
                        'all_items'          => sprintf(__('All %s', 'municipio'), $type_definition['post_type_name']),
                        'search_items'       => sprintf(__('Search %s', 'municipio'), $type_definition['post_type_name']),
                        'parent_item_colon'  => sprintf(__('Parent %s', 'municipio'), $type_definition['post_type_name']),
                        'not_found'          => sprintf(__('No %s found', 'municipio'), $type_definition['post_type_name']),
                        'not_found_in_trash' => sprintf(__('No %s found in trash', 'municipio'), $type_definition['post_type_name'])
                    );

                    $supports = array('title', 'editor');
                    if (!empty($type_definition['supports'])) {
                        $supports = array_merge($type_definition['supports'], $supports);
                    }

                    $args = array(
                        'labels'             => $labels,
                        'description'        => __('Auto generated cpt from user iterface.', 'municipio'),
                        'public'             => $type_definition['public'],
                        'show_in_menu'       => $type_definition['show_in_nav_menus'],
                        'rewrite'            => array(
                                                    'with_front' => isset($type_definition['with_front']) ? $type_definition['with_front'] : true,
                                                    'slug' => sanitize_title($type_definition['slug'])
                                                ),
                        'capability_type'    => 'post',
                        'hierarchical'       => $type_definition['hierarchical'],
                        'supports'           => $supports,
                        'menu_position'      => (int) $type_definition['menu_position'],
                        'has_archive'        => true,
                        'show_in_rest'       => true,
                        'rest_base'          => sanitize_title($type_definition['slug'])
                    );

                    //Get custom menu icon
                    if (isset($type_definition['menu_icon']) && isset($type_definition['menu_icon']['id']) && is_numeric($type_definition['menu_icon']['id'])) {
                        $image_filepath = get_attached_file($type_definition['menu_icon']['id']);

                        if (file_exists($image_filepath)) {
                            $args['menu_icon'] = 'data:image/svg+xml;base64,'. base64_encode(
                                file_get_contents($image_filepath)
                            );
                        }
                    }

                    register_post_type(sanitize_title(substr($type_definition['post_type_name'], 0, 19)), $args);
                }
            }
        }
    }
841455
public function register()
    {
        // Store details
        $args = $this->getModel()->getArgs();
        $fields = $this->getModel()->getFields();
        $posttype = $this->getModel()->getPosttype();
        $slug = $this->getModel()->getSlug();

        $is_single = 'single' === $args['choice'] ? true : false;

        // Register post type if not post or page
        if (!in_array($slug, $this->reserved_slugs)) {
            register_taxonomy($slug, $posttype, $args);
        }

        // Works on hook
        $hook = new TermHook($slug, $posttype, $fields, $is_single);
        $this->getModel()->setHook($hook);
    }
376621
public function registerPostType($post_type, $args = array())
    {

        if ($this->postTypeObjectExists($post_type)) {
            return new EtherError('Post type with the same name already exists');
        }

        // Args prefixed with an underscore are reserved for internal use.
        $defaults = [
            'labels'             => ['name' => 'Posts', 'singular' => 'Post',],
            'description'        => '',
            'show_ui'            => true,
            'show_in_admin_menu' => null,
            'show_in_nav_menu'   => null,
            'icon'               => null,
            'hierarchical'       => false,
            'taxonomies'         => [],
            'permissions'        => [
                'view_posts'   => 'view_posts',
                'create_posts' => 'create_posts',
                'edit_posts'   => 'edit_posts',
                'delete_posts' => 'delete_posts',
            ],
            'menu_position'      => null,
            '_built_in'          => false,
        ];

        $args = array_merge($defaults, $args);

        if (null === $args[ 'show_in_admin_menu' ]) {
            $args[ 'show_in_admin_menu' ] = $args[ 'show_ui' ];
        }

        if (null === $args[ 'show_in_nav_menu' ]) {
            $args[ 'show_in_nav_menu' ] = $args[ 'show_ui' ];
        }


        $args = (object)$args;

        $args->name = $post_type;

        if (empty($post_type) || strlen($post_type) > 20) {
            return new EtherError('Post type must be less than 20 characters length');
        }

        foreach ($args->taxonomies as $taxonomy) {
            Taxonomy::registerTaxonomyForObjectType($taxonomy, $post_type);
        }

        $this->postTypes[ $post_type ] = $args;
    }
693209
public function registerCustomTypes(): void
    {
        // already registered
        if (\Doctrine\DBAL\Types\Type::hasType('neuralyzer_enum')) {
            return;
        }

        // Else register
        // Manage specific types such as enum
        \Doctrine\DBAL\Types\Type::addType(
            'neuralyzer_enum',
            'Edyan\Neuralyzer\Doctrine\Type\Enum'
        );
        $platform = $this->conn->getDatabasePlatform();
        $platform->registerDoctrineTypeMapping('enum', 'neuralyzer_enum');
        $platform->registerDoctrineTypeMapping('bit', 'boolean');
    }
637968
public function register()
    {
        $this->app->singleton('posttype.factory', function ($app) {
            return new PosttypeFactory($app);
        });

        $this->app->alias('posttype.factory', PosttypeFactory::class);
    }
1025072
final public function registerTaxonomy(string $taxonomy): void {
		
		// this method is public since it's likely that the Activator of a
		// plugin will want to register taxonomies and then flush the rewrite
		// rules to update permalinks.
		
		$args = $this->getTaxonomyArgs($taxonomy);
		$args["labels"] = $this->getTaxonomyLabels($taxonomy);
		$args["rewrite"] = $this->getTaxonomyRewrite($taxonomy);
		
		register_taxonomy($taxonomy, $this->getTaxonomyTypes($taxonomy), $args);
	}
203929
protected function register()
    {
        if (function_exists('register_extended_post_type')) {
            register_extended_post_type($this->name, $this->args);
        } else {
            register_post_type($this->name, $this->args);
        }
    }
165209
public function register()
    {
        $this->instance = register_post_type($this->slug, $this->getArguments());
        $this->registerStatus();
    }
184614
protected function registerRequestTypes()
    {
        foreach ($this->requests as $key => $requestType) {
            $contract = is_string($key) ? $key : $this->convention->contractForRequest($requestType);
            $this->concord->registerRequest($contract, $requestType);
        }
    }
858915
protected function registerTaxonomy()
    {
        if (! $this->isRegistered()) {
            $parameters = array_merge([
                'labels' => $this->getModel()->getLabels(),
                'rewrite' => ['slug' => $this->getModel()->getSlug()],
            ], $this->getModel()->getArguments());

            return register_taxonomy(
                $this->getModel()->getSlug(),
                $this->getBelongsTo(),
                $parameters
            );
        }

        throw new TaxonomyException("Taxonomy [{$this->model->getSlug()}] already exsist.");
    }
50246
public function registerNamespaces()
    {
        foreach ($this->all() as $theme) {
            foreach (array('views', 'lang') as $hint) {
                $this->{$hint}->addNamespace($theme->getLowerName(), $theme->getPath($hint));
            }

            $theme->boot();
        }
    }
260669
public function registerPostType()
    {
        $config = $this->getPostTypeConfig();
        if (empty($config)) {
            return;
        }

        register_post_type($this->getPostType(), $config);
    }
845674
public function registerPlugins()
    {
        foreach($this->activePlugins() as $plugin){
            $className = $plugin->parseNamespace()."\\Plugin";
            if(class_exists($className)) {
                $pluginInstance = new $className();
                if ($plugin->isActive() && method_exists($pluginInstance, 'register')) {
                    $pluginInstance->register();
                    $this->registeredPlugins[] = $plugin;
                }
            }
        }
        return;
    }
678195
public function register() {
        FieldMetadata::setDefaultType(new BaseType());
        FieldMetadata::addType('checkbox', new BooleanType());
        FieldMetadata::addType('toggle', new BooleanType());
        FieldMetadata::addType('datetime', new DatetimeType());
        FieldMetadata::addType('date', new DateType());
        FieldMetadata::addType('number', new NumberType());
        FieldMetadata::addType('select', new SelectType());
        FieldMetadata::addType('relationship', new RelationshipType());
    }