Register the hooks to the container and WordPress.

@return void
779953
public function run(): void
    {
        foreach ($this->hooks as $hook) {
            $hook->setContainer($this->container);
            $hook->register();
        }
    }
165843
public function register()
    {
        $this->bindGuzzle();

        $this->bindAuth();

        $this->bindHttpClient();

        $this->bindApiClient();

        $this->bindTaxonomyMapper();
    }
167918
public function register()
    {
        wp_register_style(
            $this->handle,
            $this->url,
            $this->dependencies,
            $this->version,
            $this->media
        );
        $this->is_registered = true;
    }
1270867
public function register()
    {
        wp_register_script(
            $this->handle,
            $this->url,
            $this->dependencies,
            $this->version,
            $this->footer
        );

        // Localize the script as needed
        if( !empty( $this->localize['data'] ) && !empty( $this->localize['data'] ) ) {
            wp_localize_script(
                $this->handle,
                $this->localize['name'],
                $this->localize['data']
            );
        }
        $this->is_registered = true;
    }
235588
public function register()
    {
        if (! function_exists('add_theme_support') || empty($this->features)) {
            return;
        }

        foreach ($this->features as $feature => $value) {
            add_theme_support($feature, $value);
        }
    }
21746
public function registerConfiguredHooks(string $config = '')
    {
        if (empty($config)) {
            $config = 'app.hooks';
        }

        $hooks = Collection::make($this->config[$config]);

        (new HooksRepository($this))->load($hooks->all());
    }
1145124
protected function load_hooks() {
		add_action( 'init', [ $this, 'load' ] );
		add_action( 'init', [ $this, 'background_update' ] );
		add_action( 'init', [ $this, 'set_options_filter' ] );
		add_action( 'wp_ajax_github-updater-update', [ $this, 'ajax_update' ] );
		add_action( 'wp_ajax_nopriv_github-updater-update', [ $this, 'ajax_update' ] );

		// Load hook for shiny updates Basic Authentication headers.
		if ( self::is_doing_ajax() ) {
			$this->load_authentication_hooks();
		}

		add_filter( 'extra_theme_headers', [ $this, 'add_headers' ] );
		add_filter( 'extra_plugin_headers', [ $this, 'add_headers' ] );
		add_filter( 'upgrader_source_selection', [ $this, 'upgrader_source_selection' ], 10, 4 );

		// Needed for updating from update-core.php.
		if ( ! self::is_doing_ajax() ) {
			add_filter( 'upgrader_pre_download', [ $this, 'upgrader_pre_download' ], 10, 3 );
		}
	}
141370
protected function registerHooks()
    {
        // Our callbacks are registered only on the admin side even for guest and frontend callbacks
        if (is_admin())
        {
            switch ($this->accessType)
            {
                case 'guest':
                    Hooks::action('wp_ajax_nopriv_' . static::$ACTION, $this, 'doAjax');
                    break;

                case 'logged':
                    Hooks::action('wp_ajax_' . static::$ACTION, $this, 'doAjax');
                    break;

                case 'any':
                    Hooks::action('wp_ajax_nopriv_' . static::$ACTION, $this, 'doAjax');
                    Hooks::action('wp_ajax_' . static::$ACTION, $this, 'doAjax');
                    break;

                default:
                    throw new \InvalidArgumentException("Invalid value for the Ajax access type parameter: "
                        . $this->accessType);
            }
        }

        // If we have global variables
        Hooks::filter('baobab/ajax/global_data', $this, 'addGlobalVariables');
    }
1163866
def register_all_hooks():
    
    global _all_hooks_registered
    if not _all_hooks_registered:
        logger.debug("Searching for hooks")
        hooks = list(get_app_submodules('auth_hooks'))
        logger.debug("Got %s hooks" % len(hooks))
        _all_hooks_registered = True
647203
public function register()
    {
        // Store details
        $args = $this->getModel()->getArgs();
        $metaboxes = $this->getModel()->getMetaboxes();
        $slug = $this->getModel()->getSlug();

        // Register post type if not post or page
        if (!in_array($slug, $this->reserved_slugs)) {
            global $wp_rewrite;

            // Action to register
            register_post_type($slug, $args);

            // Option
            $opt = 'permalink_structure_'.$slug;

            // Get value
            $structure = Option::get($opt, '/%'.$slug.'%-%post_id%');

            // Change structure
            $wp_rewrite->add_rewrite_tag('%'.$slug.'%', '([^/]+)', $slug.'=');
            $wp_rewrite->add_permastruct($slug, $structure, false);
        }

        // Check name
        $name = isset($args['labels']['name']) ? $args['labels']['name'] : '';

        // Works on hook
        $hook = new PosttypeHook($slug, $name, $metaboxes, $this->reserved_slugs);
        $this->getModel()->setHook($hook);
    }
139342
public function registerAdminAction() {
		global $pagenow;

		if ( $pagenow !== 'admin.php' ) {
			return;
		}

		$page_hook = $this->getAdminPageHook();
		$hook_suffix = $this->getAdminHook( $page_hook );

		add_action( "load-{$hook_suffix}", [$this, 'actionAdminLoad'] );
		add_action( $hook_suffix, [$this, 'actionAdmin'] );
	}
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);
        }
    }
335003
public function register(\Pimple\Container $container)
    {
        $this->define();
        foreach ($this->hooks as $hookName => $hookDef) {
            $hook = $container["newHook.factory"];
            $hook->create($hookName, $hookDef);
            $container["hooks.service"]->addHook($hook);
        }
    }
1086367
public function hooks()
    {
        $this->hook->action(
            $this->isAllowedArea($this->getArea()),
            [$this, 'handleAction']
        )->dispatch();

        if (! empty($this->getArgument('execution'))) {
            $this->hook->filter(
                'script_loader_tag',
                [$this, 'addExecutionTypes']
            )->dispatch();
        }
    }
293065
public function init_hooks() {
		// Required functionality:
		add_filter( 'user_has_cap',                    array( $this, 'filter_user_has_cap' ), 10, 4 );
		add_filter( 'map_meta_cap',                    array( $this, 'filter_map_meta_cap' ), 10, 4 );
		add_filter( 'user_row_actions',                array( $this, 'filter_user_row_actions' ), 10, 2 );
		add_action( 'plugins_loaded',                  array( $this, 'action_plugins_loaded' ) );
		add_action( 'init',                            array( $this, 'action_init' ) );
		add_action( 'all_admin_notices',               array( $this, 'action_admin_notices' ), 1 );
		add_action( 'wp_logout',                       'user_switching_clear_olduser_cookie' );
		add_action( 'wp_login',                        'user_switching_clear_olduser_cookie' );

		// Nice-to-haves:
		add_filter( 'ms_user_row_actions',             array( $this, 'filter_user_row_actions' ), 10, 2 );
		add_filter( 'login_message',                   array( $this, 'filter_login_message' ), 1 );
		add_filter( 'removable_query_args',            array( $this, 'filter_removable_query_args' ) );
		add_action( 'wp_meta',                         array( $this, 'action_wp_meta' ) );
		add_action( 'wp_footer',                       array( $this, 'action_wp_footer' ) );
		add_action( 'personal_options',                array( $this, 'action_personal_options' ) );
		add_action( 'admin_bar_menu',                  array( $this, 'action_admin_bar_menu' ), 11 );
		add_action( 'bp_member_header_actions',        array( $this, 'action_bp_button' ), 11 );
		add_action( 'bp_directory_members_actions',    array( $this, 'action_bp_button' ), 11 );
		add_action( 'bbp_template_after_user_details', array( $this, 'action_bbpress_button' ) );
	}
1013374
public function register()
    {
        $this->prepare_hook = $this->prepare_hook ?: Hook::subscribe('Wedeto.HTTP.Forms.Form.prepare', [$this, 'hookPrepareForm']);
        $this->validate_hook = $this->validate_hook ?: Hook::subscribe('Wedeto.HTTP.Forms.Form.isValid', [$this, 'hookIsValid']);
    }
1176026
public function register()
    {
        $parameters = [
            'name' => $this->getSingular(),
            'id' => $this->getSlug(),
        ];

        return register_sidebar(array_merge($this->getArguments(), $parameters));
    }