Assets::setup_hooks()

Sets up all action and filter hooks for the service.

Description

This method must be implemented and then be called from the constructor.

See also

Source

File: src/assets.php

	protected function setup_hooks() {
		$this->actions = array(
			array(
				'name'     => 'wp_enqueue_scripts',
				'callback' => array( $this, 'register_assets' ),
				'priority' => 1,
				'num_args' => 0,
			),
			array(
				'name'     => 'admin_enqueue_scripts',
				'callback' => array( $this, 'register_assets' ),
				'priority' => 1,
				'num_args' => 0,
			),
			array(
				'name'     => 'admin_enqueue_scripts',
				'callback' => array( $this, 'enqueue_icons' ),
				'priority' => 10,
				'num_args' => 0,
			),
			array(
				'name'     => 'admin_footer',
				'callback' => array( $this, 'load_icons' ),
				'priority' => 10,
				'num_args' => 0,
			),
		);

		$this->filters = array(
			array(
				'name'     => 'admin_body_class',
				'callback' => array( $this, 'add_admin_utility_body_classes' ),
				'priority' => 1,
				'num_args' => 1,
			),
		);
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.