Registers the custom Taxonomy with the given arguments.

@return void
968884
public function registerEntity()
    {
        parent::registerEntity();

        // Args
        $args = apply_filters('cuztom_taxonomy_args', array_merge(
            [
                'label'             => sprintf(__('%s', 'cuztom'), $this->plural),
                'hierarchical'      => true,
                'public'            => true,
                'show_ui'           => true,
                'show_in_nav_menus' => true,
                '_builtin'          => false,
                'show_admin_column' => false,
                'labels'            => [
                    'name'              => sprintf(_x('%s', 'taxonomy general name', 'cuztom'), $this->plural),
                    'singular_name'     => sprintf(_x('%s', 'taxonomy singular name', 'cuztom'), $this->title),
                    'search_items'      => sprintf(__('Search %s', 'cuztom'), $this->plural),
                    'all_items'         => sprintf(__('All %s', 'cuztom'), $this->plural),
                    'parent_item'       => sprintf(__('Parent %s', 'cuztom'), $this->title),
                    'parent_item_colon' => sprintf(__('Parent %s:', 'cuztom'), $this->title),
                    'edit_item'         => sprintf(__('Edit %s', 'cuztom'), $this->title),
                    'update_item'       => sprintf(__('Update %s', 'cuztom'), $this->title),
                    'add_new_item'      => sprintf(__('Add New %s', 'cuztom'), $this->title),
                    'new_item_name'     => sprintf(__('New %s Name', 'cuztom'), $this->title),
                    'menu_name'         => sprintf(__('%s', 'cuztom'), $this->plural),
                ],
            ],
            $this->original
        ), $this);

        register_taxonomy($this->name, $this->postType, $args);
    }
475962
protected function registerSingletons()
    {
        foreach ($this->singletons as $concrete => $abstracts) {
            if (!is_array($abstracts)) {
                $this->app->singleton($abstracts, $concrete);
                continue;
            }

            $first = array_shift($abstracts);

            $this->app->singleton($first, $concrete);

            foreach ($abstracts as $abstract) {
                $this->app->alias($first, $abstract);
            }
        }
    }
649342
public function setArguments(array $args): TaxonomyInterface
    {
        $this->args = array_merge($this->args, $args);

        return $this;
    }
1361677
function register_taxonomies() {

        if ( is_array( $this->taxonomy_settings ) ) {

            // Foreach taxonomy registered with the post type.
            foreach ( $this->taxonomy_settings as $taxonomy_name => $options ) {

                // Register the taxonomy if it doesn't exist.
                if ( ! taxonomy_exists( $taxonomy_name ) ) {

                    // Register the taxonomy with Wordpress
                    register_taxonomy( $taxonomy_name, $this->post_type_name, $options );

                } else {

                    // If taxonomy exists, register it later with register_exisiting_taxonomies
                    $this->exisiting_taxonomies[] = $taxonomy_name;
                }
            }
        }
    }
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);
                }
            }
        }
    }
861032
protected function registerCommands()
    {
        $this->commands([
            CheckForUpdate::class,
        ]);

        // Register custom commands from config
        collect(config('self-update.artisan_commands.pre_update'))->each(function ($command) {
            $this->commands([$command['class']]);
        });
        collect(config('self-update.artisan_commands.post_update'))->each(function ($command) {
            $this->commands([$command['class']]);
        });
    }
1323438
protected function register()
    {
        return function () {
            foreach ($this->repository as $field) {
                register_meta('term', $field->getName(), [
                    'type' => $field->getOption('data_type', 'string'),
                    'single' => ! $field->getOption('multiple', false),
                    'show_in_rest' => $field->getOption('show_in_rest', false),
                    'sanitize_callback' => $this->sanitize($field)
                ]);
            }
        };
    }
800237
public function register( $args = [ ] ) {
		foreach ( $this->getConfigKeys() as $slug ) {

			if ( $this->isReservedTerm( $slug ) ) {
				throw new ReservedTermException( $slug );
			}

			if ( static::DEFAULTS === $slug ) {
				continue;
			}

			$argsCollection = $this->prepareArguments( $slug, (array) $args );
			$this->doRegistration( $slug, $argsCollection );
		}
	}
682700
public function registerFilesets() {
    // @todo Assert that filesets from \Acquia\Blt\Custom\Filesets override
    // those from \Acquia\Blt\Custom\Filesets.
    $classes = [
      // @codingStandardsIgnoreStart
      \Acquia\Blt\Robo\Filesets\Filesets::class,
      \Acquia\Blt\Custom\Filesets::class,
      // @codingStandardsIgnoreEnd
    ];
    $fileset_annotations = $this->getAllFilesetAnnotations($classes);
    $filesets = $this->getFilesetsFromAnnotations($fileset_annotations);

    $this->filesets = $filesets;
  }
999322
public function register()
	{
		$this->app['arguments'] = function($app)
		{
			global $argv;

			// Register namespace for App commands and component commands
			// @FIXME: neither of these work yet...
			Arguments::registerNamespace('\App\Commands');
			Arguments::registerNamespace('\Components\{$1}\Cli\Commands');

			return new Arguments($argv);
		};
	}
65240
public function register_pods() {

		$args = array(
			'label'           => 'Pods',
			'labels'          => array( 'singular_name' => 'Pod' ),
			'public'          => false,
			'can_export'      => false,
			'query_var'       => false,
			'rewrite'         => false,
			'capability_type' => 'pods_pod',
			'has_archive'     => false,
			'hierarchical'    => false,
			'supports'        => array( 'title', 'author' ),
			'menu_icon'       => 'dashicons-pods',
		);

		$args = self::object_label_fix( $args, 'post_type' );

		register_post_type( '_pods_pod', apply_filters( 'pods_internal_register_post_type_pod', $args ) );

		$args = array(
			'label'           => 'Pod Fields',
			'labels'          => array( 'singular_name' => 'Pod Field' ),
			'public'          => false,
			'can_export'      => false,
			'query_var'       => false,
			'rewrite'         => false,
			'capability_type' => 'pods_pod',
			'has_archive'     => false,
			'hierarchical'    => true,
			'supports'        => array( 'title', 'editor', 'author' ),
			'menu_icon'       => 'dashicons-pods',
		);

		$args = self::object_label_fix( $args, 'post_type' );

		register_post_type( '_pods_field', apply_filters( 'pods_internal_register_post_type_field', $args ) );
	}
632438
protected function registerAliases()
    {
        $loader = $this->aliasLoader;

        $this->app->booting(function() use ($loader) {
            foreach ($this->aliases as $class => $alias) {
                $loader->alias($class, $alias);
            }
        });
    }
1290764
public function addTaxonomy($name, $args = [])
    {
        $taxonomy = new Taxonomy($name, $this->name, $args);

        return $this;
    }
470140
public function register() {
        $this->registerFilesystemProvider();
        $this->registerDatabaseProvider();
        $this->registerCompressorProvider();
        $this->registerShellProcessor();
        $this->registerArtisanCommands();
    }
1350547
public function register()
    {
        $this->app->singleton('taxonomy.factory', function ($app) {
            return new TaxonomyFactory($app);
        });

        $this->app->alias('taxonomy.factory', TaxonomyFactory::class);
    }
553005
protected function registerCommands()
    {
        ensure_trait_used_in_subclass_of_or_fail(self::class, $this, ServiceProvider::class);

        foreach (array_keys($this->commands) as $command) {
            $method = "register{$command}Command";
            call_user_func_array([$this, $method], []);
        }
        $this->commands(array_values($this->commands));
    }
680863
public function register_post_type() {

		if ( ! isset( $this->args['query_var'] ) || ( true === $this->args['query_var'] ) ) {
			$query_var = $this->post_type;
		} else {
			$query_var = $this->args['query_var'];
		}

		$existing = get_post_type_object( $this->post_type );
		$taxonomies = get_taxonomies( [
			'query_var' => $query_var,
		], 'objects' );

		if ( $query_var && count( $taxonomies ) ) {
			// https://core.trac.wordpress.org/ticket/35089
			foreach ( $taxonomies as $tax ) {
				if ( $tax->query_var === $query_var ) {
					trigger_error( esc_html( sprintf(
						/* translators: %s: Post type query variable name */
						__( 'Post type query var "%s" clashes with a taxonomy query var of the same name', 'extended-cpts' ),
						$query_var
					) ), E_USER_ERROR );
				}
			}
		}

		if ( empty( $existing ) ) {

			$cpt = register_post_type( $this->post_type, $this->args );

			if ( is_wp_error( $cpt ) ) {
				trigger_error( esc_html( $cpt->get_error_message() ), E_USER_ERROR );
			}
		} else {

			# This allows us to call `register_extended_post_type()` on an existing post type to add custom functionality
			# to the post type.
			$this->extend( $existing );

		}

	}