Add all usefull WP filters and hooks.

@param array $args
968045
public function init($args)
    {
        if (empty($args) || OL_ZEUS_ISADMIN) {
            return;
        }

        // Special case
        if (is_bool($args) && $args) {
            $args = $this->available;
        }

        // Iterate on all
        foreach ($args as $key) {
            $key = strtolower($key);

            if (!in_array($key, $this->available)) {
                continue;
            }

            if (in_array($key, ['index_rel_link', 'parent_post_rel_link', 'rest_output_link_wp_head', 'rsd_link', 'start_post_rel_link', 'wp_dlmp_l10n_style', 'wp_resource_hints', 'wlwmanifest_link'])) {
                $this->headerWpHead($key);
                continue;
            }

            $key = str_replace('_', '-', $key);

            $function = Helpers::toFunctionFormat($key);
            $function = 'header'.ucfirst($function);
            $this->$function();
        }
    }
48879
private function set_defaults( $args ) {

		if ( ! isset( $args['glotpress_logo'] ) ) {
			$args['glotpress_logo'] = 'https://plugins.svn.wordpress.org/' . $args['textdomain'] . '/assets/icon-128x128.png';
		}

		if ( ! isset( $args['register_url'] ) ) {
			$args['register_url'] = 'https://translate.wordpress.org/projects/wp-plugins/' . $args['textdomain'] . '/';
		}

		if ( ! isset( $args['glotpress_name'] ) ) {
			$args['glotpress_name'] = 'Translating WordPress';
		}

		if ( ! isset( $args['project_slug'] ) ) {
			$args['project_slug'] = $args['textdomain'];
		}

		return $args;
	}
435311
public function setAllowFilters(array $filters = []): void
    {
        $this->allowFilters = [];
        foreach ($filters as $column) {
            $this->addAllowFilter($column);
        }
    }
183885
protected function log(Args $args)
    {
        $message = sprintf("%s%s", $this->render($args), PHP_EOL);
        $this->logger->log($message, null, $this->registry->get());
    }
181535
public function addFilters()
    {
        foreach (func_get_args() as $filter) {
            if (is_a($filter, 'Rhubarb\Stem\Filters\Filter')) {
                $this->filters[] = $filter;
            } else {
                throw new \Exception('Non filter object added to Group filter');
            }
        }
    }
1300343
public function addArguments(?string $arguments = null)
    {
        $args = [];
        preg_match_all('/(?P<argument>\w+):(?P<value>[\w+\-]+)/', $arguments, $matches);
        if (isset($matches['argument'])) {
            foreach ($matches['argument'] as $key => $argKey) {
                if (isset($matches['value'][$key])) {
                    $args[$argKey] = $matches['value'][$key];
                }
            }
        }
        $this->arguments = $args;
    }
1296122
public function adminBarSetting($args)
    {
        if (empty($args)) {
            return;
        }

        add_action('wp_before_admin_bar_render', function () use ($args) {
            global $wp_admin_bar;

            // Iterate on all
            foreach ($args as $item) {
                $wp_admin_bar->remove_menu($item);
            }
        });
    }
1249765
public function load_template($slug, $name = '', array $args = []){
        if( !did_action('template_redirect') ){
            do_action('template_redirect');
        }
        if( !$this->filtered ){
            add_filter('wp_title', [$this, 'wp_title'], 10, 3);
        }
        parent::load_template($slug, $name, $this->data, $args);
    }
1158015
public function activate( $args = array() ) {
		$theme = $this->fetcher->get_check( $args[0] );

		$errors = $theme->errors();
		if ( is_wp_error( $errors ) ) {
			$message = $errors->get_error_message();
			WP_CLI::error( $message );
		}

		$name = $theme->get( 'Name' );

		if ( 'active' === $this->get_status( $theme ) ) {
			WP_CLI::warning( "The '$name' theme is already active." );
			return;
		}

		if ( $theme->get_stylesheet() !== $theme->get_template() && ! $this->fetcher->get( $theme->get_template() ) ) {
			WP_CLI::error( "The '{$theme->get_stylesheet()}' theme cannot be activated without its parent, '{$theme->get_template()}'." );
		}

		switch_theme( $theme->get_template(), $theme->get_stylesheet() );

		if ( $this->is_active_theme( $theme ) ) {
			WP_CLI::success( "Switched to '$name' theme." );
		} else {
			WP_CLI::error( "Could not switch to '$name' theme." );
		}
	}
1305549
public function handle(array $args)
    {
        $this->filter->add('themosis_admin_global', function ($data) use ($args) {
            if (! isset($data['metabox'])) {
                $data['metabox'] = [$this->id];
            } elseif (isset($data['metabox'])) {
                $data['metabox'][] = $this->id;
            }

            /*
             * Provides WP_Post data.
             */
            $data['post'] = $args['post'];

            return $data;
        });
    }
1151675
private static function set_filter_callbacks( $filter, $callbacks ) {
		global $wp_filter;

		if ( ! isset( $wp_filter[ $filter ] ) && class_exists( 'WP_Hook' ) ) {
			$wp_filter[ $filter ] = new \WP_Hook;
		}

		if ( is_a( $wp_filter[ $filter ], 'WP_Hook' ) ) {
			$wp_filter[ $filter ]->callbacks = $callbacks;
		} else {
			$wp_filter[ $filter ] = $callbacks;
		}
	}
1108498
public function setArguments(array $args): PostTypeInterface
    {
        $this->args = array_merge($this->args, $args);

        return $this;
    }
473182
private function install_many( $args, $assoc_args ) {
		$language_codes = (array) $args;
		$themes         = wp_get_themes();

		if ( empty( $assoc_args['format'] ) ) {
			$assoc_args['format'] = 'table';
		}

		if ( in_array( $assoc_args['format'], array( 'json', 'csv' ), true ) ) {
			$logger = new \WP_CLI\Loggers\Quiet();
			\WP_CLI::set_logger( $logger );
		}

		if ( empty( $themes ) ) {
			\WP_CLI::success( 'No themes installed.' );
			return;
		}

		$count = count( $themes ) * count( $language_codes );

		$results = array();

		$successes = 0;
		$errors    = 0;
		$skips     = 0;
		foreach ( $themes as $theme_path => $theme_details ) {
			$theme_name = \WP_CLI\Utils\get_theme_name( $theme_path );

			$available = $this->get_installed_languages( $theme_name );

			foreach ( $language_codes as $language_code ) {
				$result = [
					'name'   => $theme_name,
					'locale' => $language_code,
				];

				if ( in_array( $language_code, $available, true ) ) {
					\WP_CLI::log( "Language '{$language_code}' for '{$theme_details['Name']}' already installed." );
					$result['status'] = 'already installed';
					$skips++;
				} else {
					$response = $this->download_language_pack( $language_code, $theme_name );

					if ( is_wp_error( $response ) ) {
						\WP_CLI::warning( $response );
						\WP_CLI::log( "Language '{$language_code}' for '{$theme_details['Name']}' not installed." );

						if ( 'not_found' === $response->get_error_code() ) {
							$result['status'] = 'not available';
							$skips++;
						} else {
							$result['status'] = 'not installed';
							$errors++;
						}
					} else {
						\WP_CLI::log( "Language '{$language_code}' for '{$theme_details['Name']}' installed." );
						$result['status'] = 'installed';
						$successes++;
					}
				}

				$results[] = (object) $result;
			}
		}

		if ( 'summary' !== $assoc_args['format'] ) {
			\WP_CLI\Utils\format_items( $assoc_args['format'], $results, array( 'name', 'locale', 'status' ) );
		}

		\WP_CLI\Utils\report_batch_operation_results( 'language', 'install', $count, $successes, $errors, $skips );
	}
520797
public function add_role( $args, $assoc_args ) {
		$user = $this->fetcher->get_check( $args[0] );

		$role = $args[1];

		self::validate_role( $role );

		$user->add_role( $role );

		WP_CLI::success( "Added '{$role}' role for {$user->user_login} ({$user->ID})." );
	}
55560
public static function get_posts( $args ) {
		if ( is_string( $args ) ) {
			$args = add_query_arg(
				[
					'suppress_filters' => false,
				]
			);
		} elseif ( is_array( $args ) && ! isset( $args['suppress_filters'] ) ) {
			$args['suppress_filters'] = false;
		}

		// Get the posts.
		// TODO: WordPress.VIP.RestrictedFunctions.get_posts_get_posts.
		$posts = get_posts( $args );

		// Properly format the array.
		$items = [];
		foreach ( $posts as $post ) {
			$items[ $post->ID ] = $post->post_title;
		}
		wp_reset_postdata();

		return $items;
	}
331694
protected function _validateModuleFilterArgument(array $args) {
        $only           = self::FILTER_MODULE_COMMAND;
        $allowedFilters = $this->getAllowedFilters();
        $filter = array_key_exists($only, $args)
            ? strtolower($args[$only])
            : null
        ;

        if ($filter && !in_array($filter, $allowedFilters)) {
            $error = sprintf(self::ERROR_ILLEGAL_MODULE_FILTER, $args[$only]);
            $error .= "\nTry: " . implode(", ", $this->getAllowedFilters());
            throw new Exception($error);
        }
    }
833857
public function addHook($place, $hook, $args=array()){
		if(!isset($this->content[$place])){
			$this->content[$place] = array();
		}
		//allow just a string reference to a method on this skin object
		if(!is_array($hook) && method_exists($this, $hook)){
			$hook = array($hook, $this);
		}
		$this->content[$place][] = array('type'=>'hook', 'hook'=>$hook, 'arguments'=>$args);
	}